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

Local constant unpicking scope #12

Open
liach opened this issue Apr 8, 2021 · 0 comments
Open

Local constant unpicking scope #12

liach opened this issue Apr 8, 2021 · 0 comments

Comments

@liach
Copy link

liach commented Apr 8, 2021

Currently, it seems that unpick handles constant unpicking globally. This isn't bad as things like nbt types or world event ids indeed are accessed pretty much exclusively with constant values.

However, there are other more delicate cases, such as a constant (used as some easily toggled preconfigured value) for max nbt size from a private static field. Such constants currently are replaced by targetting all calls to a specific method, but this is a waste of resource as the constant usage is usually restricted to within one class, or even 1 method.

Long story short, we just want a way to specify that a constant usage is restricted to one method/class than the whole classpath in order to avoid inadvertent bugs.

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

1 participant