github.com/bazelbuild/bazel-gazelle@v0.36.1-0.20240520142334-61b277ba6fed/MODULE.bazel (about) 1 module( 2 name = "gazelle", 3 version = "0.36.0", 4 repo_name = "bazel_gazelle", 5 ) 6 7 bazel_dep(name = "bazel_features", version = "1.9.1") 8 bazel_dep(name = "bazel_skylib", version = "1.5.0") 9 bazel_dep(name = "protobuf", version = "3.19.6", repo_name = "com_google_protobuf") 10 bazel_dep(name = "rules_go", version = "0.46.0", repo_name = "io_bazel_rules_go") 11 bazel_dep(name = "rules_proto", version = "4.0.0") 12 13 go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk") 14 15 # Known to exist since it is instantiated by rules_go itself. 16 use_repo( 17 go_sdk, 18 "go_host_compatible_sdk_label", 19 ) 20 21 non_module_deps = use_extension("//internal/bzlmod:non_module_deps.bzl", "non_module_deps") 22 use_repo( 23 non_module_deps, 24 "bazel_gazelle_go_repository_cache", 25 "bazel_gazelle_go_repository_tools", 26 "bazel_gazelle_is_bazel_module", 27 ) 28 29 go_deps = use_extension("//:extensions.bzl", "go_deps") 30 go_deps.from_file(go_mod = "//:go.mod") 31 32 # golang.org/x/tools is not a direct dependency of the go code anymore 33 # but bazel buildtools and nogo depend on it. 34 go_deps.module( 35 path = "golang.org/x/tools", 36 sum = "h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ=", 37 version = "v0.18.0", 38 ) 39 use_repo( 40 go_deps, 41 "com_github_bazelbuild_buildtools", 42 "com_github_bmatcuk_doublestar_v4", 43 "com_github_fsnotify_fsnotify", 44 "com_github_google_go_cmp", 45 "com_github_pmezard_go_difflib", 46 "org_golang_x_mod", 47 "org_golang_x_sync", 48 "org_golang_x_tools", 49 "org_golang_x_tools_go_vcs", 50 # Referenced by `gazelle_binary`. 51 "bazel_gazelle_go_repository_config", 52 # Dependencies of rules_go that require special handling in go_deps. 53 "com_github_golang_protobuf", 54 "org_golang_google_protobuf", 55 ) 56 57 bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.4.1", dev_dependency = True) 58 bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc") 59 60 go_sdk_dev = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk", dev_dependency = True) 61 62 # Known to exist since it is instantiated by rules_go itself. 63 use_repo( 64 go_sdk_dev, 65 go_sdk = "go_default_sdk", 66 ) 67 68 # This will only apply in the root module. temporarily needed to fix `bazel_features` in CI. 69 single_version_override( 70 module_name = "rules_go", 71 patch_strip = 1, 72 patches = ["//third_party/patches:rules_go.patch"], 73 )