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

Inconsistency in package declaration and actual filessytem folder #126

Closed
simonegiacomelli opened this issue Apr 3, 2024 · 3 comments
Closed

Comments

@simonegiacomelli
Copy link
Contributor

Hello! Thank you for this great project! It allowed us to automate a very important piece of our i18n toolchain (more details below).

I noticed there is a discrepancy between the declared package:
org.jetbrains.kotlin.spec.grammar
and the actual generated source folder by anltr:
File("${project.rootDir}/grammar/src/main/java/org/jetbrains/kotlin/spec/grammar/parser")

You can notice that the filesystem path has an additional parser at the end.
This are the pertinent lines of build.gradle.kts

We are using this project to parse kotlin files to automatically generate i18n files from constants; in a similar way to the gnu gettext.
What we do in our build files, after cloning this repo, is patching the above mentioned build file to reflect the actual path.
Then we can proceed to parse all our kotlin sources in order to collect all string constants (that matches the gettext/i18n pattern).

I can provide a pull request for to fix this.
It is a small change but I don't know if it will break some of your tests or scripts down the line.

Thanks!

@ice-phoenix
Copy link
Contributor

Hi mate, thanks for finding this inconsistency! I do not think we actually rely on the .../grammar/parser path anywhere, and it would be relatively easy to check. If you could do the PR, we'll take a look. Thanks!

simonegiacomelli added a commit to simonegiacomelli/kotlin-spec that referenced this issue Apr 3, 2024
@simonegiacomelli
Copy link
Contributor Author

I just created the pull request #127

ice-phoenix added a commit that referenced this issue Apr 5, 2024
removed `parser` directory to comply to the java package definition #126
@ice-phoenix
Copy link
Contributor

Thanks for your contribution, looks like the change does not break anything 👍

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

No branches or pull requests

2 participants