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

PoC: Add syntax for escaped field selectors. #1002

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jnthntatum
Copy link
Collaborator

Introduces syntax for escaped fields that are not normally syntactically legal field selections with backticks.

This PR is limited to fields, but would also consider adding for namespaced names (e.g. in.example.Foo)

DO NOT MERGE

Introduces syntax for escaped fields that are not normally
syntactically legal field selections with backticks.

This PR is limited to fields, but would also consider adding for namespaced
names (e.g. `in.example.Foo`)
Copy link
Collaborator

@TristonianJones TristonianJones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this as a first approach at relaxing the syntax to support escapes need for fields named after reserved words and for supporting proto extension fields natively.

The type-checker should continue to validate field names which is great, and there's no weirdness with invalid function names, just escaping on the namespaces. It seems to help satisfy a common pain point. It might not solve top-level .in domains within namespace names, but it's a great start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants