Windows: Remove Bash dependency
meteorcloudy opened this issue ยท 2 comments
๐ feature request
Description
Rules released in rules_nodejs should not depend on Bash on Windows.
Describe the solution you'd like
We currently depends on Bash in the following places:
- sh_binary/sh_test: To be removed by #1078
- shell script for launching nodejs binary, node_launcher.sh and launcher for protractor_web_test
We can re-implement the logic in this file in nodejs, then use a simple Bash script to run the node script on Linux and a Batch script to run it on Windows. (In a similar way we use a Batch script to run Bash currently, see windows_utils.bzl) - ctx.actions.run just to
cp
files at
ctx.actions.run_shell
API in rollup_bundle.bzl will go away since the legacy rollup_bundle will be deprecated/removed by 1.0.
I checked in the release artifact of rules_nodejs, we don't have any usage of genrule, so that's nice. In the rules_nodejs repo, we still use some genrules, but I believe that's fine.
To test we can set BAZEL_SH=C:/not/exist/bash.exe
or pass --shell_executable=
during the build.
/cc @alexeagle
This is a great tracking bug to have. I have a party interested in running rules_nodejs on windows so if you can utilize this tracking bug or something else to keep track of windows incompatibilities I would be happy to make PRs to fix some of them which affect my client
Hi @mrmeku , this bug is intended to track the progress of making rules_nodejs Bashless on Windows. Do you want to contribute to it? The main blocker is to replacing the node_launcher.sh
script.