-
Notifications
You must be signed in to change notification settings - Fork 410
fix: preserve branch reference #5215
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
fix: preserve branch reference #5215
Conversation
|
This will still not fix the lockfile if it's out of date: [workspace]
channels = ["conda-forge"]
platforms = ["linux-64", "osx-arm64"]
[dependencies]
python = ">=3.14.2,<3.15"
[pypi-dependencies]
svgdigitizer = {git = "https://github.com/echemdb/svgdigitizer.git"}
ec-tools = {git = "https://github.com/echemdb/ec-tools.git", branch = "main"}Run # Now remove main
ec-tools = {git = "https://github.com/echemdb/ec-tools.git"}Run # Now add main back
ec-tools = {git = "https://github.com/echemdb/ec-tools.git", branch = "main"}Run |
ruben-arts
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.
It doesn't clean up when switching from without main to with main in the spec.
|
Now it fixes the issue when switching the branch, but there is still some weird behavior when using It always adds the ec-tools = {git = "https://github.com/echemdb/ec-tools.git"} - pypi: git+https://github.com/echemdb/ec-tools.git?rev=693f4bef9243d06849cd807e866ed03562d30bb8#693f4bef9243d06849cd807e866ed03562d30bb8If you change the ec-tools = {git = "https://github.com/echemdb/ec-tools.git", rev = "main"}
- pypi: git+https://github.com/echemdb/ec-tools.git?rev=main#693f4bef9243d06849cd807e866ed03562d30bb8now removing the ec-tools = {git = "https://github.com/echemdb/ec-tools.git"}
- pypi: git+https://github.com/echemdb/ec-tools.git?rev=main#693f4bef9243d06849cd807e866ed03562d30bb8 |
…om manifest
When a user specifies `rev = "main"` in pixi.toml and later removes it,
the lockfile should be invalidated and re-resolved. Previously, any
`Rev(_)` in the lockfile was treated as satisfiable when the manifest
had no explicit rev (DefaultBranch). This was incorrect because
`Rev("main")` is a named reference, not a specific commit hash.
Now the satisfiability check distinguishes between:
- `Rev(full_commit_hash)` → satisfiable (specific commit is still valid)
- `Rev(non_hash)` like "main" → NOT satisfiable, triggers re-resolve
Fixes the issue reported by Ruben in PR #5215.
|
Please fill out the AI section :) |
|
Can you please comment and resolve rubens suggestions? :) |
|
tested all use-cases that are mentioned in the PR ( also between rev <-> tag ). Works as expected. |
Description
Another look at #5187
Fixes #5185
How Has This Been Tested?
AI Disclosure
Tools: Claude
Checklist:
schema/model.py.