Skip to content

Conversation

@KedoKudo
Copy link
Member

@KedoKudo KedoKudo commented Jan 1, 2026

Summary

Work around the circular dependency between pixi lock files and dynamic git-based versioning (versioningit).

The Problem:

  • Lock file contains version computed from git state (e.g., 0.2.0.dev291+g<commit_hash>)
  • Committing lock file changes git state → new commit hash → new version
  • CI with --locked fails because versions don't match
  • This is a chicken-and-egg problem: you cannot commit a lock file that references its own commit

The 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:

- uses: prefix-dev/[email protected]
  with:
    run-install: false

- run: pixi install --frozen --skip ${{ env.PKG_NAME }}

- run: pixi run pip install --no-deps -e .

This preserves lock file integrity for all external dependencies while allowing the local package version to float.

Changes:

  • Updated .github/workflows/test_and_deploy.yaml with the workaround for all jobs
  • Added comprehensive documentation in README.md under "Known issues" explaining the problem and solution

References

  • Pixi PR #3092: Add --skip flag
  • This is a known issue affecting all lock file-based package managers (pixi, poetry, pdm, uv) when combined with dynamic versioning tools

Test plan

  • CI passes with the new workflow
  • Verify the workaround is applied to all relevant jobs (tests, conda-build, publish, pypi-publish)

🤖 Generated with Claude Code

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 <[email protected]>
@KedoKudo KedoKudo self-assigned this Jan 1, 2026
Copy link
Member

@peterfpeterson peterfpeterson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can skip installing altogether for the conda package and upload conda package jobs

Copy link
Member

@peterfpeterson peterfpeterson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand better now. Thanks

@peterfpeterson peterfpeterson merged commit c18ede2 into main Jan 5, 2026
6 checks passed
@peterfpeterson peterfpeterson deleted the fix/dynamic-versioning-ci-workaround branch January 5, 2026 18:26
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.

3 participants