-
Notifications
You must be signed in to change notification settings - Fork 37
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
Fix generated Proguard rules not using valid fully qualified name #626
Merged
ZacSweers
merged 7 commits into
ZacSweers:main
from
mhelder:issue-624/malformed-proguard-rules
Jun 28, 2024
Merged
Fix generated Proguard rules not using valid fully qualified name #626
ZacSweers
merged 7 commits into
ZacSweers:main
from
mhelder:issue-624/malformed-proguard-rules
Jun 28, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZacSweers
approved these changes
Jun 27, 2024
You need to run spotless locally - |
Done! |
Unfortunately looks like there's failing tests |
Ah sorry, my bad, I overlooked one existing test. Have pushed a fix, and this time ran the full test suite to make sure everything passes. |
Can you push one more (empty) commit to re-trigger CI? Looks like github had an outage when you pushed |
ZacSweers
reviewed
Jun 28, 2024
...rule-gen/src/main/kotlin/dev/zacsweers/moshix/proguardgen/MoshiProguardGenSymbolProcessor.kt
Outdated
Show resolved
Hide resolved
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #624.
KotlinPoet's ClassName.toString() does not yield a valid fully qualified path for e.g. nested classes, or when backticks are used in the package name to escape reserved keywords. Instead,
ClassName.reflectionName()
should be used for that.☝️ This is the only functional change.
The other changes in this PR are:
reflectionName()
was used. 👌data
in package #624. I just cherry picked 3 reserved keywords per category. These could be extended to include more, or reduced to a single keyword. It's currently not optimised at all, as it simply repeats the compile -> validation cycle 3*3 times. (Compiling once would probably be more efficient, but also harder to do assertions on the output)Thanks to @sav007 for the hint in #415 (comment)