-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Revert compatibility break with NodePath and ConfigurationTransformation #105
Conversation
@@ -37,6 +37,6 @@ | |||
* @return A modified path, or null if the path is to stay the same | |||
*/ | |||
@Nullable | |||
Object[] visitPath(@NonNull NodePath inputPath, @NonNull ConfigurationNode valueAtPath); | |||
Object[] visitPath(ConfigurationTransformation.@NonNull NodePath inputPath, @NonNull ConfigurationNode valueAtPath); |
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.
@NonNull ConfigurationTransformation.NodePath
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.
Not valid:
The only other way to do it is to add an import statement for
import ninja.leaping.configurate.transformation.ConfigurationTransformation.NodePath
and then have
Object[] visitPath(@NonNull NodePath inputPath, @NonNull ConfigurationNode valueAtPath);
but I thought that was unclear, as an interface with the same name already exists in the same package.
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.
That's not valid? Huh... Java surprises me every day.
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.
To comment: the signature of this method will still have changed slightly (it was SimpleConfigurationTransformation.NodePath
), but it actually points to the same class as NodePath
's outer class is ConfigurationTransformation
, which is the superclass of SimpleConfigurationTransformation
. The nuance was likely what caused the confusion with it not being accessible in the previous version - it looked inaccessible from the code that was written, but it actually wasn't.
I checked the bytecode from Nucleus which was compiled using configurate 3.2, it references ConfigurationTransformation.NodePath
not SimpleConfigurationTransformation.NodePath
- so this change should be fine.
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.
ConfigurationTransformation.@NonNull NodePath
Any stylistic comments aside, I think this looks fine, given the comment I gave before. @kashike It's probably in our interest to get this wrapped up and pushed out of the door sooner rather than later. I'll let you pull the lever if you're happy with this, as I said in my comment, the bytecode in Nucleus references |
Reverts some breakages introduced in #92