Skip to content
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

Subset lockfile as a separately cacheable process before building any PEX #20994

Closed
wants to merge 3 commits into from

Conversation

huonw
Copy link
Contributor

@huonw huonw commented Jun 4, 2024

Currently just experimenting.

Intention is to make the input digests to PEX builds more precise.

Fixes #15694

@huonw
Copy link
Contributor Author

huonw commented Jun 5, 2024

Limitations:

  • currently pex3 lock export-subset seems to only export for specific platforms (current one by default, I imagine), which seems annoyingly finnicky: can I convince it to just export everything it knows about? It's "just" text manipulation, I believe? Potentially loses information, i.e. we'll be saying "install this library" if it's a potential dependency that's not relevant to the platform in question.
  • I don't think a requirements.txt file can support both PyPI requirements with --hash and VCS requirements, e.g.
pytest @ git+https://github.com/pytest-dev/pytest@8.2.2
numpy==1.26.4 \
  --hash=sha256:52b8b60467cd7dd1e9ed082188b4e6bb35aa5cdd01777621a1658910745b90be
Collecting pytest@ git+https://github.com/pytest-dev/pytest@8.2.2 (from -r requirements.txt (line 1))
ERROR: Can't verify hashes for these requirements because we don't have a way to hash version control repositories:
    pytest@ git+https://github.com/pytest-dev/pytest@8.2.2 from git+https://github.com/pytest-dev/pytest@8.2.2 (from -r requirements.txt (line 1))

So. iteration required.

@huonw
Copy link
Contributor Author

huonw commented Jun 5, 2024

Closing for now, definitely needs pex-tool/pex#2411

@huonw huonw closed this Jun 5, 2024
@huonw huonw deleted the huonw/15694-export-subset branch June 5, 2024 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pants triggering a rebuild even if dev-dependency updated
1 participant