Fix bzlmod (#600)
* fix: gazelle is not a devdep It's easy to see because we reference the symbol two lines below here * fix: gazelle must be a regular dep I found this mistake when trying to use bazel-lib in a downstream repo.
This commit is contained in:
parent
28cb7a2145
commit
4a4dafa6e8
|
@ -1,16 +1,27 @@
|
||||||
diff --git a/MODULE.bazel b/MODULE.bazel
|
diff --git a/MODULE.bazel b/MODULE.bazel
|
||||||
index f05c57a..4cb6104 100644
|
index 07a6eff..26702ad 100644
|
||||||
--- a/MODULE.bazel
|
--- a/MODULE.bazel
|
||||||
+++ b/MODULE.bazel
|
+++ b/MODULE.bazel
|
||||||
@@ -28,9 +28,9 @@ register_toolchains(
|
@@ -34,19 +34,19 @@ register_toolchains(
|
||||||
# To allow /tools to be built from source
|
bazel_dep(
|
||||||
# NOTE: when publishing to BCR, we patch this to be dev_dependency, as we publish pre-built binaries
|
name = "gazelle",
|
||||||
# along with our releases.
|
version = "0.33.0",
|
||||||
-bazel_dep(name = "rules_go", version = "0.41.0", repo_name = "io_bazel_rules_go")
|
- # In released versions: dev_dependency = True
|
||||||
+bazel_dep(name = "rules_go", version = "0.41.0", repo_name = "io_bazel_rules_go", dev_dependency = True)
|
+ dev_dependency = True
|
||||||
|
)
|
||||||
-go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
|
bazel_dep(
|
||||||
+go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps", dev_dependency = True)
|
name = "rules_go",
|
||||||
|
version = "0.41.0",
|
||||||
|
repo_name = "io_bazel_rules_go",
|
||||||
|
- # In released versions: dev_dependency = True
|
||||||
|
+ dev_dependency = True
|
||||||
|
)
|
||||||
|
|
||||||
|
go_deps = use_extension(
|
||||||
|
"@gazelle//:extensions.bzl",
|
||||||
|
"go_deps",
|
||||||
|
- # In released versions: dev_dependency = True
|
||||||
|
+ dev_dependency = True
|
||||||
|
)
|
||||||
go_deps.from_file(go_mod = "//:go.mod")
|
go_deps.from_file(go_mod = "//:go.mod")
|
||||||
use_repo(
|
use_repo(
|
||||||
go_deps,
|
|
||||||
|
|
20
MODULE.bazel
20
MODULE.bazel
|
@ -35,9 +35,24 @@ register_toolchains(
|
||||||
# To allow /tools to be built from source
|
# To allow /tools to be built from source
|
||||||
# NOTE: when publishing to BCR, we patch this to be dev_dependency, as we publish pre-built binaries
|
# NOTE: when publishing to BCR, we patch this to be dev_dependency, as we publish pre-built binaries
|
||||||
# along with our releases.
|
# along with our releases.
|
||||||
bazel_dep(name = "rules_go", version = "0.41.0", repo_name = "io_bazel_rules_go")
|
|
||||||
|
|
||||||
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
|
bazel_dep(
|
||||||
|
name = "gazelle",
|
||||||
|
version = "0.33.0",
|
||||||
|
# In released versions: dev_dependency = True
|
||||||
|
)
|
||||||
|
bazel_dep(
|
||||||
|
name = "rules_go",
|
||||||
|
version = "0.41.0",
|
||||||
|
repo_name = "io_bazel_rules_go",
|
||||||
|
# In released versions: dev_dependency = True
|
||||||
|
)
|
||||||
|
|
||||||
|
go_deps = use_extension(
|
||||||
|
"@gazelle//:extensions.bzl",
|
||||||
|
"go_deps",
|
||||||
|
# In released versions: dev_dependency = True
|
||||||
|
)
|
||||||
go_deps.from_file(go_mod = "//:go.mod")
|
go_deps.from_file(go_mod = "//:go.mod")
|
||||||
use_repo(
|
use_repo(
|
||||||
go_deps,
|
go_deps,
|
||||||
|
@ -49,4 +64,3 @@ use_repo(
|
||||||
|
|
||||||
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.4.1", dev_dependency = True)
|
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.4.1", dev_dependency = True)
|
||||||
bazel_dep(name = "buildifier_prebuilt", version = "6.3.3", dev_dependency = True)
|
bazel_dep(name = "buildifier_prebuilt", version = "6.3.3", dev_dependency = True)
|
||||||
bazel_dep(name = "gazelle", version = "0.33.0", dev_dependency = True)
|
|
||||||
|
|
Loading…
Reference in New Issue