Skip to content

Improve default comparator resolution#7287

Merged
sovdeeth merged 4 commits into
SkriptLang:dev/featurefrom
APickledWalrus:patch/same-classinfo-comparisons
Mar 21, 2025
Merged

Improve default comparator resolution#7287
sovdeeth merged 4 commits into
SkriptLang:dev/featurefrom
APickledWalrus:patch/same-classinfo-comparisons

Conversation

@APickledWalrus
Copy link
Copy Markdown
Member

Description

This PR aims to fix the root issue that motivated PRs such as #7251. I have not reverted those changes, as it does not hurt to register the comparator directly. This needs further testing, but it should avoid the issues of allowing comparisons of unrelated classes that happen to share an interface (e.g. PersistentDataHolders).


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

@APickledWalrus APickledWalrus added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. needs testing Needs testing to determine current status or issue validity, or for WIP feature pulls. labels Dec 19, 2024
@abandonedaccount6235
Copy link
Copy Markdown
Contributor

should we still retain the original check too? can we add a test?

@APickledWalrus
Copy link
Copy Markdown
Member Author

should we still retain the original check too? can we add a test?

i'm not sure the original check ended up doing much (hence the need for this PR). if there were any cases where it was, they should still work with this PR, just with the classinfo resolution instead.
as for a test, the PR I mentioned in the description (7251) resolves the existing occurrences of this issue, so I'm not sure I could test it without reverting those changes.

@sovdeeth sovdeeth added the 2.10 label Dec 21, 2024
@sovdeeth sovdeeth added the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Jan 1, 2025
@APickledWalrus APickledWalrus added the don't merge me !! For pull requests that should not be merged due to some outstanding dispute, conflict or dependency. label Jan 1, 2025
@sovdeeth
Copy link
Copy Markdown
Member

@APickledWalrus what's the state of this?

@APickledWalrus APickledWalrus added 2.11 and removed don't merge me !! For pull requests that should not be merged due to some outstanding dispute, conflict or dependency. 2.10 labels Mar 19, 2025
@APickledWalrus
Copy link
Copy Markdown
Member Author

@APickledWalrus what's the state of this?

Looking over it, it should be fine to merge. I can't imagine this would cause any issues (famous last words? 🙂).

@sovdeeth sovdeeth removed the needs testing Needs testing to determine current status or issue validity, or for WIP feature pulls. label Mar 21, 2025
@sovdeeth sovdeeth requested a review from a team as a code owner March 21, 2025 19:35
@sovdeeth sovdeeth requested review from UnderscoreTud and removed request for a team March 21, 2025 19:35
@sovdeeth sovdeeth merged commit 4e791a2 into SkriptLang:dev/feature Mar 21, 2025
@APickledWalrus APickledWalrus mentioned this pull request Jun 6, 2025
erenkarakal pushed a commit to erenkarakal/Skript that referenced this pull request Nov 26, 2025
Comparators: Compare CI rather than Class for last resort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants