Skip to content
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
merged 49 commits into from
Aug 22, 2023

Conversation

vvagaytsev
Copy link
Collaborator

@vvagaytsev vvagaytsev commented Aug 18, 2023

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 in 0.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.

@vvagaytsev vvagaytsev changed the base branch from main to 0.12 August 18, 2023 07:49
Since now, have multiple criteria to find different module overlaps. Each one can be represented with its own matching function.
@vvagaytsev vvagaytsev force-pushed the 0.12-fix-generateFiles-overlap branch from 4faf9a3 to 65d52ae Compare August 18, 2023 08:00
@vvagaytsev vvagaytsev force-pushed the 0.12-fix-generateFiles-overlap branch from e00ba0b to 11c200a Compare August 18, 2023 09:36
To render different kinds of overlaps properly.
@vvagaytsev vvagaytsev force-pushed the 0.12-fix-generateFiles-overlap branch from 11c200a to 158c3c4 Compare August 18, 2023 10:09
@vvagaytsev vvagaytsev changed the title 0.12 fix generate files overlap fix: detect overlapping targetPath in generateFiles Aug 18, 2023
@vvagaytsev vvagaytsev force-pushed the 0.12-fix-generateFiles-overlap branch from bde0519 to 350fcf3 Compare August 18, 2023 12:15
vvagaytsev and others added 3 commits August 21, 2023 16:05
Co-authored-by: Thorarinn Sigurdsson <[email protected]>
Co-authored-by: Thorarinn Sigurdsson <[email protected]>
@vvagaytsev vvagaytsev marked this pull request as draft August 21, 2023 15:37
@vvagaytsev vvagaytsev force-pushed the 0.12-fix-generateFiles-overlap branch from a653814 to c4d5241 Compare August 22, 2023 09:47
@vvagaytsev vvagaytsev force-pushed the 0.12-fix-generateFiles-overlap branch from 0f77135 to 56f6c0f Compare August 22, 2023 10:02
@vvagaytsev vvagaytsev marked this pull request as ready for review August 22, 2023 10:02
@vvagaytsev vvagaytsev requested a review from thsig August 22, 2023 10:03
thsig
thsig previously approved these changes Aug 22, 2023
Now module overlap detector prints more details.
The module overlap lists are constructed as sorted ones.
@vvagaytsev vvagaytsev merged commit 34eb11a into 0.12 Aug 22, 2023
@vvagaytsev vvagaytsev deleted the 0.12-fix-generateFiles-overlap branch August 22, 2023 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants