Skip to content

Gerrit should build on Windows with Bazel's next release #3965

Closed

Description

@meteorcloudy

After https://bazel-review.googlesource.com/#/c/bazel/+/19470/, gerrit should be able to build its sever on Windows with Bazel@HEAD.
This is just an issue to make sure our next release won't break the build.

Activity

  1. self-assigned this
    on Oct 25, 2017
  2. meteorcloudy commented on Nov 14, 2017

    @meteorcloudy
    MemberAuthor

    @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.

  3. davido commented on Nov 16, 2017

    @davido
    Contributor

    @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?

  4. meteorcloudy commented on Nov 16, 2017

    @meteorcloudy
    MemberAuthor

    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.

  5. davido commented on Nov 16, 2017

    @davido
    Contributor

    @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.

  6. eamonnmcmanus commented on Nov 16, 2017

    @eamonnmcmanus
    Contributor

    This message:

    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.

  7. davido commented on Nov 16, 2017

    @davido
    Contributor

    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?

    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

  8. davido commented on Nov 16, 2017

    @davido
    Contributor

    @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.

  9. meteorcloudy commented on Nov 17, 2017

    @meteorcloudy
    MemberAuthor

    Nice, I confirmed it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions