Skip to content

PatternElement Combinations + Conflicts Test#8138

Merged
sovdeeth merged 24 commits intoSkriptLang:dev/featurefrom
Absolutionism:dev/PatternParser
Sep 21, 2025
Merged

PatternElement Combinations + Conflicts Test#8138
sovdeeth merged 24 commits intoSkriptLang:dev/featurefrom
Absolutionism:dev/PatternParser

Conversation

@Absolutionism
Copy link
Contributor

@Absolutionism Absolutionism commented Aug 19, 2025

Problem

As Skript progresses further, adding more elements and patterns, ensuring minimal pattern conflictions can become increasingly harder to maintain with each new pattern added.

Solution

Adds getAllCombinations and abstract getCombinations to PatternElement to construct all possible combinations that can match.
Adds JUnit PatternConflictsTest ensuring getAllCombinations correctly operates with manual inserted patterns and combinations.
Additionally, this JUnit will go through every single registered element and it's patterns to construct all combinations, store them and check if a combination can be used for more than one element/pattern.

Testing Completed

JUnit

Supporting Information

TODO:
Some form of exclusion if only x and y then exclude as can be seen with ExprScriptsOld and ExprScripts since only one can be usable at a time due to experiment enabling.

Categorize the elements, so patterns used in Structures don't get marked as conflictions with Expressions or Effects


Completes: none
Related: none

@Absolutionism Absolutionism changed the title Dev/pattern parser PatternParser Aug 19, 2025
Copy link
Member

@Efnilite Efnilite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing docs on all the methods. especially init should have a very clear overview of what happens. see the function rework's FunctionArgumentParser for an example

great addition 🔥

@Absolutionism Absolutionism requested a review from Efnilite August 19, 2025 16:53
@Absolutionism Absolutionism changed the title PatternParser PatternElement Combinations + Conflicts Test Aug 20, 2025
@Absolutionism Absolutionism requested a review from Efnilite August 20, 2025 00:12
@Absolutionism Absolutionism marked this pull request as ready for review August 20, 2025 00:12
@Absolutionism Absolutionism requested review from a team as code owners August 20, 2025 00:12
@Absolutionism Absolutionism requested review from UnderscoreTud and removed request for a team August 20, 2025 00:12
@Absolutionism Absolutionism added enhancement Feature request, an issue about something that could be improved, or a PR improving something. unit testing For issues/PRs related to the Skript unit testing system. needs reviews A PR that needs additional reviews labels Aug 20, 2025
@Absolutionism Absolutionism moved this to In Review in 2.13 Releases Aug 20, 2025
@Absolutionism Absolutionism requested a review from sovdeeth August 21, 2025 11:34
@Absolutionism Absolutionism requested a review from sovdeeth August 21, 2025 18:51
@Absolutionism Absolutionism requested a review from Efnilite August 23, 2025 12:43
Copy link
Member

@APickledWalrus APickledWalrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just about ready

@skriptlang-automation skriptlang-automation bot removed the needs reviews A PR that needs additional reviews label Sep 9, 2025
@skriptlang-automation skriptlang-automation bot added the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Sep 18, 2025
@github-project-automation github-project-automation bot moved this from In Review to Awaiting Merge in 2.13 Releases Sep 20, 2025
@sovdeeth sovdeeth merged commit 30edc5d into SkriptLang:dev/feature Sep 21, 2025
5 checks passed
@skriptlang-automation skriptlang-automation bot added the completed The issue has been fully resolved and the change will be in the next Skript update. label Sep 21, 2025
@github-project-automation github-project-automation bot moved this from Awaiting Merge to Done - Awaiting Release in 2.13 Releases Sep 21, 2025
@skriptlang-automation skriptlang-automation bot removed the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Sep 21, 2025
@sovdeeth sovdeeth moved this from Done - Awaiting Release to Done - Released in 2.13 Releases Oct 15, 2025
erenkarakal pushed a commit to erenkarakal/Skript that referenced this pull request Nov 26, 2025
* Create PatternConflictsTest.java

* Draft

* Update

* Update PatternParserTest.java

* Revert

* Update PatternParserTest.java

* Update PatternParserTest.java

* Filtering + Exclusions

* PatternElement Usage

* Fix TypePatternElement

* Partial Changes

* Update PatternConflictsTest.java

* Update PatternConflictsTest.java

* Update PatternConflictsTest.java

* Update PatternConflictsTest.java

* Requested Changes

* Pickles Changes
erenkarakal pushed a commit to erenkarakal/Skript that referenced this pull request Nov 26, 2025
* Create PatternConflictsTest.java

* Draft

* Update

* Update PatternParserTest.java

* Revert

* Update PatternParserTest.java

* Update PatternParserTest.java

* Filtering + Exclusions

* PatternElement Usage

* Fix TypePatternElement

* Partial Changes

* Update PatternConflictsTest.java

* Update PatternConflictsTest.java

* Update PatternConflictsTest.java

* Update PatternConflictsTest.java

* Requested Changes

* Pickles Changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. unit testing For issues/PRs related to the Skript unit testing system.

Projects

No open projects
Status: Done - Released

Development

Successfully merging this pull request may close these issues.

4 participants

Comments