-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
plumb sh-boot through to pex_binary #19925
Conversation
Hey @cburroughs, thanks for the PR. Just checking: is the |
I think #19514 needs some more discussion first before this can be expanded and un-DRAFT-ified. |
Cool, thanks for the explanation. I'll mark this as a GitHub draft too so that it filters out of PR searches, and asked on slack for guidance about your research there. |
I think with pex-tool/pex#2296 available it makes sense to plumb through sh-boot, but not mess with defaults. Ready for review. |
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.
Looks good. Could we add a test that validates the --sh-boot
flag is passed appropriately?
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.
Awesome!
I idly wonder if we could (eventually/with a deprecation cycle) switch this to True
, given the description sounds like it's almost always better.
All changes: - https://github.com/pantsbuild/pex/releases/tag/v2.1.153 - https://github.com/pantsbuild/pex/releases/tag/v2.1.154 - https://github.com/pantsbuild/pex/releases/tag/v2.1.155 Highlights: - `--no-pre-install-wheels` (and `--max-install-jobs`) that likely helps with: - #15062 - (the root cause of) #20227 - _maybe_ arguably #18293, #18965, #19681 - improved shebang selection, helping with #19514, but probably not the full solution (#19925) - performance improvements
@@ -486,6 +486,29 @@ class PexIgnoreErrorsField(BoolField): | |||
help = "Should PEX ignore errors when it cannot resolve dependencies?" | |||
|
|||
|
|||
class PexShBootField(BoolField): | |||
alias = "sh_boot" | |||
default = False |
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.
Since people very likely want to set this to True, should we consider a deprecation cycle to change this to be the default? In a clean world with no backwards compatibility considerations I imagine this would have been the default in Pex.
And/or, should there be an option to set this globally?
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.
Will merge now, since this can be done in a followup
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.
Since people very likely want to set this to True, should we consider a deprecation cycle to change this to be the default?
I think Pex tries to support constrained environments without sh
, so I'm not sure of the hypothetical default there. But yeah for Pants I think this is value that is more likely to "just work".
And/or, should there be an option to set this globally?
Isn't __defaults__
or macros the usual answer in that case?
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.
Yeah, actually, we should just document the use of __defaults__
for this.
ref #19514