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

refactor: lock-file v4 #484

Merged
merged 26 commits into from
Jan 23, 2024
Merged

Conversation

baszalmstra
Copy link
Collaborator

@baszalmstra baszalmstra commented Jan 18, 2024

This completely refactors the lock-file implementation in rattler-lock significantly changing the format. Old lock-files can still be read by the current implementation.

The goal of the refactor is to allow multiple environments to be stored in the lock-file as well as significantly simplifying the format itself.

See the top-level crate documentation for more information about the design and considerations.

@ruben-arts I also added behavior to write packages non-alphabetic but in a more "human-readable" friendly style.

Note

This significantly deviates from our previous implementation loosely based on conda-lock.
The code is still able to parse conda-lock.yml files! Its just not able to output a compatible conda-lock file.
Note that this has already been the case for a long time but the differences didn't used to be so big.

Important

This PR is still in previous because I want to first test out the API in Pixi. Nonetheless, reviews are already welcome!

I also realize this is a huge change, Id be happy to walk anyone through the code on discord!

Closes #465

rattler-lock has been completely overhauled to include a new file format
that much better serves our goals. It allows storing multiple
environments and includes the complete PackageRecord information.
Copy link
Collaborator

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a quick read, and the only thing I found strange so far is a line that you didn't changed 😉

Awesome work

crates/rattler_lock/src/pypi.rs Outdated Show resolved Hide resolved
@baszalmstra baszalmstra marked this pull request as ready for review January 23, 2024 10:17
Copy link
Collaborator

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really exited for this!! Left a few questions

crates/rattler_lock/src/builder.rs Outdated Show resolved Hide resolved
crates/rattler_lock/src/builder.rs Outdated Show resolved Hide resolved
crates/rattler_lock/src/builder.rs Outdated Show resolved Hide resolved
crates/rattler_lock/src/conda.rs Show resolved Hide resolved
crates/rattler_lock/src/lib.rs Show resolved Hide resolved
crates/rattler_lock/src/pypi.rs Outdated Show resolved Hide resolved
ruben-arts

This comment was marked as duplicate.

@baszalmstra baszalmstra merged commit 0e03603 into conda:main Jan 23, 2024
13 checks passed
ruben-arts pushed a commit to prefix-dev/pixi that referenced this pull request Jan 23, 2024
Refactors pixi to make use of the changes made in
conda/rattler#484 .

This completely refactors how lock-files are checked and how they are
rebuilt.

@ruben-arts Please carefully test that lock-files are still properly
verified and updated.

Note that this does **not** add multi-env support yet. This work is just
done to integrate with multi-env capable lock-files.
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.

Consider removing unused fields (like content_hash) from lock files
2 participants