subpar icon indicating copy to clipboard operation
subpar copied to clipboard

Subpar tests fail under Linux when Bazel invoked with --build_python_zip

Open duggelz opened this issue 8 years ago • 1 comments

$ bazel test --build_python_zip //...
INFO: Analysed 57 targets (0 packages loaded).
INFO: Found 30 targets and 27 test targets...
ERROR: /xxx/code/github/subpar/compiler/BUILD:40:1: Building par file //compiler:compiler.par failed (Exit 1)
Traceback (most recent call last):
  File "/tmp/Bazel.runfiles_HNt40m/runfiles/subpar/compiler/compiler.py", line 23, in <module>
    sys.exit(cli.main(sys.argv))
  File "/tmp/Bazel.runfiles_HNt40m/runfiles/subpar/compiler/cli.py", line 104, in main
    import_roots, interpreter = parse_stub(args.stub_file)
  File "/tmp/Bazel.runfiles_HNt40m/runfiles/subpar/compiler/cli.py", line 71, in parse_stub
    for line in stub_file:
  File "/usr/lib/python2.7/codecs.py", line 296, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x95 in position 63: invalid start byte
INFO: Elapsed time: 0.700s, Critical Path: 0.18s

duggelz avatar Nov 16 '17 22:11 duggelz

Here's what I'm seeing in my build:

(snap) |S|spacey@masonjar:ntpq-snap-plugin$ bazel build snap-plugin-ntpq-query.par --build_python_zip --verbose_failures
INFO: Analysed target //:snap-plugin-ntpq-query.par (1 packages loaded).
INFO: Found 1 target...
ERROR: /home/spacey/.cache/bazel/_bazel_spacey/4a00941cf92e435100a3fb67234063c8/external/subpar/compiler/BUILD:40:1: Building par file @subpar//compiler:compiler.par failed (Exit 1): compiler failed: error executing command 
  (cd /home/spacey/.cache/bazel/_bazel_spacey/4a00941cf92e435100a3fb67234063c8/execroot/__main__ && \
  exec env - \
  bazel-out/host/bin/external/subpar/compiler/compiler --manifest_file bazel-out/host/bin/external/subpar/compiler/compiler.par_SOURCES --outputpar bazel-out/host/bin/external/subpar/compiler/compiler.par --stub_file bazel-out/host/bin/external/subpar/compiler/compiler external/subpar/compiler/compiler.py

The --stub_file being bazel-out/host/bin/external/subpar/compiler/compiler seems completely wrong, but that's how I'm turning up this error.

pcn avatar Nov 24 '17 03:11 pcn