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: drop repo_name aliases #3

Merged
merged 3 commits into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
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
22 changes: 14 additions & 8 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
load("@bazel_gazelle//:def.bzl", "gazelle")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@gazelle//:def.bzl", "DEFAULT_LANGUAGES", "gazelle", "gazelle_binary")
load("@rules_go//go:def.bzl", "go_library")

# gazelle:exclude testdata/*
# gazelle:exclude examples/*

gazelle(name = "gazelle")

gazelle_binary(
name = "gazelle_binary",
languages = DEFAULT_LANGUAGES + ["//:gazelle_oci"],
visibility = ["//visibility:public"],
)

go_library(
name = "gazelle_oci",
srcs = ["lang.go"],
Expand All @@ -14,11 +20,11 @@ go_library(
deps = [
"//internal/module",
"//internal/rule",
"@bazel_gazelle//config:go_default_library",
"@bazel_gazelle//label:go_default_library",
"@bazel_gazelle//language:go_default_library",
"@bazel_gazelle//repo:go_default_library",
"@bazel_gazelle//resolve:go_default_library",
"@bazel_gazelle//rule:go_default_library",
"@gazelle//config:go_default_library",
"@gazelle//label:go_default_library",
"@gazelle//language:go_default_library",
"@gazelle//repo:go_default_library",
"@gazelle//resolve:go_default_library",
"@gazelle//rule:go_default_library",
],
)
14 changes: 11 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@ module(
version = "1.0",
)

bazel_dep(name = "rules_go", version = "0.46.0", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.35.0", repo_name = "bazel_gazelle")
bazel_dep(name = "rules_go", version = "0.46.0")
bazel_dep(name = "gazelle", version = "0.35.0")

go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
# waiting for release 0.36.0 to include
# https://github.com/bazelbuild/bazel-gazelle/pull/1743
git_override(
module_name = "gazelle",
commit = "2a2f5b8ca1da21e2dbfa1b60eb87c175fdd09bfe",
remote = "https://github.com/bazelbuild/bazel-gazelle",
)

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

# All *direct* Go dependencies of the module have to be listed explicitly.
Expand Down
Loading