feat: Add the ability to skip install of local source dependencies#3092
feat: Add the ability to skip install of local source dependencies#3092tdejager merged 26 commits intoprefix-dev:mainfrom
Conversation
ruben-arts
left a comment
There was a problem hiding this comment.
Thanks @olivier-lacroix, would you be able to add a test to validate that this works for both conda and PyPI path dependencies. And add the CLI documentation?
Can do yes :-) |
|
@ruben-arts what sort of test(s) do you think would be best? unit test(s) and/or integration tests? |
|
For Pypi you might use the |
|
@ruben-arts integration test added. Let me know what you think. |
66caae2 to
9a7c9df
Compare
d0391b1 to
5965f12
Compare
|
Yeah you are right that should be fine :) only skipping the folders then, I
suppose. You would still want to install sdists from paths and direct urls
right? Or do you want to skip those as well with the flag set?
…On Tue, 18 Feb 2025 at 22:30, Olivier Lacroix ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/lock_file/update.rs
<#3092 (comment)>:
> @@ -483,6 +498,10 @@ impl<'p> LockFileDerivedData<'p> {
Ok(locked_env
.conda_packages(platform)
+ .map(|packages| {
+ packages
+ .filter(|p| !no_path_dependencies || matches!(p.location(), UrlOrPath::Url(_)))
@tdejager <https://github.com/tdejager> would detecting if the path is a
folder or not work?
—
Reply to this email directly, view it on GitHub
<#3092 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADF4XRTROOCA7B45NFCVQD2QORADAVCNFSM6AAAAABWYRQH5OVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMMRVGA3TMMZXGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I guess so. the intent is really to skip packages that are being developed. Quick one, is there a straightforward way to know if a |
I think |
0d5875e to
38fdf94
Compare
38fdf94 to
98bc642
Compare
That'd be nice, but this is available in the |
|
Alright, @tdejager @ruben-arts this PR is about ready to be merged I think. @tdejager , a I was not 100% happy with the flag name |
|
Hey @olivier-lacroix, @ruben-arts and myself have been discussing this PR offline just now, and we wanted to report back. So while we do think the idea is good there are a couple of things, also because of my suggestion that do not work out. So supposing you still want to skip development dependencies:
Additionally, @ruben-arts and I discussed that we think that a general We are really sorry about the tardiness regarding this PR, and totally understand that it would be to much work to change this so happy to take this over from you if you do not want to make the change. |
bf06ab9 to
f4722e5
Compare
|
Alright, I
this PR should be good to go I think @tdejager |
tdejager
left a comment
There was a problem hiding this comment.
Nice! User tested it a bit and it all seems to work. One final thing I would like to see, if thats possible is that we give a warning and do not change the installation method if a non-existing name has been added.
Now currently if we make a typo - z in clickz:
pixi i --frozen --skip clickz
✔ The default environment has been installed excluding clickz.
Would be better if a tracing warn was printed and the excluding is removed.
Thanks!
|
Ok @tdejager . will do! |
|
@tdejager hum, this isn't as straightforward as I thought 😓. My plan was to bubble up the call stack the packages that were actually skipped and report on that; but, if/when the cache is hit, we can't know this... any idea? |
|
Would you be able to check the package names that are locked, even though that does not change we should have access about that. And I guess we don't even need to bubble up anymore. |
|
Alright, hopefully getting there @tdejager 😅 . I have:
Let me know what you think! |
tdejager
left a comment
There was a problem hiding this comment.
Looks good to me @olivier-lacroix, let's merge when the CI passes. As always, great work!
|
@pavelzw might be worth it to update the docker documentation, this might be useful for setting up correct layering. |
|
@ruben-arts this PR requires your approval to be merged. |
ruben-arts
left a comment
There was a problem hiding this comment.
Thanks @olivier-lacroix !
Work around the circular dependency between pixi lock files and dynamic git-based versioning (versioningit). The issue: - Lock file contains version computed from git state - Committing lock file changes git state → version mismatch - CI with --locked fails because versions don't match Solution: Use pixi's --skip flag (added in v0.51.0) to skip the local editable package during locked install, then install it separately with pip. This preserves lock file integrity for all external deps while allowing the local package version to float. Also added documentation in README explaining the issue and solution for future reference. See: prefix-dev/pixi#3092 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes #1652
This PR implements an additional
--skipargument forpixi install, that will skip installation of packagesAs this argument is intended to be used in cases where these local dependencies may be absent, we do not want to update the lockfile, and the use of
--skiprequires the "--frozen" argument.With this PR, a dockerfile using pixi may look like