Skip to content
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

java_tools release broken #10023

Closed
meisterT opened this issue Oct 14, 2019 · 4 comments
Closed

java_tools release broken #10023

meisterT opened this issue Oct 14, 2019 · 4 comments
Assignees
Labels
P1 I'll work on this now. (Assignee required) team-Rules-Java Issues for Java rules

Comments

@meisterT
Copy link
Member

Description of the problem:

java_tools release probably broke a couple of Java projects (with Dagger?)

See for a full list of breakages in downstream:
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1234#a822417e-f2f7-4927-abe7-b01289011f67
(Note that it includes more problems than this particular issue.)

One example:
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1234#83e0dae2-b545-413c-9311-56b79320a2b6

Example error:

ERROR: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/ecf942666dab041fc60b1286a219db3e/external/io_bazel_rules_kotlin/src/main/kotlin/io/bazel/kotlin/builder/BUILD:34:1: Couldn't build file external/io_bazel_rules_kotlin/src/main/kotlin/io/bazel/kotlin/builder/libbuilder.jar: Building external/io_bazel_rules_kotlin/src/main/kotlin/io/bazel/kotlin/builder/libbuilder.jar (2 source files) and running annotation processors (ComponentProcessor) failed (Exit 1)
--
  | bazel-out/host/bin/external/io_bazel_rules_kotlin/src/main/kotlin/io/bazel/kotlin/builder/_javac/builder/libbuilder_sourcegenfiles/io/bazel/kotlin/builder/KotlinBuilderComponent_Module_ProvidePluginArgEncoderFactory.java:23: error: [RefersToDaggerCodegen] Don't refer to Dagger's internal or generated code
  | return providePluginArgEncoder(module, toolchainProvider.get());
  | ^
  | (see https://errorprone.info/bugpattern/RefersToDaggerCodegen)
  | bazel-out/host/bin/external/io_bazel_rules_kotlin/src/main/kotlin/io/bazel/kotlin/builder/_javac/builder/libbuilder_sourcegenfiles/io/bazel/kotlin/builder/KotlinBuilderComponent_Module_ProvidePluginArgEncoderFactory.java:33: error: [RefersToDaggerCodegen] Don't refer to Dagger's internal or generated code
  | return Preconditions.checkNotNull(instance.providePluginArgEncoder(toolchain), "Cannot return null from a non-@Nullable @Provides method");
  | ^
  | (see https://errorprone.info/bugpattern/RefersToDaggerCodegen)

What's the output of bazel info release?

This is with the 1.1.0rc1

@meisterT meisterT added release blocker P1 I'll work on this now. (Assignee required) team-Rules-Java Issues for Java rules labels Oct 14, 2019
@meisterT
Copy link
Member Author

cc @hlopko who created the release

@iirina
Copy link
Contributor

iirina commented Oct 15, 2019

It looks related to the error prone upgrade in #9372, I'm rebuilding the tools and update this thread when I confirm the culprit.

@iirina
Copy link
Contributor

iirina commented Oct 15, 2019

@meisterT I can confirm the error prone upgrade to 2.3.3 is the culprit. The new error prone release introduced new error prone checks. This should have been an incompatible change. @cushon FYI

Next steps:

  1. revert d990746
  2. create java_tools patch release v6.1
  3. upgrade the default java_tools in bazel to v6.1
  4. cherry-pick commit for step 3 into bazel 1.1

@iirina
Copy link
Contributor

iirina commented Oct 15, 2019

This should be fixed by 0a8071a.

@iirina iirina closed this as completed Oct 15, 2019
davido added a commit to davido/rules_kotlin that referenced this issue May 1, 2020
…nerated code

This is a reproducer to the error reported by new error prone version
2.3.4.

Note that due to this breakage the last attempt to upgrade Error Prone
in Bazel was reverted: [1], [2].

Test Plan:

On Linux run:

  $ bazel build \
      --java_toolchain=@remote_java_tools_linux//:toolchain
      --host_java_toolchain=@remote_java_tools_linux//:toolchain
      src/main/kotlin/...

Note, that this should be executed on Linux platform, because I have not
built custom java_tool with this CL included: [3] on Mac Os X yet.

[1] bazelbuild/bazel#10023
[2] bazelbuild/bazel@d990746
[3] bazelbuild/bazel#11271
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 I'll work on this now. (Assignee required) team-Rules-Java Issues for Java rules
Projects
None yet
Development

No branches or pull requests

2 participants