bazel-contrib / rules_bazel_integration_test

Rules and macros for executing integration tests that use Bazel. Supports running integration tests with multiple versions of Bazel.
Apache License 2.0
39 stars 7 forks source link

17 bzlformat_lint_tests fail on windows with 'buildifier command not found' #332

Open peakschris opened 6 days ago

peakschris commented 6 days ago

bazel --windows_enable_symlinks test //tools:bzlformat_lint_test --enable_runfiles

Executing tests from //tools:bzlformat_lint_test
-----------------------------------------------------------------------------
D:\udu\b\azrngxdp\execroot\_main\bazel-out\x64_windows-fastbuild\bin\tools\bzlformat_lint_test.bat.runfiles\cgrindel_bazel_starlib~\bzlformat\tools\buildifier: line 99: : command not found
tools/bzlformat_lint_test_BUILD.bazel.sh failed with 127.
1 lint tests failed.

The fix is to add a direct dependency to buildifier_prebuilt to MODULE.bazel. It is not clear to me why this is required; the same dependency is declared in cgrindel_bazel_starlib.

# not a direct dependency, but required here for bazel starlib's difftest macros to work
bazel_dep(
    name = "buildifier_prebuilt",
    version = "6.1.2",
)
cgrindel commented 6 days ago

This does seem strange.