bug: Kotlin Codegen fails to generate Code when field name `package` is present
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 217
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
Expected behavior
I was attempting to generate a client for the GitHub GraphQL API: https://docs.github.com/en/graphql/overview/public-schema
Unfortunately, it has a few fields name package and one type called Package thus causing an exception to get thrown when the code is generated
Actual behavior
Currently, the Gradle build fails with an error that package is an invalid name
Steps to reproduce
Note: A test case would be highly appreciated, but we understand that's not always possible
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by reproducing the Gradle client generation with the GitHub GraphQL public schema, then locate Kotlin codegen handling for the package field and Package type. Done means generation completes successfully for that schema, with a regression test if the project’s test structure supports it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100