Conversation
niwis
approved these changes
Aug 20, 2024
Contributor
niwis
left a comment
There was a problem hiding this comment.
Thanks a lot, that's a great improvement for mappings. LGTM
File mappings are more specific and should be preferred over directory mappings. As an example we have two mappings: a/ -> c/ b/file -> c/file Any change in c/ should be then result in a patch. If the change is in c/file we must make sure it is linked back to b/file, not erroneously to a/, the sorting does this. Similarly when initializing we first need to copy the a/ dir to c/ and only then copy b/file to c/file.
a78097e to
95d9ce5
Compare
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.
vendor did not handle it well when multiple files/directories were copied together into one (as is done in croc).
Fixing it involved prioritizing more specific mappings (eg file to file) over less specific ones (dir to dir) and excluding already diffed files when handling their parent directories.
Also fixes an annoying warning caused by a default configuration.
Tested
bender vendor initand one random patch withbender vendor patchin opentitan_peripherals, register_interface, redundancy_cells and croc. The resulting directories were identical to upstream so it is unlikely to break compatibility with existing configurations.It should just make it possible to use more elaborate setups without issue.