Inconsistency between sh_binary docs and implementation #20345
Labels
area-Windows
Windows-specific issues and feature requests
P3
We're not considering working on this, but happy to review a PR. (No assignee)
team-Rules-Server
Issues for serverside rules included with Bazel
type: bug
The sh_binary docs say:
We recommend that you name your sh_binary() rules after the name of the script minus the extension (e.g. .sh); the rule name and the file name must be distinct
But on windows, if the sh_binary is written without extension, this error is thrown:
https://github.com/bazelbuild/bazel/blob/b074ddb86eb0cdb7ca96110d6c3c8b602dde08d8/src/main/java/com/google/devtools/build/lib/bazel/rules/sh/ShBinary.java#L132C27-L132C27
This makes it impossible to declare sh_binaries that wrap pre-compiled windows targets and use them in rules or genrules.
Errors are produced both when an extension is used in target name:
And without extension:
The text was updated successfully, but these errors were encountered: