Repository navigation
bazel: Update to 0.27.0 - #7391
Conversation
Signed-off-by: Keith Smiley <[email protected]>
Signed-off-by: Keith Smiley <[email protected]>
This script is used for the hotrestart_test target, this makes it run with python3 instead of python2 Signed-off-by: Keith Smiley <[email protected]>
|
This depends on grailbio/bazel-compilation-database#30 |
Signed-off-by: Keith Smiley <[email protected]>
Signed-off-by: Keith Smiley <[email protected]>
Signed-off-by: Keith Smiley <[email protected]>
Signed-off-by: Keith Smiley <[email protected]>
Signed-off-by: Keith Smiley <[email protected]>
Signed-off-by: Keith Smiley <[email protected]>
|
Hrm I'm not sure about the coverage failure here, any ideas? |
Signed-off-by: Keith Smiley <[email protected]>
Signed-off-by: Keith Smiley <[email protected]>
|
@keith this looks like it's a Python 3 thing in |
|
|
|
I've updated to that version here |
htuch
left a comment
There was a problem hiding this comment.
LGTM modulo the coverage issue.
/wait
Signed-off-by: Keith Smiley <[email protected]>
Without both of these subpar thinks the main and src files don't match because the generated files end up in different subpaths of bazel-out because of the differences in toolchains Signed-off-by: Keith Smiley <[email protected]>
|
Ok I think I finally got par_binary to use the right python version with 0.27.0, we'll see tomorrow |
|
Finally green 🎉 |
| # gcovr is a pain to run with `bazel run`, so package it up into a | ||
| # relocatable and hermetic-ish .par file. | ||
| bazel build @com_github_gcovr_gcovr//:gcovr.par | ||
| bazel build --python_version=PY2 @com_github_gcovr_gcovr//:gcovr.par |
There was a problem hiding this comment.
FYI, the Python version is always set by either --host_force_python (for host-configured targets) or the python_version attr of py_binary/py_test targets. If these are not explicitly specified they default to PY3.
So setting --python_version on the command line has no effect on executable Python targets. Its only use is to cause other targets (e.g. a py_library, or some non-Python rule) to have PY2 or PY3 mode for the purposes of evaluating select()s on the Python version and for deciding whether to use the -py2 output directory.
There was a problem hiding this comment.
@brandjon note this is required because of the genrule that outputs the source file. Without this, when forcing py2 on this par_binary target, subpar believes that the main file is not contained in the srcs because it's not nested in the -py2 output directory.
You can reproduce this by running this command with and without this flag, without it subpar fails here https://github.com/google/subpar/blob/35bb9f0092f71ea56b742a520602da9b3638a24f/subpar.bzl#L29-L30
Signed-off-by: Keith Smiley [email protected]