check for conflicting RUL2 overrides#494
Merged
Merged
Conversation
11 tasks
This is the initial run of:
sbt conflictingOverridesCheck --update
It tags all conflicting overrides with an inline comment. It does not
remove or modify any functionality.
dd7fbda to
2bb9b49
Compare
Collaborator
Author
|
This PR shares a commit with #493, but does not depend on it. In fact, this PR does not alter the functionality of any RUL2 code (only comments), so can be merged as is. |
Member
|
I'd be in favor of merging this in now. I imagine it will cause merge conflict with #493 though. Is that going to be a bit of a mess, or is it manageable? |
Collaborator
Author
|
It should be manageable if we merge this PR now. Then I'll just rebase #493 and re-run the scripts from scratch there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/RUL2in place by tagging all lines with; conflicting-overridewhere 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 conflictingOverridesCheckto check all code in
Controller/RUL2for 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: