Skip to content

feat: new subcommand to split lockfile #4066

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

gzm55
Copy link
Contributor

@gzm55 gzm55 commented Jul 2, 2025

Close #4015

This pr implements a new subcommand pixi workspace export split-lockfile, which splits the pixi.lock into a specified base folder. The packages of each environment and platform are written into /{platform}/{environment}.lock. The channels, solve options and pypi indexes of each environment are kept in the output files.

@gzm55
Copy link
Contributor Author

gzm55 commented Jul 4, 2025

@baszalmstra any suggestion about this pr?

@gzm55
Copy link
Contributor Author

gzm55 commented Jul 8, 2025

TRY 1 SLOW [>720.000s] pixi::integration_rust install_tests::minimal_lockfile_update_pypi

@baszalmstra there's an unrelated slow IT case timing out.

@nichmor
Copy link
Contributor

nichmor commented Jul 8, 2025

Let's also add a test for this feature

@gzm55
Copy link
Contributor Author

gzm55 commented Jul 8, 2025

Let's also add a test for this feature

OK

@ruben-arts
Copy link
Contributor

I don't get the selling point for this feature. The lockfiles cannot be used stand alone and no other tool then pixi can install them due to the pypi and source dependencies.

Could you explain why this feature will be useful to the users?

@gzm55
Copy link
Contributor Author

gzm55 commented Jul 9, 2025

I don't get the selling point for this feature. The lockfiles cannot be used stand alone and no other tool then pixi can install them due to the pypi and source dependencies.

Could you explain why this feature will be useful to the users?

@ruben-arts The rattler lockfiles format is powerful and could be standard lock file in conda ecosystem. It also evolves (conda/rattler#1214) with many new improvements. Stand alone lockfiles can integrate with other conda tools easily and explicitly. pixi and rattler can introduce many fancy features for lockfiles to build packages or run tasks, whereas the exported lean rattler lockfiles can also be loaded by other tools to describe a conda prefix precisely. Some tools are under incubation to utilize the lockfiles, e.g. conda-lockfiles and existing pixi extensions. The source dependencies may less supported by other integrating tools, but all-binary environment can be used first.

@gzm55
Copy link
Contributor Author

gzm55 commented Jul 9, 2025

Let's also add a test for this feature

@nichmor the test is added.

@Hofer-Julian
Copy link
Contributor

whereas the exported lean rattler lockfiles can also be loaded by other tools to describe a conda prefix precisely

If you are thinking about a common lock file standard, then we are definitely interested. But I don't think we should implement anything before we have a good agreement with other parties how that should look like.

@gzm55
Copy link
Contributor Author

gzm55 commented Jul 10, 2025

If you are thinking about a common lock file standard, then we are definitely interested. But I don't think we should implement anything before we have a good agreement with other parties how that should look like.

pr follows the current lock file spec by loading/building/writing lockfiles via functions from rattler, and have no change on the output format. so the output files can be read by the previous listed tools and pixi self.

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.

Support export to rattler lockfiles for selected environments
5 participants