-
Notifications
You must be signed in to change notification settings - Fork 7
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
PBJ processes document comments (i.e. /**...*/
) as tokens
#319
Comments
jsync-swirlds
added a commit
that referenced
this issue
Jan 9, 2025
* Fixes #145 * Renamed `intergration` to `integration` globally * Fixes #217 * Added docComment before `syntax`, `import`, `package`, `option`, and `reserved` keywords in grammar * The root cause is the change to docComment to make it non-skipped, so we have to add it everywhere. Skipped comments (the `//` type) can be absolutely anywhere because the grammar _skips_ them. * Note, #319 still prevents using docComment before `reserved`. Signed-off-by: Joseph Sinclair <121976561+jsync-swirlds@users.noreply.github.com>
jsync-swirlds
added a commit
that referenced
this issue
Jan 9, 2025
* Fixes #145 * Renamed `intergration` to `integration` globally * Fixes #217 * Added skippedDocComment before `syntax`, `import`, `package`, `option`, and `reserved` keywords in grammar * The root cause is the change to docComment to make it non-skipped, so we have to add it everywhere. Skipped comments (the `//` type) can be absolutely anywhere because the grammar _skips_ them. * Note, this _might_ also fix #319 Signed-off-by: Joseph Sinclair <121976561+jsync-swirlds@users.noreply.github.com>
jsync-swirlds
added a commit
that referenced
this issue
Jan 10, 2025
* Fixes #145 * Renamed `intergration` to `integration` globally * Fixes #217 * Added skippedDocComment before `syntax`, `import`, `package`, `option`, and `reserved` keywords in grammar * The root cause is the change to docComment to make it non-skipped, so we have to add it everywhere. Skipped comments (the `//` type) can be absolutely anywhere because the grammar _skips_ them. * Note, this _might_ also fix #319 Signed-off-by: Joseph Sinclair <121976561+jsync-swirlds@users.noreply.github.com>
jsync-swirlds
added a commit
that referenced
this issue
Jan 10, 2025
* Fixes #145 * Renamed `intergration` to `integration` globally * Fixes #217 * Added documentation comments before `syntax`, `import`, `package`, `option`, and `reserved` keywords in grammar * The root cause is the change to docComment to make it non-skipped, so we have to add it everywhere. Skipped comments (the `//` type) can be absolutely anywhere because the grammar _skips_ them. * Note, this _might_ also fix #319 Signed-off-by: Joseph Sinclair <121976561+jsync-swirlds@users.noreply.github.com>
jsync-swirlds
added a commit
that referenced
this issue
Jan 10, 2025
* Fixes #145 * Renamed `intergration` to `integration` globally * Fixes #217 * Added documentation comments before `syntax`, `import`, `package`, `option`, and `reserved` keywords in grammar * The root cause is the change to docComment to make it non-skipped, so we have to add it everywhere. Skipped comments (the `//` type) can be absolutely anywhere because the grammar _skips_ them. * Note, this _might_ also fix #319 Signed-off-by: Joseph Sinclair <121976561+jsync-swirlds@users.noreply.github.com>
jsync-swirlds
added a commit
that referenced
this issue
Jan 13, 2025
* Fixes #145 * Renamed `intergration` to `integration` globally * Fixes #217 * Added documentation comments before `syntax`, `import`, `package`, `option`, and `reserved` keywords in grammar * The root cause is the change to docComment to make it non-skipped, so we have to add it everywhere. Skipped comments (the `//` type) can be absolutely anywhere because the grammar _skips_ them. * Note, this _might_ also fix #319 Signed-off-by: Joseph Sinclair <121976561+jsync-swirlds@users.noreply.github.com>
jsync-swirlds
added a commit
that referenced
this issue
Jan 13, 2025
* Fixes #145 * Renamed `intergration` to `integration` globally * Fixes #217 * Added documentation comments before `syntax`, `import`, `package`, `option`, and `reserved` keywords in grammar * The root cause is the change to docComment to make it non-skipped, so we have to add it everywhere. Skipped comments (the `//` type) can be absolutely anywhere because the grammar _skips_ them. * Note, this _might_ also fix #319 Signed-off-by: Joseph Sinclair <121976561+jsync-swirlds@users.noreply.github.com>
jsync-swirlds
added a commit
that referenced
this issue
Jan 14, 2025
* Fixes #145 * Renamed `intergration` to `integration` globally * Fixes #217 * Added documentation comments before `syntax`, `import`, `package`, `option`, and `reserved` keywords in grammar * The root cause is the change to docComment to make it non-skipped, so we have to add it everywhere. Skipped comments (the `//` type) can be absolutely anywhere because the grammar _skips_ them. * Note, this _might_ also fix #319 Signed-off-by: Joseph Sinclair <121976561+jsync-swirlds@users.noreply.github.com>
jsync-swirlds
added a commit
that referenced
this issue
Jan 14, 2025
* Fixes #145 * Renamed `intergration` to `integration` globally * Fixes #217 * Added documentation comments before `syntax`, `import`, `package`, `option`, and `reserved` keywords in grammar * The root cause is the change to docComment to make it non-skipped, so we have to add it everywhere. Skipped comments (the `//` type) can be absolutely anywhere because the grammar _skips_ them. * Note, this _might_ also fix #319 Signed-off-by: Joseph Sinclair <121976561+jsync-swirlds@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
PBJ treats document comments (/**...*/) as the start of a token (because it wants to make them Javadoc), and if the comment is not followed by a field or message, that next item (be it a keyword like reserved or the end of a block }) is treated as a field or message, so it would look for a message type reserved or hoist a oneof to a field (both of which will fail). In some cases that will even cause a message to be processed completely incorrectly, but still appear to compile, so it's another subtly concerning bug.
How to Reproduce
Compile the following protobuf:
The text was updated successfully, but these errors were encountered: