Create a preliminary internal v2 lockfile schema but enforce v1 - #412
Merged
Conversation
✅ Deploy Preview for conda-lock ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Contributor
Author
Contributor
Author
|
I'm trying to update my #410 which rebases #390 so that the previous logic is reproduced. It it much trickier than I hoped. It's more of a logic puzzle than I can solve for tonight. My goal would be to adjust #390 so that This way, lockfile conversion would work as follows:
|
2 tasks
Contributor
Author
|
I don't like having a broken |
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.
As described in #411, the merge of #389 broke parsing of lockfiles for the
conda-lock installcommand due to a schema change.In this PR I create explicit v1 and v2 schema, the v2 being preliminary. The only difference between the two is that v2 omits the
optionalfrom packages. There is no loss of information thanks to the invariantoptional = category != "main". Thus it's easy to convert between v1 and v2, and the corresponding functions are added here.The combination of #389 and this PR should be a pure refactor, as input and output are done exclusively with the v1 schema.
This sets us up to make the schema modifiable, as there are some changes I'd like to make. (RFC coming soon...)
Before I consider this to be closing for #411, I want to add tests for
conda-lock install. I merged #411 because the tests were green, despite the breakage, so I'd like to avoid this happening in the future.