From 0e5f1695230150308905a615926d85409f520223 Mon Sep 17 00:00:00 2001 From: Chris Brown Date: Fri, 28 Jun 2024 20:27:29 -0400 Subject: [PATCH 1/9] update --- .gitattributes | 5 +++++ MODULE.bazel | 6 +++++- bzlformat/private/BUILD.bazel | 1 + bzlformat/private/bzlformat_lint_test.bzl | 17 +++++++++++++---- tests/bzlformat_tests/BUILD.bazel | 3 +++ .../release_artifact_tests/archive_test.sh | 19 +++++++++++++++++-- .../private/updatesrc_diff_and_update.bzl | 1 + 7 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..be75c150 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# The behavior of core.autocrlf=input is to force conversion to LF on addition +# into the repository and not to perform any conversion on checkout; that is, +# to always use LF endings regardless of the user's settings. This is set in +# .gitattributes as '* eol=lf' +* eol=lf diff --git a/MODULE.bazel b/MODULE.bazel index cb4e4029..41241cd9 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -24,9 +24,13 @@ bazel_dep( ) bazel_dep( name = "buildifier_prebuilt", - version = "6.0.0.1", + version = "6.1.2", ) bazel_dep(name = "platforms", version = "0.0.6") +bazel_dep( + name = "aspect_bazel_lib", + version = "2.0.1" +) go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps") go_deps.from_file(go_mod = "//:go.mod") diff --git a/bzlformat/private/BUILD.bazel b/bzlformat/private/BUILD.bazel index d650c520..db017cc3 100644 --- a/bzlformat/private/BUILD.bazel +++ b/bzlformat/private/BUILD.bazel @@ -20,6 +20,7 @@ bzl_library( ":bzlformat_format", "//bzllib:defs", "//updatesrc:defs", + "@aspect_bazel_lib//lib:windows_utils", "@bazel_skylib//rules:diff_test", ], ) diff --git a/bzlformat/private/bzlformat_lint_test.bzl b/bzlformat/private/bzlformat_lint_test.bzl index c836b3cd..fa361a37 100644 --- a/bzlformat/private/bzlformat_lint_test.bzl +++ b/bzlformat/private/bzlformat_lint_test.bzl @@ -1,5 +1,6 @@ """Definition for bzlformat_lint_test rule.""" +load("@aspect_bazel_lib//lib:windows_utils.bzl", "create_windows_native_launcher_script") load("@bazel_skylib//lib:shell.bzl", "shell") load("//shlib/rules:execute_binary.bzl", "execute_binary_utils") @@ -23,9 +24,9 @@ def _bzlformat_lint_test_impl(ctx): lint_test_names = [lt.short_path for lt in lint_tests] # Write a script that executes all of the lint tests - out = ctx.actions.declare_file(ctx.label.name + ".sh") + bash_launcher = ctx.actions.declare_file(ctx.label.name + ".sh") ctx.actions.write( - output = out, + output = bash_launcher, is_executable = True, content = """\ #!/usr/bin/env bash @@ -55,15 +56,19 @@ echo "All tests succeeded!" """, ) + is_windows = ctx.target_platform_has_constraint(ctx.attr._windows_constraint[platform_common.ConstraintValueInfo]) + launcher = create_windows_native_launcher_script(ctx, bash_launcher) if is_windows else bash_launcher + extra_runfiles = [bash_launcher] if is_windows else [] + # Gather the runfiles - runfiles = ctx.runfiles(files = ctx.files.srcs + lint_tests) + runfiles = ctx.runfiles(files = ctx.files.srcs + lint_tests + extra_runfiles) runfiles = execute_binary_utils.collect_runfiles( runfiles, [ctx.attr._buildifier], ) # Return the DefaultInfo - return DefaultInfo(executable = out, runfiles = runfiles) + return DefaultInfo(executable = launcher, runfiles = runfiles) bzlformat_lint_test = rule( implementation = _bzlformat_lint_test_impl, @@ -85,6 +90,10 @@ bzlformat_lint_test = rule( allow_files = True, doc = "The `buildifier` script that executes the formatting.", ), + "_windows_constraint": attr.label(default = "@platforms//os:windows"), }, + toolchains = [ + "@bazel_tools//tools/sh:toolchain_type", + ], doc = "Lints the specified Starlark files using Buildifier.", ) diff --git a/tests/bzlformat_tests/BUILD.bazel b/tests/bzlformat_tests/BUILD.bazel index e7d4ed41..a547de19 100644 --- a/tests/bzlformat_tests/BUILD.bazel +++ b/tests/bzlformat_tests/BUILD.bazel @@ -53,6 +53,7 @@ _FORMAT_INFOS = [ name = fi[0] + "_bzl", out = fi[0] + ".bzl", content = fi[1], + newline = "unix", ) for fi in _FORMAT_INFOS ] @@ -64,11 +65,13 @@ bzlformat_format( ) # Write the expected content +# buildifier writes unix newlines; match that [ write_file( name = fi[0] + "_bzl_expected", out = fi[0] + ".bzl.expected", content = fi[2], + newline = "unix", ) for fi in _FORMAT_INFOS ] diff --git a/tests/bzlrelease_tests/rules_tests/release_artifact_tests/archive_test.sh b/tests/bzlrelease_tests/rules_tests/release_artifact_tests/archive_test.sh index 47ac090f..a48dd3ec 100755 --- a/tests/bzlrelease_tests/rules_tests/release_artifact_tests/archive_test.sh +++ b/tests/bzlrelease_tests/rules_tests/release_artifact_tests/archive_test.sh @@ -11,20 +11,35 @@ source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \ { echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e # --- end runfiles.bash initialization v3 --- +# return a unix-style path on all platforms +# workaround for https://github.com/bazelbuild/bazel/issues/22803 +function rlocation_as_unix() { + path=$(rlocation ${1}) + case "$(uname -s)" in + CYGWIN* | MINGW32* | MSYS* | MINGW*) + path=${path//\\//} # backslashes to forward + path=/${path//:/} # d:/ to /d/ + ;; + esac + echo $path +} + # MARK - Locate Deps assertions_sh_location=cgrindel_bazel_starlib/shlib/lib/assertions.sh -assertions_sh="$(rlocation "${assertions_sh_location}")" || \ +assertions_sh="$(rlocation_as_unix "${assertions_sh_location}")" || \ (echo >&2 "Failed to locate ${assertions_sh_location}" && exit 1) # shellcheck source=SCRIPTDIR/../../../../shlib/lib/assertions.sh source "${assertions_sh}" archive_tar_gz_location=cgrindel_bazel_starlib/tests/bzlrelease_tests/rules_tests/release_artifact_tests/archive.tar.gz -archive_tar_gz="$(rlocation "${archive_tar_gz_location}")" || \ +archive_tar_gz="$(rlocation_as_unix "${archive_tar_gz_location}")" || \ (echo >&2 "Failed to locate ${archive_tar_gz_location}" && exit 1) + # MARK - Test +echo ${archive_tar_gz} contents="$(tar -tf "${archive_tar_gz}")" assert_match "bzlrelease/" "${contents}" assert_match "bzlrelease/private/" "${contents}" diff --git a/updatesrc/private/updatesrc_diff_and_update.bzl b/updatesrc/private/updatesrc_diff_and_update.bzl index b7ec8c7c..36c79749 100644 --- a/updatesrc/private/updatesrc_diff_and_update.bzl +++ b/updatesrc/private/updatesrc_diff_and_update.bzl @@ -57,6 +57,7 @@ def updatesrc_diff_and_update( name = diff_test_prefix + src_name + diff_test_suffix, file1 = src, file2 = out, + file2_to_lf = True, visibility = diff_test_visibility, **kwargs ) From 5ddd5243f581dae897b8b0e1780624990c222716 Mon Sep 17 00:00:00 2001 From: Chris Brown Date: Fri, 28 Jun 2024 20:27:37 -0400 Subject: [PATCH 2/9] update --- .bazelrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.bazelrc b/.bazelrc index 15df5cb2..c3e4cf64 100644 --- a/.bazelrc +++ b/.bazelrc @@ -21,6 +21,13 @@ build:ci --//build:execution_env=ci common --enable_bzlmod build --@cgrindel_bazel_starlib//bzlmod:enabled +# windows stuff +startup --windows_enable_symlinks +common --enable_runfiles +common --override_module=bazel_skylib=d:\\workdir\\github\\bazel-skylib +#common --override_module=aspect_bazel_lib=d:\\workdir\\bazel-lib2 +common --test_env=BAZEL_SH + # Try to import a local.rc file; typically, written by CI try-import %workspace%/local.bazelrc From f2243e099b65968dfa7d79c7758229dbfb52cc47 Mon Sep 17 00:00:00 2001 From: Chris Brown <77508021+peakschris@users.noreply.github.com> Date: Sat, 29 Jun 2024 06:10:30 -0400 Subject: [PATCH 3/9] add comment --- updatesrc/private/updatesrc_diff_and_update.bzl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/updatesrc/private/updatesrc_diff_and_update.bzl b/updatesrc/private/updatesrc_diff_and_update.bzl index 36c79749..8686292d 100644 --- a/updatesrc/private/updatesrc_diff_and_update.bzl +++ b/updatesrc/private/updatesrc_diff_and_update.bzl @@ -53,11 +53,12 @@ def updatesrc_diff_and_update( src = srcs[idx] out = outs[idx] src_name = src.replace("/", "_") + # this difftest fails as file2 has CRLf on windows + # fix: https://github.com/bazelbuild/bazel-skylib/pull/527 diff_test( name = diff_test_prefix + src_name + diff_test_suffix, file1 = src, file2 = out, - file2_to_lf = True, visibility = diff_test_visibility, **kwargs ) From 81caa7db96b6a8ee631ba835fd59b42bd969a79f Mon Sep 17 00:00:00 2001 From: Chris Brown <77508021+peakschris@users.noreply.github.com> Date: Sat, 29 Jun 2024 06:14:29 -0400 Subject: [PATCH 4/9] update bazelrc --- .bazelrc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.bazelrc b/.bazelrc index c3e4cf64..6bb69431 100644 --- a/.bazelrc +++ b/.bazelrc @@ -7,7 +7,7 @@ build --deleted_packages=examples/bzlformat/simple,examples/bzlformat/simple/moc query --deleted_packages=examples/bzlformat/simple,examples/bzlformat/simple/mockascript,examples/bzlformat/simple/mockascript/internal,examples/bzlmod_e2e,examples/bzlmod_e2e/header,examples/bzlmod_e2e/mockascript,examples/bzlmod_e2e/mockascript/internal,examples/bzlmod_e2e/srcs/Bar,examples/bzlmod_e2e/srcs/Foo,examples/markdown/simple,examples/markdown/simple/bar,examples/updatesrc/simple,examples/updatesrc/simple/header,examples/updatesrc/simple/srcs/Bar,examples/updatesrc/simple/srcs/Foo,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace/foo,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace/foo/bar,tests/bzltidy_tests/workspace,tests/bzltidy_tests/workspace/child_workspaces/bar,tests/bzltidy_tests/workspace/child_workspaces/foo,tests/updatesrc_tests/workspace/diff_and_update_test,tests/updatesrc_tests/workspace/diff_and_update_test/with_custom_values,tests/updatesrc_tests/workspace/diff_and_update_test/with_defaults,tests/updatesrc_tests/workspace/letters # Import Shared settings -import %workspace%/shared.bazelrc +import %workspace%/shared.bazelrc# # Import CI settings. import %workspace%/ci.bazelrc @@ -21,12 +21,8 @@ build:ci --//build:execution_env=ci common --enable_bzlmod build --@cgrindel_bazel_starlib//bzlmod:enabled -# windows stuff +# windows requires symlinks to work well startup --windows_enable_symlinks -common --enable_runfiles -common --override_module=bazel_skylib=d:\\workdir\\github\\bazel-skylib -#common --override_module=aspect_bazel_lib=d:\\workdir\\bazel-lib2 -common --test_env=BAZEL_SH # Try to import a local.rc file; typically, written by CI try-import %workspace%/local.bazelrc From 42382d0bd985a1bbaf11b871b4b191414121c547 Mon Sep 17 00:00:00 2001 From: Chris Brown <77508021+peakschris@users.noreply.github.com> Date: Sat, 29 Jun 2024 06:15:41 -0400 Subject: [PATCH 5/9] fix typo --- .bazelrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelrc b/.bazelrc index 6bb69431..612092d8 100644 --- a/.bazelrc +++ b/.bazelrc @@ -7,7 +7,7 @@ build --deleted_packages=examples/bzlformat/simple,examples/bzlformat/simple/moc query --deleted_packages=examples/bzlformat/simple,examples/bzlformat/simple/mockascript,examples/bzlformat/simple/mockascript/internal,examples/bzlmod_e2e,examples/bzlmod_e2e/header,examples/bzlmod_e2e/mockascript,examples/bzlmod_e2e/mockascript/internal,examples/bzlmod_e2e/srcs/Bar,examples/bzlmod_e2e/srcs/Foo,examples/markdown/simple,examples/markdown/simple/bar,examples/updatesrc/simple,examples/updatesrc/simple/header,examples/updatesrc/simple/srcs/Bar,examples/updatesrc/simple/srcs/Foo,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace/foo,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace/foo/bar,tests/bzltidy_tests/workspace,tests/bzltidy_tests/workspace/child_workspaces/bar,tests/bzltidy_tests/workspace/child_workspaces/foo,tests/updatesrc_tests/workspace/diff_and_update_test,tests/updatesrc_tests/workspace/diff_and_update_test/with_custom_values,tests/updatesrc_tests/workspace/diff_and_update_test/with_defaults,tests/updatesrc_tests/workspace/letters # Import Shared settings -import %workspace%/shared.bazelrc# +import %workspace%/shared.bazelrc # Import CI settings. import %workspace%/ci.bazelrc From d071aa19282a1a4129dcab88b3d092d14cee1ba8 Mon Sep 17 00:00:00 2001 From: Chris Brown <77508021+peakschris@users.noreply.github.com> Date: Sat, 29 Jun 2024 06:24:46 -0400 Subject: [PATCH 6/9] fix formatting --- updatesrc/private/updatesrc_diff_and_update.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/updatesrc/private/updatesrc_diff_and_update.bzl b/updatesrc/private/updatesrc_diff_and_update.bzl index 8686292d..f48a0ff0 100644 --- a/updatesrc/private/updatesrc_diff_and_update.bzl +++ b/updatesrc/private/updatesrc_diff_and_update.bzl @@ -53,6 +53,7 @@ def updatesrc_diff_and_update( src = srcs[idx] out = outs[idx] src_name = src.replace("/", "_") + # this difftest fails as file2 has CRLf on windows # fix: https://github.com/bazelbuild/bazel-skylib/pull/527 diff_test( From cb37bedb2885f1543e18d1bd416e88f5d1213229 Mon Sep 17 00:00:00 2001 From: Chris Brown <77508021+peakschris@users.noreply.github.com> Date: Sat, 29 Jun 2024 07:57:23 -0400 Subject: [PATCH 7/9] runfiles on by default on windows --- .bazelrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.bazelrc b/.bazelrc index 612092d8..202d867e 100644 --- a/.bazelrc +++ b/.bazelrc @@ -24,6 +24,10 @@ build --@cgrindel_bazel_starlib//bzlmod:enabled # windows requires symlinks to work well startup --windows_enable_symlinks +# this library requires runfiles for the bzlformat_lint_test +# but this is off by default on windows. Switch it on. +common --enable_runfiles + # Try to import a local.rc file; typically, written by CI try-import %workspace%/local.bazelrc From d538ef5baf8388aea23bc803f21b8f66cdaf93bb Mon Sep 17 00:00:00 2001 From: Chris Brown <77508021+peakschris@users.noreply.github.com> Date: Sat, 29 Jun 2024 14:09:39 -0400 Subject: [PATCH 8/9] remove debug code --- .../rules_tests/release_artifact_tests/archive_test.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/bzlrelease_tests/rules_tests/release_artifact_tests/archive_test.sh b/tests/bzlrelease_tests/rules_tests/release_artifact_tests/archive_test.sh index a48dd3ec..193dd6be 100755 --- a/tests/bzlrelease_tests/rules_tests/release_artifact_tests/archive_test.sh +++ b/tests/bzlrelease_tests/rules_tests/release_artifact_tests/archive_test.sh @@ -39,7 +39,6 @@ archive_tar_gz="$(rlocation_as_unix "${archive_tar_gz_location}")" || \ # MARK - Test -echo ${archive_tar_gz} contents="$(tar -tf "${archive_tar_gz}")" assert_match "bzlrelease/" "${contents}" assert_match "bzlrelease/private/" "${contents}" From abedc6b600e7bfdb568be70474ae08f574593e4d Mon Sep 17 00:00:00 2001 From: Chris Brown <77508021+peakschris@users.noreply.github.com> Date: Mon, 1 Jul 2024 11:54:47 -0400 Subject: [PATCH 9/9] add aspect_bazel_lib to workspace snippets --- README.md | 4 ++++ deps.bzl | 8 ++++++++ examples/bzlformat/simple/WORKSPACE | 4 ++++ examples/markdown/simple/WORKSPACE | 4 ++++ examples/updatesrc/simple/WORKSPACE | 4 ++++ release/workspace_snippet.tmpl | 4 ++++ .../tools_tests/missing_pkgs_tests/workspace/WORKSPACE | 4 ++++ .../generate_release_notes_tests/workspace_snippet.tmpl | 4 ++++ .../workspace_snippet.tmpl | 4 ++++ .../update_readme_tests/workspace_snippet.tmpl | 4 ++++ tests/bzlrelease_tests/tools_tests/workspace_snippet.tmpl | 4 ++++ tests/updatesrc_tests/workspace/WORKSPACE | 4 ++++ 12 files changed, 52 insertions(+) diff --git a/README.md b/README.md index 28561cd4..71efd582 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,10 @@ bazel_starlib_dependencies() load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") bazel_skylib_workspace() + +load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") + +aspect_bazel_lib_dependencies() ``` diff --git a/deps.bzl b/deps.bzl index d1003385..81afd8cd 100644 --- a/deps.bzl +++ b/deps.bzl @@ -59,5 +59,13 @@ def bazel_starlib_dependencies(): ], ) + maybe( + http_archive, + name = "aspect_bazel_lib", + sha256 = "4b32cf6feab38b887941db022020eea5a49b848e11e3d6d4d18433594951717a", + strip_prefix = "bazel-lib-2.0.1", + url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.0.1/bazel-lib-v2.0.1.tar.gz", + ) + _bazeldoc_dependencies() _prebuilt_buildtools_dependencies() diff --git a/examples/bzlformat/simple/WORKSPACE b/examples/bzlformat/simple/WORKSPACE index 94760cdd..c72654c1 100644 --- a/examples/bzlformat/simple/WORKSPACE +++ b/examples/bzlformat/simple/WORKSPACE @@ -13,6 +13,10 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") bazel_skylib_workspace() +load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") + +aspect_bazel_lib_dependencies() + # Buildifier Dependencies load("@buildifier_prebuilt//:deps.bzl", "buildifier_prebuilt_deps") diff --git a/examples/markdown/simple/WORKSPACE b/examples/markdown/simple/WORKSPACE index 2a34045e..c3df493e 100644 --- a/examples/markdown/simple/WORKSPACE +++ b/examples/markdown/simple/WORKSPACE @@ -13,6 +13,10 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") bazel_skylib_workspace() +load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") + +aspect_bazel_lib_dependencies() + # MARK: - Markdown TOC Deps # Workaround for missing strict deps error as described here: diff --git a/examples/updatesrc/simple/WORKSPACE b/examples/updatesrc/simple/WORKSPACE index b5b6817f..bed7263c 100644 --- a/examples/updatesrc/simple/WORKSPACE +++ b/examples/updatesrc/simple/WORKSPACE @@ -12,3 +12,7 @@ bazel_starlib_dependencies() load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") bazel_skylib_workspace() + +load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") + +aspect_bazel_lib_dependencies() diff --git a/release/workspace_snippet.tmpl b/release/workspace_snippet.tmpl index 1c706977..0b82c89c 100644 --- a/release/workspace_snippet.tmpl +++ b/release/workspace_snippet.tmpl @@ -9,3 +9,7 @@ bazel_starlib_dependencies() load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") bazel_skylib_workspace() + +load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") + +aspect_bazel_lib_dependencies() diff --git a/tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace/WORKSPACE b/tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace/WORKSPACE index 93aa2826..0f478a93 100644 --- a/tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace/WORKSPACE +++ b/tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace/WORKSPACE @@ -13,6 +13,10 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") bazel_skylib_workspace() +load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") + +aspect_bazel_lib_dependencies() + # Buildifier Dependencies load("@buildifier_prebuilt//:deps.bzl", "buildifier_prebuilt_deps") diff --git a/tests/bzlrelease_tests/rules_tests/generate_release_notes_tests/workspace_snippet.tmpl b/tests/bzlrelease_tests/rules_tests/generate_release_notes_tests/workspace_snippet.tmpl index d71cbe48..3003868b 100644 --- a/tests/bzlrelease_tests/rules_tests/generate_release_notes_tests/workspace_snippet.tmpl +++ b/tests/bzlrelease_tests/rules_tests/generate_release_notes_tests/workspace_snippet.tmpl @@ -13,3 +13,7 @@ bazel_skylib_workspace() load("@io_bazel_stardoc//:setup.bzl", "stardoc_repositories") stardoc_repositories() + +load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") + +aspect_bazel_lib_dependencies() diff --git a/tests/bzlrelease_tests/rules_tests/generate_workspace_snippet_tests/workspace_snippet.tmpl b/tests/bzlrelease_tests/rules_tests/generate_workspace_snippet_tests/workspace_snippet.tmpl index d71cbe48..3003868b 100644 --- a/tests/bzlrelease_tests/rules_tests/generate_workspace_snippet_tests/workspace_snippet.tmpl +++ b/tests/bzlrelease_tests/rules_tests/generate_workspace_snippet_tests/workspace_snippet.tmpl @@ -13,3 +13,7 @@ bazel_skylib_workspace() load("@io_bazel_stardoc//:setup.bzl", "stardoc_repositories") stardoc_repositories() + +load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") + +aspect_bazel_lib_dependencies() diff --git a/tests/bzlrelease_tests/rules_tests/update_readme_tests/workspace_snippet.tmpl b/tests/bzlrelease_tests/rules_tests/update_readme_tests/workspace_snippet.tmpl index d71cbe48..3003868b 100644 --- a/tests/bzlrelease_tests/rules_tests/update_readme_tests/workspace_snippet.tmpl +++ b/tests/bzlrelease_tests/rules_tests/update_readme_tests/workspace_snippet.tmpl @@ -13,3 +13,7 @@ bazel_skylib_workspace() load("@io_bazel_stardoc//:setup.bzl", "stardoc_repositories") stardoc_repositories() + +load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") + +aspect_bazel_lib_dependencies() diff --git a/tests/bzlrelease_tests/tools_tests/workspace_snippet.tmpl b/tests/bzlrelease_tests/tools_tests/workspace_snippet.tmpl index d71cbe48..3003868b 100644 --- a/tests/bzlrelease_tests/tools_tests/workspace_snippet.tmpl +++ b/tests/bzlrelease_tests/tools_tests/workspace_snippet.tmpl @@ -13,3 +13,7 @@ bazel_skylib_workspace() load("@io_bazel_stardoc//:setup.bzl", "stardoc_repositories") stardoc_repositories() + +load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") + +aspect_bazel_lib_dependencies() diff --git a/tests/updatesrc_tests/workspace/WORKSPACE b/tests/updatesrc_tests/workspace/WORKSPACE index 62c90b15..4b9b0047 100644 --- a/tests/updatesrc_tests/workspace/WORKSPACE +++ b/tests/updatesrc_tests/workspace/WORKSPACE @@ -12,3 +12,7 @@ bazel_starlib_dependencies() load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") bazel_skylib_workspace() + +load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") + +aspect_bazel_lib_dependencies()