Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The options.rc_file value is
None
by default. To be non-None
pex had to be invoked from the cli with--rcfile=[path]
. As such you're setting the precedent rule here of env beats flags. That does not seem kosher. Is that what you're intending here or have I read things wrong?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.
Honestly, the flag really makes no sense. It shouldn't exist at all fwict. I'd be fine with considering this not your problem. I've filed #674
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.
Even if the option is
None
,Variable.from_rc
will try to load stuff from well-known files (i.e./etc/pexrc
,~/.pexrc
...), which leaves us with no way of specifying here "I actually want you to ignore all pexrc files".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.
Well, the condition could be
if options.rc_file or not ENV.PEX_IGNORE_RCFILES
.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.
So I'd still like a way of expressing "Please do not try to load pexrc files", so would you be okay with something like "If the flag is None, and the env variable PEX_IGNORE_RCFILES is set, please do not load any pexrc file? That would create slightly inconsistent semantics for the env variable, until the flag is removed.
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.
Yes. I think we're saying the same thing. SGTM.