Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Bug]: Various issues running examples on windows #294

Open
peakschris opened this issue Jun 16, 2024 · 2 comments
Open

[Bug]: Various issues running examples on windows #294

peakschris opened this issue Jun 16, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@peakschris
Copy link
Contributor

peakschris commented Jun 16, 2024

What happened?

There are various issues when running the example repo on Windows. It would be nice to fix these and give a better starting experience.

Various linters/formatters don't work:

  • clang-tidy/clang-format don't have windows target preconfigured
  • buf fails
  • etc

Issues due to lack of windows support in other bazel modules

  • bash lint.sh --fix //src:hello_cc fails on windows due to missing node.bat:
FATAL: aspect_rules_js[js_binary]: node wrapper '/d/udu/b/l2x2bhay/execroot/_main/./external/aspect_rules_lint~/lint/private/patcher_node_bin/node.bat' not found
  • bazel run //docs:update_10 fails:
Target //docs:update_10 failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: Analysis of target '//docs:update_10' failed; build aborted: Target //docs:update_10 is incompatible and cannot be built, but was explicitly requested.
Dependency chain:
    //docs:update_10 (2bc110)
    //docs:clang-tidy-docgen.md (2bc110)
    //docs:clang-tidy (2bc110)   <-- target platform (@@local_config_platform//:host) didn't satisfy constraint @@platforms//:incompatible

Issues local to examples repo

  • example/.bazeliskrc causes builds to fail as aspect-cli doesn't support windows. A workaround is to delete this file.
  • example/.bazelversion causes builds to fail as bazelisk doesn't support ../ notation. A workaround is to copy the parent .bazelversion into examples.
  • lint.sh only returns a single target result, see [Bug]: lint.sh stops on first issue on Windows #178
  • jq isn't installed by default on windows. This command grabs it: curl -L -o jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe

Version

Development (host) and target OS/architectures:

Output of bazel --version:

7.1.1

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:

rules_lint latest

Language(s) and/or frameworks involved:

all

How to reproduce

Clone repo on windows
cd example
set BAZEL_SH=c:\msys64\usr\bin\bash.exe
get jq.exe
bazel test //...

Any other information?

No response

@peakschris peakschris added the bug Something isn't working label Jun 16, 2024
@peakschris
Copy link
Contributor Author

multitool PR: theoremlp/rules_multitool#45
toolchains_llvm PR: bazel-contrib/toolchains_llvm#342

@peakschris
Copy link
Contributor Author

rules_multirun issue: keith/rules_multirun#56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant