Skip to content

Commit

Permalink
Do not load go_dependencies() in bzlmod extension (#221)
Browse files Browse the repository at this point in the history
* Debug issue with importing from monorepo

* Do not load legacy go deps in extensions.bzl

* Run bazel mod tidy
  • Loading branch information
mortenmj authored May 19, 2024
1 parent 360cdd7 commit a198e00
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 1 addition & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ bazel_dep(name = "rules_go", version = "0.47.1", repo_name = "io_bazel_rules_go"

go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")

use_repo(
go_deps,
"com_github_olekukonko_tablewriter",
Expand All @@ -21,9 +20,8 @@ use_repo(
"org_golang_google_grpc",
)

snapshots = use_extension("@com_cognitedata_bazel_snapshots//snapshots:extensions.bzl", "snapshots")
snapshots = use_extension("//snapshots:extensions.bzl", "snapshots")
snapshots.toolchains(from_source = True)

use_repo(
snapshots,
"snapshots_snaptool_toolchains",
Expand Down
3 changes: 0 additions & 3 deletions snapshots/extensions.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("@com_cognitedata_bazel_snapshots//snapshots:dependencies.bzl", "go_dependencies")
load("@com_cognitedata_bazel_snapshots//snapshots:repositories.bzl", "snapshots_register_toolchains")

toolchains = tag_class(attrs = {
Expand All @@ -17,8 +16,6 @@ toolchains = tag_class(attrs = {

# buildifier: disable=unused-variable
def _snapshots_extension(module_ctx):
go_dependencies()

registrations = {}
for mod in module_ctx.modules:
for toolchains in mod.tags.toolchains:
Expand Down

0 comments on commit a198e00

Please sign in to comment.