diff --git a/examples/bzlmod_build_file_generation/MODULE.bazel b/examples/bzlmod_build_file_generation/MODULE.bazel index 6bc5880792..846c551948 100644 --- a/examples/bzlmod_build_file_generation/MODULE.bazel +++ b/examples/bzlmod_build_file_generation/MODULE.bazel @@ -35,6 +35,13 @@ local_path_override( path = "../../gazelle", ) +bazel_dep(name = "bazel_skylib", version = "1.5.0") +single_version_override( + module_name = "bazel_skylib", + patches = ["//:bazel-skylib.patch"], + version = "1.5.0", +) + # The following stanza defines the dependency for gazelle # See here https://github.com/bazelbuild/bazel-gazelle/releases/ for the # latest version. diff --git a/examples/bzlmod_build_file_generation/bazel-skylib.patch b/examples/bzlmod_build_file_generation/bazel-skylib.patch new file mode 100644 index 0000000000..4c88fe37fd --- /dev/null +++ b/examples/bzlmod_build_file_generation/bazel-skylib.patch @@ -0,0 +1,26 @@ +diff --git rules/diff_test.bzl rules/diff_test.bzl +index 0f27f35..36da606 100644 +--- rules/diff_test.bzl ++++ rules/diff_test.bzl +@@ -32,7 +32,7 @@ def _diff_test_impl(ctx): + ctx.actions.write( + output = test_bin, + content = """@rem Generated by diff_test.bzl, do not edit. +-@echo off ++@echo on + SETLOCAL ENABLEEXTENSIONS + SETLOCAL ENABLEDELAYEDEXPANSION + set MF=%RUNFILES_MANIFEST_FILE:/=\\% +@@ -79,7 +79,11 @@ if "!RF2!" equ "" ( + exit /b 1 + ) + ) +-fc.exe 2>NUL 1>NUL /B "!RF1!" "!RF2!" ++echo "!RF1!" ++echo "!RF2!" ++REM type "!RF1!" ++REM type "!RF2!" ++fc.exe "!RF1!" "!RF2!" + if %ERRORLEVEL% neq 0 ( + if %ERRORLEVEL% equ 1 ( + echo>&2 FAIL: files "{file1}" and "{file2}" differ. {fail_msg}