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

wip: support bzlmod #377

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

wip: support bzlmod #377

wants to merge 11 commits into from

Conversation

pcj
Copy link
Member

@pcj pcj commented Jul 1, 2024

TODO

  • fix proto_repository: gazelle is generating canonical repo names vs apparent repo names
diff --git a/example/thing/BUILD.bazel b/example/thing/BUILD.bazel
index eaf7597b..dabd0e39 100644
--- a/example/thing/BUILD.bazel
+++ b/example/thing/BUILD.bazel
@@ -13,7 +13,7 @@ proto_library(
     name = "thing_proto",
     srcs = ["thing.proto"],
     visibility = ["//visibility:public"],
-    deps = ["@protobufapis//google/protobuf:timestamp_proto"],
+    deps = ["@_main~proto_repository~protobufapis//google/protobuf:timestamp_proto"],
 )
  • fix failing tests //cmd/gencopy:gencopy_test and //cmd/gazelle:gazelle_test
  • migrate golden example tests to bzlmod
  • lock @maven_akka
  • update documentation
  • bump version
  • update github CI
  • cleanup and organize MODULE.bazel
  • ? remove depsgen (vs wait until WORKSPACE.bzlmod is empty)
//cmd/gazelle/internal/wspace:wspace_test                       (cached) PASSED in 0.3s
//example/routeguide/closure:client_test                                 PASSED in 18.5s
//pkg/language/protobuf:protobuf_test                                    PASSED in 0.3s
//pkg/plugin/akka/akka_grpc:akka_grpc_test                               PASSED in 0.4s
//pkg/plugin/bufbuild:bufbuild_test                                      PASSED in 0.5s
//pkg/plugin/builtin:builtin_test                                        PASSED in 6.8s
//pkg/plugin/golang/protobuf:protobuf_test                               PASSED in 0.6s
//pkg/plugin/grpc/grpc:bazel_test                                        PASSED in 2.8s
//pkg/plugin/grpc/grpc:grpc_test                                         PASSED in 11.5s
//pkg/plugin/grpcecosystem/grpcgateway:grpcgateway_test                  PASSED in 0.6s
//pkg/plugin/scalapb/scalapb:scalapb_test                                PASSED in 0.7s
//pkg/plugin/stephenh/ts-proto:ts-proto_test                             PASSED in 0.6s
//pkg/protoc:protoc_test                                                 PASSED in 0.5s
//pkg/rule/rules_go:rules_go_test                                        PASSED in 0.3s
//pkg/rule/rules_python:rules_python_test                                PASSED in 0.3s
//pkg/rule/rules_scala:rules_scala_test                                  PASSED in 0.3s
//cmd/gencopy:gencopy_test                                               FAILED in 0.3s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/cmd/gencopy/gencopy_test/test.log
//example/golden:closurejs_test                                          FAILED in 0.1s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/closurejs_test/test.log
//example/golden:commonjs_test                                           FAILED in 0.2s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/commonjs_test/test.log
//example/golden:cpp_test                                                FAILED in 0.2s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/cpp_test/test.log
//example/golden:csharp_test                                             FAILED in 0.1s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/csharp_test/test.log
//example/golden:go_test                                                 FAILED in 0.2s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/go_test/test.log
//example/golden:goembed_test                                            FAILED in 0.2s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/goembed_test/test.log
//example/golden:gogo_test                                               FAILED in 0.2s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/gogo_test/test.log
//example/golden:golden_test                                             FAILED in 2.2s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/golden_test/test.log
//example/golden:gomerge_test                                            FAILED in 0.1s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/gomerge_test/test.log
//example/golden:java_test                                               FAILED in 0.2s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/java_test/test.log
//example/golden:objc_test                                               FAILED in 0.2s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/objc_test/test.log
//example/golden:proto_compiled_sources_test                             FAILED in 0.2s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/proto_compiled_sources_test/test.log
//example/golden:proto_repository_test                                   FAILED in 0.2s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/proto_repository_test/test.log
//example/golden:python_test                                             FAILED in 0.2s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/python_test/test.log
//example/golden:ruby_test                                               FAILED in 0.2s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/ruby_test/test.log
//example/golden:scala_test                                              FAILED in 0.3s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/scala_test/test.log
//example/golden:starlark_java_test                                      FAILED in 0.1s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/starlark_java_test/test.log
//example/golden:strip_import_prefix_test                                FAILED in 0.1s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/golden/strip_import_prefix_test/test.log
//example/toolchain/prebuilt:prebuilt_test                               FAILED in 0.1s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/toolchain/prebuilt/prebuilt_test/test.log
//example/toolchain/standard:standard_test                               FAILED in 0.1s
  /private/var/tmp/_bazel_pcj/092d6dadaf86f07590903c45033f576e/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/example/toolchain/standard/standard_test/test.log

Fixes #319

@pcj pcj mentioned this pull request Jul 1, 2024
@pcj pcj changed the title experimental: migrate to bzlmod wip: migrate to bzlmod Jul 1, 2024
@pcj pcj changed the title wip: migrate to bzlmod wip: support bzlmod Jul 1, 2024
#bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf")
bazel_dep(name = "grpc", version = "1.56.3", repo_name = "com_github_grpc_grpc")

go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
Copy link
Contributor

Choose a reason for hiding this comment

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

go_sdk needs to be marked as a dev dependency.

@mpatou-openai
Copy link

Tried this branch with the fix of @jvolkman and it works perfectly for our needs (python, go and java protobuf + grpc)

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.

bzlmod support
3 participants