Skip to content

Conversation

@agluszak
Copy link
Contributor

No description provided.

@ahumesky
Copy link
Collaborator

Looks like there're some issues on CI but I think this is a nice change we should get in

@agluszak
Copy link
Contributor Author

WORKSPACE seems uncooperative unfortunately, I'll first figure out how to handle these problems in rules_kotlin

bazel_dep(name = "rules_java", version = "9.0.3")
bazel_dep(name = "bazel_skylib", version = "1.8.1")
bazel_dep(name = "rules_jvm_external", version = "6.7")
bazel_dep(name = "protobuf", version = "33.4", repo_name = "com_google_protobuf")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary? Apps shouldn't need to declare dependencies that are used by the rules.


# Use prebuilt protoc
common --incompatible_enable_proto_toolchain_resolution
common --@com_google_protobuf//bazel/toolchains:prefer_prebuilt_protoc=true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there another way to pass this flag to the underlying proto rules/actions? This line assumes that the user's app depends on protobuf directly, which might not be the case.

"@rules_android_maven//:com_google_errorprone_error_prone_annotations",
"@rules_android_maven//:com_google_guava_guava",
"@rules_android_maven//:com_google_protobuf_protobuf_java",
"@com_google_protobuf//java/core",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need protobuf in the Maven deps if you're replacing their references with @com_google_protobuf?

@ted-xie
Copy link
Contributor

ted-xie commented Jan 14, 2026

@agluszak Thanks for this PR! It definitely moves us in the right direction towards reducing our CI times.

If you wouldn't mind, I'd really prefer this PR to be split into two pieces:

  1. Migrate rules_android's protobuf-related deps entirely to @com_google_protobuf to eliminate the possibility of protobuf runtime vs dependency library mismatch errors (this is becoming increasingly toilsome to maintain)
  2. Use prebuilt protoc

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants