generated from tweag/project
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
User defined mapping: add option and handling for multiple mapping files #306
Merged
mknorps
merged 5 commits into
main
from
289-user-defined-mapping-add-option-for-multiple-mapping-files
Apr 18, 2023
Merged
User defined mapping: add option and handling for multiple mapping files #306
mknorps
merged 5 commits into
main
from
289-user-defined-mapping-add-option-for-multiple-mapping-files
Apr 18, 2023
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
mknorps
force-pushed
the
289-user-defined-mapping-add-option-for-multiple-mapping-files
branch
from
April 17, 2023 11:02
a6b41a2
to
0a0546a
Compare
mknorps
changed the title
WIP 289 user defined mapping add option for multiple mapping files
User defined mapping: add option and handling for multiple mapping files
Apr 17, 2023
mknorps
requested review from
jherland and
Nour-Mws
and removed request for
jherland
April 17, 2023 11:11
jherland
approved these changes
Apr 18, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good to me. My most important question is whether we can drop the Optional
from Optional[Set[Path]]
: I think an empty set will achieve the same as None
?
Works for a single input
If there is more than one custom mapping source (config or files) the resulting custom mapping is a combination of all of them. When a key (pakcage name) that is repeated (with respect to a normalised name) is encountered, all import names are gathered in a list
mknorps
force-pushed
the
289-user-defined-mapping-add-option-for-multiple-mapping-files
branch
3 times, most recently
from
April 18, 2023 09:16
50ddda0
to
cf2fa8f
Compare
Change 'custom_mapping_file' settings option to 'Set[Path]' and remove optional. Use CustomMapping instead of Dict[str, List[str]] Simplify custom mappings accumulation drop unecessary comment Co-authored-by: Johan Herland <johan.herland@tweag.io>
mknorps
force-pushed
the
289-user-defined-mapping-add-option-for-multiple-mapping-files
branch
from
April 18, 2023 16:13
cf2fa8f
to
5762a36
Compare
mknorps
deleted the
289-user-defined-mapping-add-option-for-multiple-mapping-files
branch
April 18, 2023 16:17
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.
Extend
--custom-mapping-file
option to handle more than one mapping file.With this change, improved handling of repeated package entry in custom mapping is introduced. We use normalized package names (as they are used only for debug messages) and prepare a
CustomMapping
dictionary from all sources of the custom mapping, be it files or entries from falwtydeps config.Commits may be read one by one: