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

Fix Converter compatibility for Property Expressions #5507

Conversation

APickledWalrus
Copy link
Member

Description

Currently, addons making use of PropertyExpression will error with a NoSuchMethodError, like this one:
image
This is because these classes were made to require usage of the new Converter class. Of course, we can easily rectify this issue by having the method make use of the old Converter class. This also makes SimplePropertyExpression and Getter implement/extend (respectively) the old Converter class. This should have a minimal impact internally while allowing these addons to function. Some syntax classes have been updated so that they are using lambdas (allowing this to easily work regardless of which Converter class is required).

Since old Converter extends new Converter, Getter and SimplePropertyExpression are still both new Converters as well (they are just also old ones again too).


Target Minecraft Versions: Any
Requirements: N/A
Related Issues: N/A (reported on Discord)

To enable better compatibility with addons, this commit changes PropertyExpression, SimplePropertyExpression, and Getter to make use of the old Converter class. Impact should be minimal to none due to the nature of this method supporting lambdas (thus no specific class init is needed)
@APickledWalrus APickledWalrus added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. 2.7 Targeting a 2.7.X version release labels Mar 11, 2023
@TheLimeGlass TheLimeGlass merged commit 8b8551c into SkriptLang:master Mar 12, 2023
@APickledWalrus APickledWalrus deleted the fix/property-expression-conversion branch September 6, 2023 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.7 Targeting a 2.7.X version release bug An issue that needs to be fixed. Alternatively, a PR fixing an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants