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

Deprecate Checker and replace with Java's Predicate. #6663

Conversation

Moderocky
Copy link
Member

Description

Replaces all uses of the pointless checker class with Java's predicate.

This is technically a breaking change: if something implements Expression directly (rather than one of its common subclasses, e.g. SimpleExpression, PropertyExpression) then it will have to change its Checker methods to Predicate methods.

To preserve compatibility everywhere else, the deprecated Checker now extends Predicate and forwards the method call itself, so addons can still feed old Checkers into the new Predicate arguments.


Target Minecraft Versions: any
Requirements: none
Related Issues: none

@Moderocky Moderocky added breaking changes Pull or feature requests that contain breaking changes (API, syntax, etc.) housekeeping Housekeeping-related issue or task. labels May 8, 2024
@Moderocky Moderocky merged commit ca1e8e5 into SkriptLang:feature/deprecate-outdated-utils May 8, 2024
5 checks passed
@Moderocky Moderocky deleted the replace-checker-predicate branch May 8, 2024 12:05
Moderocky added a commit that referenced this pull request May 30, 2024
* Make checker a Java predicate.

* Deprecate unused Njol predicate for removal.

* Make checker extensions use predicate directly.

* Remove checker from expression.

* Remove checker from utils.

* Deprecate Checker for removal.

* Abstract checker to predicate from simple syntax

* Remove remaining uses of checker.
Moderocky added a commit that referenced this pull request Jan 1, 2025
* Make checker a Java predicate.

* Deprecate unused Njol predicate for removal.

* Make checker extensions use predicate directly.

* Remove checker from expression.

* Remove checker from utils.

* Deprecate Checker for removal.

* Abstract checker to predicate from simple syntax

* Remove remaining uses of checker.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking changes Pull or feature requests that contain breaking changes (API, syntax, etc.) housekeeping Housekeeping-related issue or task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant