bazel-contrib / bazel-contrib/rules_bazel_integration_test

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

Open
#332 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Starlark
Stars
65
Forks
16
Avg merge
1d 9h
Merged PRs (30d)
9

Description

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",
)
```

Contributor guide

Open the contributing guide

Research direction

Start with MODULE.bazel and reproduce the failure using bazel --windows_enable_symlinks test //tools:bzlformat_lint_test --enable_runfiles. Check the dependency relationship with cgrindel_bazel_starlib and buildifier_prebuilt, then confirm that the Windows bzlformat lint tests pass and no longer report buildifier command not found.

Written by the indexing model from the issue text.

Assessment

Tech stack
build-system
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.