-
Notifications
You must be signed in to change notification settings - Fork 115
feat: Relative path support in LockFile
#1760
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
base: main
Are you sure you want to change the base?
Conversation
This change is intended to support relative user paths, which a current pixi client wioll convert to an absolute paths at all times. So add a new file version so that users will notice when they might end up doing that. Add basic tests for the new `v7` format: Just copy the `v6` files for now and make sure nothing breaks during incrementing the package version.
Enable the `non-pep508-extensions` feature in the ´pep508_rs` crate.
LockFileLockFile
d4f42e4 to
22feb90
Compare
|
I do not think the failed CI job is related to my change: It's about running out of space while extracting the cache. |
tdejager
left a comment
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.
Some small changes :)
|
Couple of questions for @baszalmstra and @hunger:
|
|
|
@baszalmstra any Idea why that gatekeeper is failing I tried to re-run it a bunch of times. |
|
The merge gatekeeper is just a job that fails if any other job fails. I used that to make "required" jobs based on conditions. It looks like the Rust / Linux_86_64 is failing, which is what causes Gatekeeper to fail. The linux job seems to be running out of disk space when extracting the cache (crazy..). I just removed those caches, lets see if that helps. |
No I think it makes total sense to add the base directory to the API. |
To support reading relative paths using pep508_rs, we need to provide a work directory as a base for the relative paths. Add an API to pass in such an extra directory. This complicates parsing as serde does not handle that. So aprse the relevant data into a String using serde and then post-process it to the real data values. Add a test-case for reading such a dependency.
…ile` Have a `Verbatim` struct that keeps the original serialization of string-based objects around and use that where we need to remember user provided urls or paths in addition to the canonical forms pixi uses.
22feb90 to
f112699
Compare
|
Is there anything I can do to push this forward? I do not think I can fix the Linux CI to not run out of space :-( |
|
What would really help is if you could try to integrate this in pixi! If we can show there that it solves the issue that would be great! Im also working on a lock-file update that requires a lockfile bump, Id love to combine our work. |
|
@baszalmstra isn't it integrated here? prefix-dev/pixi#4788 |
|
Ah yes! I missed that! |
|
We are going to merge this in with the other lock-file break, we'll close this branch after, don't be suprised! |
Description
Make rattler handle relative paths to pypi dependencies in the
LockFile. This helps when checking inpixi.lockfiles that reference local python packages. Instead of ending up with a machine specific path in the lock file we have a relative path that should work for all developers.This is the rattler part of prefix-dev/pixi#4680
The PR consists of several changes:
non-pep508_extensionsin thepep508_rs?crate. This is needed for it to parse relative URLs in the lock file correctlypep508_rsto parse a relative path.pep508_rsdoes turn everything into absolute paths right away, we need to keep that info somewhere.