-
Notifications
You must be signed in to change notification settings - Fork 121
Make enum methods values and valueOf unmappable
#470
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
Make enum methods values and valueOf unmappable
#470
Conversation
b3e3bf0 to
906a2f2
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.
Idk what this test class is doing?
enigma-swing/testProject/src/main/java/tests/quilt/issue10/TestClass.java
Outdated
Show resolved
Hide resolved
enigma-swing/testProject/src/main/java/tests/quilt/issue10/TestClass.java
Outdated
Show resolved
Hide resolved
enigma-swing/testProject/src/main/java/tests/quilt/issue10/TestClass.java
Outdated
Show resolved
Hide resolved
3dcc479 to
f811927
Compare
|
Sorry, this should have remained a draft since there were some issues in my cherry-picking. Force-pushed the rewritten commits now so that we don't have the tests in yet, I'll add those under the correct packages in a later PR |
enigma/src/main/java/cuchaz/enigma/source/cfr/EnigmaDumper.java
Outdated
Show resolved
Hide resolved
|
@liach What do you dislike about this PR? 🤔 |
|
Such preventions are quite pointless; we do't prevent renaming equals, enum entries, record components, or other overrides either |
|
Shouldn't Enigma do this though? |
|
We have cases where we rename an override chain inferable through record component names. IMO marking these gray through name proposal service would be better, especially that these names can inadvertently cause troubles due to proguard works and we wish to rename in such cases |
|
OK, I'll close this PR then and commit the constructor remap fix in a new one |
What does this do then? Enigma/enigma/src/main/java/cuchaz/enigma/EnigmaProject.java Lines 133 to 134 in c4a79cf
Also, while it's not explicitly disallowed to rename |
values and valueOf unmappable
This reverts commit c65d59c.
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.
Change is fine, this could maybe refactored to not allow remapping stuff from Java? Or maybe a larger change where we have a classpath of none re nameable libraries im not sure. Needs some discussion first if we want to do it.
Taken from QuiltMC/enigma@fe9c232, QuiltMC/enigma@1d8067c
and QuiltMC/enigma@226d5b0.Fixes #330.