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
{{ message }}
Repository navigation
Gerrit should build on Windows with Bazel's next release #3965
@davido I think the problem mentioned here should be fixed from gerrit side.
After modifying the code, I was able to build gerrit on Windows with 0.8.0rc1, so I am closing this issue.
@meteorcloudy Thanks. The needed fix in gerrit was merged yetserday. Are we going to see new Gerrit CI on Windows platform in near future on Bazel CI Infra?
Great!
I just tested 0.8.0rc2 build :headless with gerrit@HEAD.
Got another compilation error:
ERROR: C:/tools/msys64/home/pcloudy/workspace/gerrit/java/com/google/gerrit/server/diff/BUILD:1:1: Building java/com/google/gerrit/server/diff/libdiff.jar (17 source files) and running annotation processors (AutoAnnotationProcessor, AutoValueProcessor) failed (Exit 1): java.exe failed: error executing command
cd C:/tmp/_bazel_pcloudy/tp7ykz9l/execroot/gerrit
SET LC_CTYPE=en_US.UTF-8
external/local_jdk/bin/java.exe -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xbootclasspath/p:external/bazel_tools/third_party/java/jdk/langtools/javac-9-dev-r4023-3.jar -jar external/bazel_tools/tools/jdk/JavaBuilder_deploy.jar @bazel-out/x64_windows-fastbuild/bin/java/com/google/gerrit/server/diff/libdiff.jar-2.params
bazel-out\x64_windows-fastbuild\bin\java\com\google\gerrit\server\diff\_javac\diff\libdiff_sourcegenfiles\com\google\gerrit\server\diff\AutoValue_IntraLineDiffArgs.java:105: error: incompatible types: NameKey cannot be converted to Object
&& (this.project.equals(that.project()))
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
As along as we fix these compilation errors, we can definitely set up the CI job for gerrit after 0.8.0 is released.
error: incompatible types: NameKey cannot be converted to Object
makes me think that there is something wrong with the way the Java compiler is configured. Every class should be convertible to Object. The message is basically saying that that.project() can't be passed to Object.equals(Object).
What's in external/bazel_tools/third_party/java/jdk/langtools/javac-9-dev-r4023-3.jar?
Notice that the message is coming from the Java compiler, not from the AutoValue processor. That processor has already done its work at this point.
I suspect, that this commit could be somehow related: [1]. I think that before this refactring, Gerrit build on the other platform worked. On the same compiler.
What's in external/bazel_tools/third_party/java/jdk/langtools/javac-9-dev-r4023-3.jar?
Activity
Bazel: Add workspace-status-command script for other platform
meteorcloudy commentedon Nov 14, 2017
@davido I think the problem mentioned here should be fixed from gerrit side.
After modifying the code, I was able to build gerrit on Windows with 0.8.0rc1, so I am closing this issue.
PRED_commit_edits_2: Fix build on other platform
davido commentedon Nov 16, 2017
@meteorcloudy Thanks. The needed fix in gerrit was merged yetserday. Are we going to see new Gerrit CI on Windows platform in near future on Bazel CI Infra?
meteorcloudy commentedon Nov 16, 2017
Great!
I just tested 0.8.0rc2 build :headless with gerrit@HEAD.
Got another compilation error:
As along as we fix these compilation errors, we can definitely set up the CI job for gerrit after 0.8.0 is released.
davido commentedon Nov 16, 2017
@cushon @eamonnmcmanus
Any clue what is going on here? gerrit@HEAD can be built on Linux, but failing to be built with Bazel on other platform, see error message above.
eamonnmcmanus commentedon Nov 16, 2017
This message:
makes me think that there is something wrong with the way the Java compiler is configured. Every class should be convertible to Object. The message is basically saying that
that.project()can't be passed toObject.equals(Object).What's in
external/bazel_tools/third_party/java/jdk/langtools/javac-9-dev-r4023-3.jar?Notice that the message is coming from the Java compiler, not from the AutoValue processor. That processor has already done its work at this point.
davido commentedon Nov 16, 2017
I suspect, that this commit could be somehow related: [1]. I think that before this refactring, Gerrit build on the other platform worked. On the same compiler.
This is something that belongs to Bazel: https://github.com/bazelbuild/bazel/blob/master/third_party/java/jdk/langtools/javac-9-dev-r4023-3.jar
davido commentedon Nov 16, 2017
@eamonnmcmanus @meteorcloudy @cushon
I was able to track that down, reproduce and fix it. The root cause was a missing transitive dependency. I just wrote this issue: #4105.
davido commentedon Nov 16, 2017
@meteorcloudy
Hopefuly fixed now with: [1].
Bazel: Fix build on other platform
meteorcloudy commentedon Nov 17, 2017
Nice, I confirmed it works!