mirror of
https://github.com/bazelbuild/bazel-skylib
synced 2024-11-28 08:43:51 +00:00
60abca8fa2
* Add the gazelle plugin to the distribution To avoid everyone needing to take a dep on `rules_go`, we do the following: 1. Regular Bazel users need to load `bazel_skylib_gazelle_plugin_workspace` and call that, and then `bazel_skylib_gazelle_plugin_setup` 2. `bzlmod` users need do nothing, but we now include the `rules_go` dep in the `MODULE.bazel` shipped in the release. This is fine, because `bzlmod` will lazily load dependencies. * Run buildifier * Add docstring to `gazelle_setup.bzl` * Move "internal only" marker * Make @com_github_bazelbuild_buildtools visible in the deployed module * Respond to review comments * Move plugin to a nested workspace * Run buildifier * Restore the module declaration from `main` * Bump versions of rules_go and gazelle used in the top-level module to match the ones in gazelle * Respond to review comments and add gazelle to ignored directories so //... works as expected * Add missing descriptor for stardoc * Move gazelle hints into workspace files
67 lines
2 KiB
Python
67 lines
2 KiB
Python
workspace(name = "bazel_skylib")
|
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
|
|
load(":workspace.bzl", "bazel_skylib_workspace")
|
|
|
|
bazel_skylib_workspace()
|
|
|
|
local_repository(
|
|
name = "bazel_skylib_gazelle_plugin",
|
|
path = "gazelle",
|
|
)
|
|
|
|
load("@bazel_skylib_gazelle_plugin//:workspace.bzl", "bazel_skylib_gazelle_plugin_workspace")
|
|
|
|
bazel_skylib_gazelle_plugin_workspace()
|
|
|
|
load("@bazel_skylib_gazelle_plugin//:setup.bzl", "bazel_skylib_gazelle_plugin_setup")
|
|
|
|
bazel_skylib_gazelle_plugin_setup()
|
|
|
|
# Below this line is for documentation generation only,
|
|
# and should thus not be included by dependencies on
|
|
# bazel-skylib.
|
|
|
|
maybe(
|
|
http_archive,
|
|
name = "io_bazel_stardoc",
|
|
sha256 = "3fd8fec4ddec3c670bd810904e2e33170bedfe12f90adf943508184be458c8bb",
|
|
urls = [
|
|
"https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.5.3/stardoc-0.5.3.tar.gz",
|
|
"https://github.com/bazelbuild/stardoc/releases/download/0.5.3/stardoc-0.5.3.tar.gz",
|
|
],
|
|
)
|
|
|
|
load("@io_bazel_stardoc//:setup.bzl", "stardoc_repositories")
|
|
|
|
stardoc_repositories()
|
|
|
|
maybe(
|
|
http_archive,
|
|
name = "rules_pkg",
|
|
sha256 = "a89e203d3cf264e564fcb96b6e06dd70bc0557356eb48400ce4b5d97c2c3720d",
|
|
urls = [
|
|
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.5.1/rules_pkg-0.5.1.tar.gz",
|
|
"https://github.com/bazelbuild/rules_pkg/releases/download/0.5.1/rules_pkg-0.5.1.tar.gz",
|
|
],
|
|
)
|
|
|
|
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
|
|
|
|
rules_pkg_dependencies()
|
|
|
|
maybe(
|
|
name = "rules_cc",
|
|
repo_rule = http_archive,
|
|
sha256 = "4dccbfd22c0def164c8f47458bd50e0c7148f3d92002cdb459c2a96a68498241",
|
|
urls = [
|
|
"https://mirror.bazel.build/github.com/bazelbuild/rules_cc/releases/download/0.0.1/rules_cc-0.0.1.tar.gz",
|
|
"https://github.com/bazelbuild/rules_cc/releases/download/0.0.1/rules_cc-0.0.1.tar.gz",
|
|
],
|
|
)
|
|
|
|
load("//lib:unittest.bzl", "register_unittest_toolchains")
|
|
|
|
register_unittest_toolchains()
|