buildifier-prebuilt icon indicating copy to clipboard operation
buildifier-prebuilt copied to clipboard

buildifier on Windows not working

Open limdor opened this issue 10 months ago • 0 comments

Issue Declaring a target as follow

buildifier(
    name = "buildifier",
    lint_mode = "warn",
    mode = "check",
    verbose = True,
)

And running it with

bazel run //:buildifier

on Windows in a PowerShell is resulting in not finding buildifier

INFO: Running command line: bazel-bin/buildifier.bat
_main/buildifier.bat C:/users/xavib/_bazel_xavib/ps6fwbht/execroot/_main/bazel-out/x64_windows-fastbuild/bin/buildifier.bat
_repo_mapping C:/users/xavib/_bazel_xavib/ps6fwbht/execroot/_main/bazel-out/x64_windows-fastbuild/bin/buildifier.bat.repo_mapping
buildifier_prebuilt++buildifier_prebuilt_deps_extension+buildifier_windows_amd64/file/buildifier.exe C:/users/xavib/_bazel_xavib/ps6fwbht/external/buildifier_prebuilt++buildifier_prebuilt_deps_extension+buildifier_windows_amd64/file/buildifier.exe
Failed to find buildifier at c:\Users\xavib\_BAZEL~1\ps6fwbht\execroot\_main\BAZEL-~1\X64_WI~1\bin\BUILDI~2.RUN\buildifier_prebuilt++buildifier_prebuilt_deps_extension+buildifier_windows_amd64\file\buildifier.exe

Additional information: I tried also on Appveyor CI and I have the same issue. I saw also that there are 2 PRs open related to this topic for some time:

  • https://github.com/keith/buildifier-prebuilt/pull/90
  • https://github.com/keith/buildifier-prebuilt/pull/89

But I could not find an issue. That is why I opened this one to reflect the current Windows status. With the current information I do not know if it is complelty broken on Windows or it is working only under certain conditions.

Versions: buildifier_prebuilt: 7.3.1 (from bzlmod) Bazel: 8.0 PowerShell:

Name                           Value
----                           -----
PSVersion                      5.1.26100.2161
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.26100.2161
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

limdor avatar Jan 03 '25 12:01 limdor