Skip to content
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

Use underscore to escape keywords #618

Closed
Tracked by #518
stepancheg opened this issue Apr 29, 2022 · 0 comments
Closed
Tracked by #518

Use underscore to escape keywords #618

stepancheg opened this issue Apr 29, 2022 · 0 comments
Labels
rust-protobuf-v3 Issued to be fixed to release version 3

Comments

@stepancheg
Copy link
Owner

stepancheg commented Apr 29, 2022

In version 2 identifiers are escaped with prefixes like message_ or enum_.

The plan was to use raw identifiers for keywords, but not all keywords can be made raw identifiers.

So now the plan is to use _ suffix to escape everything.

@stepancheg stepancheg added the rust-protobuf-v3 Issued to be fixed to release version 3 label Apr 29, 2022
@stepancheg stepancheg mentioned this issue Apr 29, 2022
12 tasks
stepancheg added a commit that referenced this issue Apr 29, 2022
stepancheg added a commit that referenced this issue Apr 29, 2022
stepancheg added a commit that referenced this issue Apr 29, 2022
stepancheg added a commit that referenced this issue Apr 29, 2022
E. g. for message field `fn`, rust field is `fn_`, but setter should
be `set_fn`, not `set_fn_`.

Issue #618
stepancheg added a commit that referenced this issue Apr 29, 2022
stepancheg added a commit that referenced this issue Apr 29, 2022
instead of `_pb` suffix.

Issue #618
stepancheg added a commit that referenced this issue Apr 29, 2022
stepancheg added a commit that referenced this issue Apr 29, 2022
@stepancheg stepancheg changed the title Use raw identifiers for reserved words Use underscore to escape keywords Apr 29, 2022
stepancheg added a commit that referenced this issue Apr 29, 2022
akhramov pushed a commit to cognitedata/rust-protobuf that referenced this issue Jan 5, 2024
akhramov pushed a commit to cognitedata/rust-protobuf that referenced this issue Jan 5, 2024
akhramov pushed a commit to cognitedata/rust-protobuf that referenced this issue Jan 5, 2024
akhramov pushed a commit to cognitedata/rust-protobuf that referenced this issue Jan 5, 2024
akhramov pushed a commit to cognitedata/rust-protobuf that referenced this issue Jan 5, 2024
E. g. for message field `fn`, rust field is `fn_`, but setter should
be `set_fn`, not `set_fn_`.

Issue stepancheg#618
akhramov pushed a commit to cognitedata/rust-protobuf that referenced this issue Jan 5, 2024
akhramov pushed a commit to cognitedata/rust-protobuf that referenced this issue Jan 5, 2024
akhramov pushed a commit to cognitedata/rust-protobuf that referenced this issue Jan 5, 2024
akhramov pushed a commit to cognitedata/rust-protobuf that referenced this issue Jan 5, 2024
akhramov pushed a commit to cognitedata/rust-protobuf that referenced this issue Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust-protobuf-v3 Issued to be fixed to release version 3
Projects
None yet
Development

No branches or pull requests

1 participant