-
Notifications
You must be signed in to change notification settings - Fork 107
fix: allow Kotlin generators to emit fields named '_' #880
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
base: master
Are you sure you want to change the base?
Conversation
4be2a1a to
f02de02
Compare
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.
This looks good, thanks @cnaples79! One minor comment below.
...en-core/src/main/kotlin/com/netflix/graphql/dgs/codegen/generators/kotlin/KotlinPoetUtils.kt
Show resolved
Hide resolved
|
Thanks for spotting that @sjohnr I wired the helper into |
|
|
||
| object ReservedKeywordFilter { | ||
| val filterInvalidNames: (NamedNode<*>) -> Boolean = { it.name != "_" } | ||
| val filterInvalidNames: (NamedNode<*>) -> Boolean = { true } |
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'm wondering if we should just remove this completely now that it's basically a no-op.
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.
@jiholee17 do you want to take a look at removing this filter after we merge this?
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.
sure, I can take a look
|
@cnaples79 There are test failures, can you look into those? |
|
@cnaples79 just checking in if you were able to look at the test failures? It looks as though fields are now generating with a |
Summary
_map to legal Kotlin membersRationale
_Changes
_Fixes #848