check for conflicting RUL2 overrides #494
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a script for detecting conflicting RUL2 overrides, and runs the script continually as part of the GH actions workflow.
There are two modes of operation:
1.
to update the files in
Controller/RUL2
in place by tagging all lines with; conflicting-override
where conflicts are found. The tag is removed from lines that are not conflicting anymore. (The first rule in a pair of conflicts is never tagged, as it is the one that will have an effect in the game, following the load order semantics of the game and the controller compiler.)This PR contains the results of running the above command once, thereby tagging conflicts in the entire repository (about 96k lines). Having these tags as inline comments directly in the RUL2 files helps us resolve these conflicts whenever we work on related functionality in the RUL2 files.
2.
SBT_OPTS="-Xmx2G" sbt -no-color conflictingOverridesCheck
to check all code in
Controller/RUL2
for new conflicting overrides (that are not tagged yet). This is executed as part of the GH actions workflow, which helps us avoid introducing new conflicts moving forward. The GH action workflow will indicate a failure if a future commit introduces new conflicts.Sample output: