bazel: add initial Gazelle integration
Gazelle is a build file generator for Go modules.
This commit is contained in:
parent
c6bbf95022
commit
c78ee582ce
|
@ -0,0 +1,22 @@
|
||||||
|
load("@bazel_gazelle//:def.bzl", "gazelle")
|
||||||
|
|
||||||
|
# gazelle:prefix go.firedancer.io/radiance
|
||||||
|
# gazelle:build_file_name BUILD
|
||||||
|
gazelle(name = "gazelle")
|
||||||
|
|
||||||
|
gazelle(
|
||||||
|
name = "gazelle-update-repos",
|
||||||
|
args = [
|
||||||
|
"-from_file=go.mod",
|
||||||
|
"-to_macro=third_party/go/repositories.bzl%go_repositories",
|
||||||
|
"-prune",
|
||||||
|
],
|
||||||
|
command = "update-repos",
|
||||||
|
)
|
||||||
|
|
||||||
|
# Shortcut for the Go SDK
|
||||||
|
alias(
|
||||||
|
name = "go",
|
||||||
|
actual = "@go_sdk//:bin/go",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
15
WORKSPACE
15
WORKSPACE
|
@ -32,8 +32,23 @@ go_rules_dependencies()
|
||||||
|
|
||||||
go_register_toolchains(version = "1.19.2")
|
go_register_toolchains(version = "1.19.2")
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Custom Go dependencies #
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# add `go_repository` rules here to override Gazelle-generated files.
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# go mod #
|
||||||
|
################################################################################
|
||||||
|
|
||||||
gazelle_dependencies()
|
gazelle_dependencies()
|
||||||
|
|
||||||
|
load("//:third_party/go/repositories.bzl", "go_repositories")
|
||||||
|
|
||||||
|
# gazelle:repository_macro third_party/go/repositories.bzl%go_repositories
|
||||||
|
go_repositories()
|
||||||
|
|
||||||
# Protobuf
|
# Protobuf
|
||||||
|
|
||||||
http_archive(
|
http_archive(
|
||||||
|
|
Loading…
Reference in New Issue