-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
PEX files are directories instead of files #14980
Comments
It sounds like the default value of the |
I got distracted by another issue for which we only have an internal repro, so am looking at that first. I've tagged this for 2.11.x. |
Some research (The obvious likely commit is #14944): At the commit before: pants/src/python/pants/backend/python/util_rules/pex.py Lines 497 to 502 in 9d6a095
And, higher up: pants/src/python/pants/backend/python/util_rules/pex.py Lines 413 to 415 in 9d6a095
It looks like that leads to this new code in #14944: @thejcannon & @Eric-Arellano I'll defer to you two to dive further on a fix for this and move on to triaging other issues. If I clear my deck I'll circle back and take a stab if neither of you have. |
This will likely be affected by #14991 as well, so maybe I should take it back on. Thanks John. |
…build#14980 and pantsbuild#13117. [ci skip-rust] [ci skip-build-wheels]
…15014) As reported in #14980 and #14991: 1) the default layout of non-internal PEXes changed to `PACKED`, and 2) the PEX-repository subsetting optimization was disabled for manual or poetry lockfiles. This change fixes those issues, and adds a test of the `pex_from_targets` codepath which decides which resolution strategy to use. But it also fairly significantly refactors the `PexRequest` consumption code to improve typesafety. In particular: * Replaces the `is_all_constraints_resolve` special case with explicitly specified `PexLayout`s for those `PexRequests` (which would have been harder at the time when the special case was originally added, since `PexRequest.layout` didn't exist yet). * Moves lockfile header parsing and PEX-native-detection into a `@rule` which produces a `LoadedLockfile`. * Moves "subsetting of a lockfile or a repository PEX" to the `PexRequirements.from_subset` field, which takes a `LoadedLockfile` and asserts (not worth introducing another type yet probably) that the lockfile is PEX-native. * Move the requirements which used to be attached to the `Lockfile`/`LockfileContents` off onto an `PexRequest.requirements = EntireLockfile` case, to assert that they are optional, and only used for metadata validation (rather than subsetting). Fixes #14980 and fixes #14991.
…antsbuild#15014) As reported in pantsbuild#14980 and pantsbuild#14991: 1) the default layout of non-internal PEXes changed to `PACKED`, and 2) the PEX-repository subsetting optimization was disabled for manual or poetry lockfiles. This change fixes those issues, and adds a test of the `pex_from_targets` codepath which decides which resolution strategy to use. But it also fairly significantly refactors the `PexRequest` consumption code to improve typesafety. In particular: * Replaces the `is_all_constraints_resolve` special case with explicitly specified `PexLayout`s for those `PexRequests` (which would have been harder at the time when the special case was originally added, since `PexRequest.layout` didn't exist yet). * Moves lockfile header parsing and PEX-native-detection into a `@rule` which produces a `LoadedLockfile`. * Moves "subsetting of a lockfile or a repository PEX" to the `PexRequirements.from_subset` field, which takes a `LoadedLockfile` and asserts (not worth introducing another type yet probably) that the lockfile is PEX-native. * Move the requirements which used to be attached to the `Lockfile`/`LockfileContents` off onto an `PexRequest.requirements = EntireLockfile` case, to assert that they are optional, and only used for metadata validation (rather than subsetting). Fixes pantsbuild#14980 and fixes pantsbuild#14991. # Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
…cherrypick of #15014) (#15032) As reported in #14980 and #14991: 1) the default layout of non-internal PEXes changed to `PACKED`, and 2) the PEX-repository subsetting optimization was disabled for manual or poetry lockfiles. This change fixes those issues, and adds a test of the `pex_from_targets` codepath which decides which resolution strategy to use. But it also fairly significantly refactors the `PexRequest` consumption code to improve typesafety. In particular: * Replaces the `is_all_constraints_resolve` special case with explicitly specified `PexLayout`s for those `PexRequests` (which would have been harder at the time when the special case was originally added, since `PexRequest.layout` didn't exist yet). * Moves lockfile header parsing and PEX-native-detection into a `@rule` which produces a `LoadedLockfile`. * Moves "subsetting of a lockfile or a repository PEX" to the `PexRequirements.from_subset` field, which takes a `LoadedLockfile` and asserts (not worth introducing another type yet probably) that the lockfile is PEX-native. * Move the requirements which used to be attached to the `Lockfile`/`LockfileContents` off onto an `PexRequest.requirements = EntireLockfile` case, to assert that they are optional, and only used for metadata validation (rather than subsetting). Fixes #14980 and fixes #14991. [ci skip-rust] [ci skip-build-wheels]
This is on latest master and on pants 2.11 rc1.
repo steps (in the pants repo):
./pants package src/python/pants/bin/::
The text was updated successfully, but these errors were encountered: