-
Notifications
You must be signed in to change notification settings - Fork 273
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
0.12: fix: detect overlapping targetPath
in generateFiles
#4958
Merged
Conversation
This file contains 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
Since now, have multiple criteria to find different module overlaps. Each one can be represented with its own matching function.
4faf9a3
to
65d52ae
Compare
e00ba0b
to
11c200a
Compare
To render different kinds of overlaps properly.
11c200a
to
158c3c4
Compare
Closure-free lambdas can be declared only once.
targetPath
in generateFiles
Also renamed it to `makePathOverlapErrors`.
DRY and more types for safety.
bde0519
to
350fcf3
Compare
Print the list of intersecting modules.
Use explicit types for expected values to ensure that all required fields are set.
Because its type is `ModuleConfig`, not `GardenModule`.
Co-authored-by: Thorarinn Sigurdsson <[email protected]>
Co-authored-by: Thorarinn Sigurdsson <[email protected]>
Also intorduced parameter object for `ModuleOverlapFinder`. Additionally, made lambdas closure-free.
No need to traverse all possible overlap types.
a653814
to
c4d5241
Compare
0f77135
to
56f6c0f
Compare
thsig
previously approved these changes
Aug 22, 2023
Now module overlap detector prints more details.
The module overlap lists are constructed as sorted ones.
thsig
approved these changes
Aug 22, 2023
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.
What this PR does / why we need it:
This PR implements some additional rules to the module overlap detection logic.
Now, if any modules have the same resolved
generateFiles[].targetPath
, a configuration error will be thrown.Otherwise, the same target file will be overwritten multiple times with different contents.
Which issue(s) this PR fixes:
Addresses #4921 for
0.12
.This PR must be ported to the
main
branch to fix the issue above in0.13
.Special notes for your reviewer:
It might be easier to review it commit-by-commit. Some refactoring was done in separate commits.
All commits will be squashed before merging.