feat: switch to compressed mapping#1335
Merged
ruben-arts merged 16 commits intoprefix-dev:mainfrom May 16, 2024
Merged
Conversation
tdejager
requested changes
May 14, 2024
Comment on lines
169
to
171
| if let Some(mapped_channel) = custom_mapping.get(&record.channel) { | ||
| if let Some(mapped_name) = mapped_channel.get(record.package_record.name.as_normalized()) { | ||
| if let Some(name) = mapped_name { |
Contributor
There was a problem hiding this comment.
It think you can use an if-let chain for this: rust-lang/rust#88642. Not sure, have not used it yet.
Contributor
Author
There was a problem hiding this comment.
it is saying that ``let expressions in this position are unstable
rust-lang/rust#53667
tdejager
approved these changes
May 15, 2024
Contributor
|
LGTM @ruben-arts could you give it a final test tomorrow? |
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.
Closes: #710
We add additional compressed mapping https://github.com/prefix-dev/parselmouth/blob/main/files/compressed_mapping.json, where we will store conda_name to optional pypi_name. Example: pandoc: null - this means that we know for sure that it is not a python package.
Assumption logic that conda package is python package is moved from package_identifier https://github.com/prefix-dev/pixi/pull/1335/files#diff-619b990b7fea5963a06a6665a62b7ab409a9e6fe51cc122fa285129f7518804eL46 .
This means that we always record all purls. If we don't have a conda name yet, we record a purl in this format:
pkg:pypi/boltons?source=conda-forge-mappingthis will allow us to differentiate based on user lockfile what purl was used.