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

refactor: add MODULE.bazel file for bzlmod #16013

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 51 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,2 +1,51 @@
# TODO: migrate all dependencies from WORKSPACE to MODULE.bazel
# https://github.com/protocolbuffers/protobuf/issues/14313
"""Bazel dependencies

Currently only used by external users via the Bazel Central Registry.
TODO(alexeagle): empty the WORKSPACE file and enable bzlmod for this repo.

Note, originally this file existed as a patch:
https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/protobuf/23.1/patches/0001-Add-MODULE.bazel.patch
"""
module(
name = "protobuf",
compatibility_level = 1,
version = "23.1",
)
Copy link
Member

Choose a reason for hiding this comment

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

We're currently working on 26.0 (you could say main is on 27.0), it seems like all of these dependencies are stale


alexeagle marked this conversation as resolved.
Show resolved Hide resolved
bazel_dep(name = "bazel_skylib", version = "1.0.3")
bazel_dep(name = "rules_python", version = "0.10.2")
bazel_dep(name = "rules_cc", version = "0.0.1")
bazel_dep(name = "rules_proto", version = "4.0.0")
bazel_dep(name = "rules_java", version = "4.0.0")
bazel_dep(name = "rules_pkg", version = "0.7.0")
bazel_dep(name = "platforms", version = "0.0.8")
Copy link
Member

Choose a reason for hiding this comment

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

All of these dependencies seem older than what we're using now. Why are we downgrading?

bazel_dep(name = "abseil-cpp", repo_name = "com_google_absl", version = "20230802.0.bcr.1")
bazel_dep(name = "zlib", version = "1.2.11")
alexeagle marked this conversation as resolved.
Show resolved Hide resolved
bazel_dep(name = "upb", version = "0.0.0-20230516-61a97ef")

alexeagle marked this conversation as resolved.
Show resolved Hide resolved
# TODO: Add missing rules_kotlin
alexeagle marked this conversation as resolved.
Show resolved Hide resolved

# Maven dependencies
bazel_dep(name = "rules_jvm_external", version = "4.4.2")

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")

maven.install(
name = "maven",
artifacts = [
"com.google.code.findbugs:jsr305:3.0.2",
"com.google.code.gson:gson:2.8.9",
"com.google.errorprone:error_prone_annotations:2.3.2",
"com.google.j2objc:j2objc-annotations:1.3",
"com.google.guava:guava:31.1-jre",
"com.google.guava:guava-testlib:31.1-jre",
"com.google.truth:truth:1.1.2",
"junit:junit:4.13.2",
"org.mockito:mockito-core:4.3.1",
],
)
alexeagle marked this conversation as resolved.
Show resolved Hide resolved

use_repo(maven, "maven")

# Dependencies needed in tests
bazel_dep(name = "googletest", repo_name = "com_google_googletest", version = "1.11.0")
Loading