You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we do not cherry-pick new features into it. Moreover, if we discover that a new feature is buggy, we might decide to roll it back from a release candidate. Only critical, high-impact bugs will be fixed in a release candidate.
Request 1 by @jin is 2e677fb
Is there a tracking bug about it? How is it critical?
Brief summary: 0.17 introduces a regression where Android apps can't be built at the desugaring step when used in conjunction with a manual --host_javabase flag pointing to a JDK 8 installation.
If an Android target can't be built using a user-accessible manner that was previously possible, I consider this a critical regression.
Request 2 by @steeve is #6151
This seems to be a regression, but it is not breaking users. @cushon, can you comment on the impact on user-experience?
I don't think #6151 is a regression since 0.16x, since that release also used an embedded JDK 9 which would have generated the same warnings. The issue results in some warning spam in the build log, which is annoying but ultimately harmless.
@laurentlb FYI, looks like the fix for this issue with 0.17.0rc1 didn't make it into 0.17.1: #5974
...which is technically correct according to our policy. .bazelignore is a new feature, strictly opt-in, as so far no one had a reason to have a file called .bazelignore in their work space. And that new feature happened to be broken and will be useful only in 0.18; but it is not technically a regression, as it didn't work in any earlier release either. Unfortunate, but following our policies.
Correct. The goal of patch releases is to make sure that users can upgrade from 0.16 to 0.17. So if a change in 0.17 blocks you from upgrading, we can cherrypick the fix. In other cases, you'll have to wait for the next release (but it's not too bad, I think: we release once a month on average).
I'm going to create a candidate with one cherrypick: 2e677fb
This version outputs these warnings when installing, FYI:
Uncompressing......Extracting Bazel installation...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/private/var/tmp/_bazel_steeve/install/2269f5a83016b62a56b593c692184ca4/_embedded_binaries/A-server.jar) to field java.lang.String.value
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
$ bazel build //:sample --config=jdk8 --strategy=Javac=sandboxed
INFO: Analysed target //:sample (0 packages loaded).
INFO: Found 1 target...
ERROR: /private/var/tmp/_bazel_jingwen/8b561bac257f9f14a669861c2ced5081/external/androidsdk/BUILD.bazel:8:1: Building external/androidsdk/apksigner.jar () failed (Exit 1)
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
-Xbootclasspath/p is no longer a supported option.
Target //:sample failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.470s, Critical Path: 0.23s
INFO: 1 process: 1 darwin-sandbox.
FAILED: Build did NOT complete successfully
AFAIU, we don't have to cherrypick anything in order to fix the error that @cushon mentioned above, as the problem was only in our CI pipeline configuration (which I fixed now).
The next time you or anyone else builds a release candidate or a final release, the release binary on macOS will be built in the correct way (the same as on Linux and Windows) and that should fix the error.
@laurentlb can you build another release candidate (with no additional cherry-picks) so the fix to the release pipeline can be verified before the final release?
INFO: Invocation ID: 6850ce2f-2b64-4627-8377-966538caba8d
INFO: Build options have changed, discarding analysis cache.
INFO: Analysed target //src/main:app (0 packages loaded, 957 targets configured).
INFO: Found 1 target...
ERROR: /home/dima/tmp/bazel-examples/android/tutorial/src/main/BUILD:1:1: Sharding classes for dexing for //src/main:app failed (Exit 1) mapper failed: error executing command bazel-out/host/bin/external/bazel_tools/src/tools/android/java/com/google/devtools/build/android/ziputils/mapper --output_jar bazel-out/k8-fastbuild/bin/src/main/_dx/app/classes.jar --output_resources ... (remaining 6 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
Exception in thread "main" java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
at com.google.devtools.build.android.ziputils.ZipIn.loadEndOfCentralDirectory(ZipIn.java:491)
at com.google.devtools.build.android.ziputils.ZipIn.endOfCentralDirectory(ZipIn.java:96)
at com.google.devtools.build.android.ziputils.SplitZip.run(SplitZip.java:294)
at com.google.devtools.build.android.ziputils.DexMapper.main(DexMapper.java:70)
Target //src/main:app failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4.184s, Critical Path: 4.01s
INFO: 23 processes: 13 processwrapper-sandbox, 10 worker.
FAILED: Build did NOT complete successfully
Any hints on how to fix this? (Seeing how all relevant issues are closed I suspect I might be doing something wrong)
Activity
laurentlb commentedon Sep 17, 2018
Request 1 by @jin is 2e677fb
Is there a tracking bug about it? How is it critical?
Request 2 by @steeve is #6151
This seems to be a regression, but it is not breaking users. @cushon, can you comment on the impact on user-experience?
jin commentedon Sep 17, 2018
Brief summary: 0.17 introduces a regression where Android apps can't be built at the desugaring step when used in conjunction with a manual --host_javabase flag pointing to a JDK 8 installation.
If an Android target can't be built using a user-accessible manner that was previously possible, I consider this a critical regression.
2e677fb fixes this regression.
Tracking bug: #6159
cushon commentedon Sep 17, 2018
I don't think #6151 is a regression since 0.16x, since that release also used an embedded JDK 9 which would have generated the same warnings. The issue results in some warning spam in the build log, which is annoying but ultimately harmless.
jin commentedon Sep 17, 2018
@laurentlb FYI, looks like the fix for this issue with 0.17.0rc1 didn't make it into 0.17.1: #5974
aehlig commentedon Sep 18, 2018
...which is technically correct according to our policy.
.bazelignoreis a new feature, strictly opt-in, as so far no one had a reason to have a file called.bazelignorein their work space. And that new feature happened to be broken and will be useful only in0.18; but it is not technically a regression, as it didn't work in any earlier release either. Unfortunate, but following our policies.laurentlb commentedon Sep 18, 2018
Correct. The goal of patch releases is to make sure that users can upgrade from 0.16 to 0.17. So if a change in 0.17 blocks you from upgrading, we can cherrypick the fix. In other cases, you'll have to wait for the next release (but it's not too bad, I think: we release once a month on average).
I'm going to create a candidate with one cherrypick: 2e677fb
cushon commentedon Sep 19, 2018
@laurentlb consider including 1d956c7 for #6180, which is a regression in 0.17.1. (cc @mhlopko @iirina)
laurentlb commentedon Sep 19, 2018
0.17.2 rc1 is available here: https://releases.bazel.build/0.17.2/rc1/index.html
scripts/release/release.sh create 0.17.27bb9e0f 1d956c7 2e677fbsteeve commentedon Sep 19, 2018
This version outputs these warnings when installing, FYI:
steeve commentedon Sep 19, 2018
This version fails with:
in
.bazel.rc:0.16.1 works
cushon commentedon Sep 19, 2018
@steeve I tried building
//examples/android/...with 0.17.2 rc1 and JDK 8 and wasn't able to observe that problem, can you share the repro?steeve commentedon Sep 20, 2018
I won't have my computer until the morning but until I do you can try https://github.com/steeve/bazel_issue_5978
steeve commentedon Sep 20, 2018
With --config jdk8
jin commentedon Sep 20, 2018
I'm getting a different error with 0.17.2rc1 with https://github.com/steeve/bazel_issue_5978 now:
4 remaining items
philwo commentedon Sep 20, 2018
Arghh, sorry :( Indeed, I must have missed that when updating the pipeline. I'll make the fix right now.
philwo commentedon Sep 20, 2018
Fixed. All builds in the "release pipeline" from now on will use the fixed configuration.
laurentlb commentedon Sep 20, 2018
I'm a bit confused with the messages.
Is there anything to cherrypick on top of
0.17.2 rc1? Is there still a blocking issue?philwo commentedon Sep 20, 2018
AFAIU, we don't have to cherrypick anything in order to fix the error that @cushon mentioned above, as the problem was only in our CI pipeline configuration (which I fixed now).
The next time you or anyone else builds a release candidate or a final release, the release binary on macOS will be built in the correct way (the same as on Linux and Windows) and that should fix the error.
cushon commentedon Sep 20, 2018
Thanks @philwo!
@laurentlb can you build another release candidate (with no additional cherry-picks) so the fix to the release pipeline can be verified before the final release?
steeve commentedon Sep 20, 2018
Is it possible to make an 0.17.2rc2 then? Or overwrite the 0.17.2rc1 with the new release pipeline.
laurentlb commentedon Sep 20, 2018
Done.
https://releases.bazel.build/0.17.2/rc2/index.html
cushon commentedon Sep 20, 2018
Thanks, looks good to me:
@steeve can you verify that fixes the problem you were seeing?
steeve commentedon Sep 20, 2018
I can confirm that rc2 fixes the jdk8 issue!
laurentlb commentedon Sep 21, 2018
Bazel 17.2 released: https://github.com/bazelbuild/bazel/releases/tag/0.17.2
(cc @vbatts @petemounce)
vbatts commentedon Sep 21, 2018
petemounce commentedon Sep 24, 2018
Pushed to chocolatey
dimsuz commentedon Dec 13, 2018
Hmm, I still see this with
bazel-0.20.0on Arch Linux. I'm trying to follow an official Android Tutorial.The command
bazel build //src/main:appgives me a 'Can't start JVM' error, so I figured that's because I use java 8 (because Android):So I try to tell bazel about this:
And get an error in response:
Any hints on how to fix this? (Seeing how all relevant issues are closed I suspect I might be doing something wrong)
jin commentedon Dec 13, 2018
@dimsuz could you please file a new issue and tag me in it? This issue is for the 0.17.2 release.