Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
peakschris opened this issue Jun 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@peakschris
Copy link
Contributor

peakschris commented Jun 29, 2024

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 cgrindel added the bug Something isn't working label Jun 29, 2024
@cgrindel
Copy link
Member

This does seem strange.

cgrindel pushed a commit that referenced this issue Jul 3, 2024
There are four issues when running on windows:

1.
#330
2.
#331
3.
#332
4.
#333

This PR fixes 3 and 4.

There are related PRs in bazel-skylib and bazel-starlib. There is no
dependency -- the PRs can close in any order.
- cgrindel/bazel-starlib#446 (fixes 1)
- bazelbuild/bazel-skylib#527 (fixes 2)

### Test results:
Before:
--enable_runfiles: 0 pass
--noenable_runfiles: 0 pass

After this PR:
--enable_runfiles: 52 pass, 19 failures
--noenable_runfiles: 51 pass, 20 failures (17 are doc diff-tests due to
bazel-starlib)

After this PR, together with wip PRs for 1 and 2:
--enable_runfiles: 71 pass, 0 failures
--noenable_runfiles: 51 pass, 20 failures (all due to bazel-starlib)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants