-
Notifications
You must be signed in to change notification settings - Fork 312
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
ASwBazel build errors with Bazel 0.28 #976
Comments
This error does not show up with Bazel 0.27.x. |
Reported in bazelbuild/bazel#8571 (comment) |
Keeping this open until the patch release is out. |
…import #978) Bazel 0.27.0 introduced an incompatible change flag that forces the host python to be python3. This changes the way encoding/decoding is done, causing failures as seen in #976 (comment): ``` $ bazel build //aswb:aswb_bazel_zip --define=ij_product=android-studio-latest --experimental_google_legacy_api INFO: Analyzed target //aswb:aswb_bazel_zip (62 packages loaded, 2243 targets configured). INFO: Found 1 target... ERROR: /Users/jingwen/code/intellij/aswb/BUILD:234:1: Creating final plugin zip archive failed (Exit 1) zip_plugin_files failed: error executing command bazel-out/host/bin/build_defs/zip_plugin_files --output bazel-out/darwin-fastbuild/bin/aswb/aswb_bazel.zip aspect/WORKSPACE aswb/aspect/WORKSPACE aspect/artifacts.bzl aswb/aspect/artifacts.bzl ... (remaining 20 argument(s) skipped) Use --sandbox_debug to see verbose messages from the sandbox Traceback (most recent call last): File "/private/var/tmp/_bazel_jingwen/a7f9cfb321ff8f053a43633ca4d90cc9/sandbox/darwin-sandbox/379/execroot/intellij_with_bazel/bazel-out/host/bin/build_defs/zip_plugin_files.runfiles/intellij_with_bazel/build_defs/zip_plugin_files.py", line 38, in <module> main() File "/private/var/tmp/_bazel_jingwen/a7f9cfb321ff8f053a43633ca4d90cc9/sandbox/darwin-sandbox/379/execroot/intellij_with_bazel/bazel-out/host/bin/build_defs/zip_plugin_files.runfiles/intellij_with_bazel/build_defs/zip_plugin_files.py", line 35, in main outfile.writestr(zipinfo, input_file.read(), zipfile.ZIP_DEFLATED) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xfe in position 39: ordinal not in range(128) ---------------- Note: The failure of target //build_defs:zip_plugin_files (with exit code 1) may have been caused by the fact that it is a Python 2 program that was built in the host configuration, which uses Python 3. You can change the host configuration (for the entire build) to instead use Python 2 by setting --host_force_python=PY2. If this error started occurring in Bazel 0.27 and later, it may be because the Python toolchain now enforces that targets analyzed as PY2 and PY3 run under a Python 2 and Python 3 interpreter, respectively. See bazelbuild/bazel#7899 for more information. ---------------- Target //aswb:aswb_bazel_zip failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 347.553s, Critical Path: 91.50s INFO: 370 processes: 348 darwin-sandbox, 22 worker. FAILED: Build did NOT complete successfully ``` This PR fixes that breakage by extending the decoder to from using ascii to direct bytes, allowing zip_plugin_files.py to be used with Python 3 directly. Closes #978 PiperOrigin-RevId: 257788170
…oogle_legacy_api This should be patched into 0.28.0 to fix bazelbuild/intellij#976 Closes bazelbuild#8860. PiperOrigin-RevId: 257574106
…oogle_legacy_api This should be patched into 0.28.0 to fix bazelbuild/intellij#976 Closes #8860. PiperOrigin-RevId: 257574106
Once you get through this, I'm getting a lot of --incompatible_depset_is_not_iterable=false problems, as the intellij starlark stuff apparently tries to iterate over depsets. |
@cgruber all the instances of that issue have been resolved on master. What's the version of the your plugin? |
We are experiencing this issue as well. When will the 0.28 patch version be released? |
@neakor 0.28.1rc1 is available. I've requested for rc1 to be promoted to a release: bazelbuild/bazel#8571 (comment) |
0.28.1 is now available. If you're running into |
Thank you! |
…import bazelbuild#978) Bazel 0.27.0 introduced an incompatible change flag that forces the host python to be python3. This changes the way encoding/decoding is done, causing failures as seen in bazelbuild#976 (comment): ``` $ bazel build //aswb:aswb_bazel_zip --define=ij_product=android-studio-latest --experimental_google_legacy_api INFO: Analyzed target //aswb:aswb_bazel_zip (62 packages loaded, 2243 targets configured). INFO: Found 1 target... ERROR: /Users/jingwen/code/intellij/aswb/BUILD:234:1: Creating final plugin zip archive failed (Exit 1) zip_plugin_files failed: error executing command bazel-out/host/bin/build_defs/zip_plugin_files --output bazel-out/darwin-fastbuild/bin/aswb/aswb_bazel.zip aspect/WORKSPACE aswb/aspect/WORKSPACE aspect/artifacts.bzl aswb/aspect/artifacts.bzl ... (remaining 20 argument(s) skipped) Use --sandbox_debug to see verbose messages from the sandbox Traceback (most recent call last): File "/private/var/tmp/_bazel_jingwen/a7f9cfb321ff8f053a43633ca4d90cc9/sandbox/darwin-sandbox/379/execroot/intellij_with_bazel/bazel-out/host/bin/build_defs/zip_plugin_files.runfiles/intellij_with_bazel/build_defs/zip_plugin_files.py", line 38, in <module> main() File "/private/var/tmp/_bazel_jingwen/a7f9cfb321ff8f053a43633ca4d90cc9/sandbox/darwin-sandbox/379/execroot/intellij_with_bazel/bazel-out/host/bin/build_defs/zip_plugin_files.runfiles/intellij_with_bazel/build_defs/zip_plugin_files.py", line 35, in main outfile.writestr(zipinfo, input_file.read(), zipfile.ZIP_DEFLATED) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xfe in position 39: ordinal not in range(128) ---------------- Note: The failure of target //build_defs:zip_plugin_files (with exit code 1) may have been caused by the fact that it is a Python 2 program that was built in the host configuration, which uses Python 3. You can change the host configuration (for the entire build) to instead use Python 2 by setting --host_force_python=PY2. If this error started occurring in Bazel 0.27 and later, it may be because the Python toolchain now enforces that targets analyzed as PY2 and PY3 run under a Python 2 and Python 3 interpreter, respectively. See bazelbuild/bazel#7899 for more information. ---------------- Target //aswb:aswb_bazel_zip failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 347.553s, Critical Path: 91.50s INFO: 370 processes: 348 darwin-sandbox, 22 worker. FAILED: Build did NOT complete successfully ``` This PR fixes that breakage by extending the decoder to from using ascii to direct bytes, allowing zip_plugin_files.py to be used with Python 3 directly. Closes bazelbuild#978 PiperOrigin-RevId: 257788170
…import bazelbuild#978) Bazel 0.27.0 introduced an incompatible change flag that forces the host python to be python3. This changes the way encoding/decoding is done, causing failures as seen in bazelbuild#976 (comment): ``` $ bazel build //aswb:aswb_bazel_zip --define=ij_product=android-studio-latest --experimental_google_legacy_api INFO: Analyzed target //aswb:aswb_bazel_zip (62 packages loaded, 2243 targets configured). INFO: Found 1 target... ERROR: /Users/jingwen/code/intellij/aswb/BUILD:234:1: Creating final plugin zip archive failed (Exit 1) zip_plugin_files failed: error executing command bazel-out/host/bin/build_defs/zip_plugin_files --output bazel-out/darwin-fastbuild/bin/aswb/aswb_bazel.zip aspect/WORKSPACE aswb/aspect/WORKSPACE aspect/artifacts.bzl aswb/aspect/artifacts.bzl ... (remaining 20 argument(s) skipped) Use --sandbox_debug to see verbose messages from the sandbox Traceback (most recent call last): File "/private/var/tmp/_bazel_jingwen/a7f9cfb321ff8f053a43633ca4d90cc9/sandbox/darwin-sandbox/379/execroot/intellij_with_bazel/bazel-out/host/bin/build_defs/zip_plugin_files.runfiles/intellij_with_bazel/build_defs/zip_plugin_files.py", line 38, in <module> main() File "/private/var/tmp/_bazel_jingwen/a7f9cfb321ff8f053a43633ca4d90cc9/sandbox/darwin-sandbox/379/execroot/intellij_with_bazel/bazel-out/host/bin/build_defs/zip_plugin_files.runfiles/intellij_with_bazel/build_defs/zip_plugin_files.py", line 35, in main outfile.writestr(zipinfo, input_file.read(), zipfile.ZIP_DEFLATED) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xfe in position 39: ordinal not in range(128) ---------------- Note: The failure of target //build_defs:zip_plugin_files (with exit code 1) may have been caused by the fact that it is a Python 2 program that was built in the host configuration, which uses Python 3. You can change the host configuration (for the entire build) to instead use Python 2 by setting --host_force_python=PY2. If this error started occurring in Bazel 0.27 and later, it may be because the Python toolchain now enforces that targets analyzed as PY2 and PY3 run under a Python 2 and Python 3 interpreter, respectively. See bazelbuild/bazel#7899 for more information. ---------------- Target //aswb:aswb_bazel_zip failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 347.553s, Critical Path: 91.50s INFO: 370 processes: 348 darwin-sandbox, 22 worker. FAILED: Build did NOT complete successfully ``` This PR fixes that breakage by extending the decoder to from using ascii to direct bytes, allowing zip_plugin_files.py to be used with Python 3 directly. Closes bazelbuild#978 PiperOrigin-RevId: 257788170
…import bazelbuild#978) Bazel 0.27.0 introduced an incompatible change flag that forces the host python to be python3. This changes the way encoding/decoding is done, causing failures as seen in bazelbuild#976 (comment): ``` $ bazel build //aswb:aswb_bazel_zip --define=ij_product=android-studio-latest --experimental_google_legacy_api INFO: Analyzed target //aswb:aswb_bazel_zip (62 packages loaded, 2243 targets configured). INFO: Found 1 target... ERROR: /Users/jingwen/code/intellij/aswb/BUILD:234:1: Creating final plugin zip archive failed (Exit 1) zip_plugin_files failed: error executing command bazel-out/host/bin/build_defs/zip_plugin_files --output bazel-out/darwin-fastbuild/bin/aswb/aswb_bazel.zip aspect/WORKSPACE aswb/aspect/WORKSPACE aspect/artifacts.bzl aswb/aspect/artifacts.bzl ... (remaining 20 argument(s) skipped) Use --sandbox_debug to see verbose messages from the sandbox Traceback (most recent call last): File "/private/var/tmp/_bazel_jingwen/a7f9cfb321ff8f053a43633ca4d90cc9/sandbox/darwin-sandbox/379/execroot/intellij_with_bazel/bazel-out/host/bin/build_defs/zip_plugin_files.runfiles/intellij_with_bazel/build_defs/zip_plugin_files.py", line 38, in <module> main() File "/private/var/tmp/_bazel_jingwen/a7f9cfb321ff8f053a43633ca4d90cc9/sandbox/darwin-sandbox/379/execroot/intellij_with_bazel/bazel-out/host/bin/build_defs/zip_plugin_files.runfiles/intellij_with_bazel/build_defs/zip_plugin_files.py", line 35, in main outfile.writestr(zipinfo, input_file.read(), zipfile.ZIP_DEFLATED) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xfe in position 39: ordinal not in range(128) ---------------- Note: The failure of target //build_defs:zip_plugin_files (with exit code 1) may have been caused by the fact that it is a Python 2 program that was built in the host configuration, which uses Python 3. You can change the host configuration (for the entire build) to instead use Python 2 by setting --host_force_python=PY2. If this error started occurring in Bazel 0.27 and later, it may be because the Python toolchain now enforces that targets analyzed as PY2 and PY3 run under a Python 2 and Python 3 interpreter, respectively. See bazelbuild/bazel#7899 for more information. ---------------- Target //aswb:aswb_bazel_zip failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 347.553s, Critical Path: 91.50s INFO: 370 processes: 348 darwin-sandbox, 22 worker. FAILED: Build did NOT complete successfully ``` This PR fixes that breakage by extending the decoder to from using ascii to direct bytes, allowing zip_plugin_files.py to be used with Python 3 directly. Closes bazelbuild#978 PiperOrigin-RevId: 257788170
…google_legacy_api This should be patched into 0.28.0 to fix bazelbuild/intellij#976 Closes #8860. PiperOrigin-RevId: 257574106
Usage of
android_common
without--experimental_google_legacy_api
.Running
zip_plugin_files.py
with host Python 3:The text was updated successfully, but these errors were encountered: