-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build(bindgen): check for corresponding .zig file #15896
base: main
Are you sure you want to change the base?
Conversation
@@ -1,5 +1,9 @@ | |||
// This is the public API for `bind.ts` files | |||
// It is aliased as `import {} from 'bindgen'` | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does jsdoc make this a comment for the file or the next declared symbol (Type)? i could be totally wrong and this form is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for //
? no. It should make one for /** */
but I'm not seeing it. Maybe there's a problem with the tsconfig?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for adding the additional assertion
src/codegen/bindgen-lib.ts
Outdated
@@ -196,6 +200,23 @@ export namespace t { | |||
export const ByteString = builtinType<string>()("ByteString"); | |||
/** | |||
* DOMString but encoded as `[]const u8` | |||
* | |||
* @example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think simple examples like these aren't worth their line count, especially when my laptop screen can only fit 70 lines of code at once. this is why i try to write extremely concise comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah the hover doesn't appear in screenshots :(
When generating bindings for
foo.bind.ts
, ensure afoo.zig
file exists next to it. Builds will fail downstream if this is missing, this error just makes it surface sooner and in a more clear manner.