-
Notifications
You must be signed in to change notification settings - Fork 277
Leave out development package out of lock file #2512
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
Comments
Hey @ernimd, There currently is no way to skip a package from being included in the lock-file. To understand the issue better, you change the version in the |
No, it's automatic versioning system with The patch version and post commit versions are changing frequently. Would like to leave out development package out of the lock file completely, it's not a dependency, but rather the project itself. Ofc I could just do |
Maybe keeping it in the lockfile, but without version or sha256 info would be better? |
We currently add this to run avoid running a rebuild. We could maybe only rebuild on |
Not sure if got fully what you're saying. Even on |
I'm sorry, let me elaborate. To get rid of the versions we would need to change the environment validation logic. Because we currently use these on every pixi command to validate the proper existence of the lock-file and environment. When we don't have these versions we would need to reinstall on every command if we can't figure the version information out from the lock-file. So to avoid that we would need to do something like, only revalidate the environment on |
We are running into this issue with https://github.com/open-MSS/MSS as well: generally, changes to the project do not cause a change in the lock file, but changes to setup.py require a lock file change. This means that PRs touching e.g. setup.py cause CI to fail with a "lock-file not up-to-date with the workspace" error. IMO editable installations should not include version information or a hash, rather they should mean "always use the current (development) version at that path". The hash and version are misleading anyway: with MSS changes to files other than setup.cfg, setup.py, or pyproject.toml do not necessitate a lock file update, even if that change is to mslib/version.py, meaning the version information in the lock file is no longer correct. |
This is quite frustrating that simply any change to I think a partial workaround for me is to separate out the pixi config to It seems straightforward that the
The version on the other hand is a different issue... |
I'd also argue for leaving out the sha256 hash for editable dependencies. The uv example shown by @cas-- above shows that nicely. About versions, uv had to face a similar issue here astral-sh/uv#7533 which might be a starting point. |
To be more specific, when investigating that thread, this seemed to be the PR that changed things for dynamic versions: astral-sh/uv#10622 |
I'm running into this also as I have dynamic versioning with Not storing the hash, or using a magic, static, made-up hash for editable installs sounds like a good option. I'm seeing this behavior in a |
Problem description
I'm using
pixi
as primary package manager for development of Python packages. It's nice to get an editable installation out of the box, once the environment is set up, thus I add this in apyproject.toml
:One thing that's annoying about this, that lock file gets updated with every single commit (at least in my versioning setup, where each commit is marked with post:
w.y.z.postx
). Would be nice to have an option to leave this package out of lock file, sopixi.lock
doesn't have to be committed to a repo every single commit. Something along the lines:Or there is another way to achieve this ?
Thanks !
The text was updated successfully, but these errors were encountered: