-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
Discover ASDF interpreters by default #20105
Conversation
Co-authored-by: Benjy Weinberger <[email protected]>
Looking into why CI is failing. Its clearly due to the change, but also difficult to repro locally. relieved, it is reproducible locally by moving my |
@@ -89,7 +89,9 @@ class PythonBootstrapSubsystem(Subsystem): | |||
|
|||
class EnvironmentAware(Subsystem.EnvironmentAware): | |||
search_path = StrListOption( | |||
default=["<PYENV>", "<PATH>"], |
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.
this was gruesome to debug but this ends up broken if we refer to AsdfPathString.STANDARD
directly. You end up with:
--python-bootstrap-search-path="[<binary-paths>, <binary-paths>, ...]"
PANTS_PYTHON_BOOTSTRAP_SEARCH_PATH
search_path
default: [
"<PYENV>",
"<ASDF>",
"<PATH>"
]
current value: [
"<PYENV>",
"AsdfPathString.STANDARD",
"<PATH>"
]
For these str-Enum compositions, the str
returns the fully qualified name:
str(AsdfPathString.STANDARD) == 'AsdfPathString.STANDARD'
but the __format__()
method used in f-strings returns the intended '<ASDF>'
Current failures look to be #20103 |
Co-authored-by: Andreas Stenius <[email protected]>
I struggled for a while to debug the error messages I was getting from pants (via pex), but it was ultimately because I had not added
<ASDF>
to the search-path.["<PYENV>", "<PATH>"]
only puts the asdf shims on the path, and they are powerless without the.tool-versions
. It took me a long while to understand what was happening because even in the sandbox it looked like the asdf pythons should be findable.In the spirit of making pants "just work" more often, and given the fair popularity of asdf, should we support asdf by default?