Exclude in-repo python from pexes#218
Merged
peterebden merged 3 commits intoplease-build:masterfrom Nov 13, 2024
Merged
Conversation
chrisnovakovic
approved these changes
Nov 13, 2024
| cmd = ' && '.join([compile_cmd, 'rm -f $SRCS_SRCS', cmd]) | ||
| else: | ||
| cmd = ' && '.join([compile_cmd, cmd]) | ||
| if looks_like_build_label(interpreter) and ('|' in interpreter): |
Contributor
There was a problem hiding this comment.
Possible use case for an is_named_output built-in here...
Contributor
Author
There was a problem hiding this comment.
Yeah maybe so, generally things aren't meant to care but this is one case where it turns out we do...
Might also want it to be able to do this decomposition - this should be fine but I prefer not to encode structural knowledge like this into random build rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a bit awkward. An in-repo interpreter will probably look something like
//third_party/cpython:cpython|python, which expands toTOOLS_PYTHON=third_party/cpython/usr/bin/python3or whatever when using remote execution (when all tools are within the working path). This means that it excludes just the executable and not any of the rest of it, which is huge and we don't want it in everything.This is a slightly grungy way of telling it to cut that out, assuming that we don't want to include any part of the interpreter if it's an annotated label.
I've added a test, which failed before and passes for me. It won't do an awful lot on GHA though since we don't have a remote execution setup for this repo.