Implement create_shim to create a shim on Windows #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #19
The
sh_binaries
rule can bundle Bazel tracked executableFile
objects as collections of tools. Tools can be imported into Bazel by
download or built by Bazel. However, in some use-cases, users need to
import executales that are installed outside of Bazel from the system.
On Unix systems this can be achieved in a hermetic way by creating a
symbolic link in a repository rule. However, on Windows, symbolic file
links are not generally available and the corresponding
repository_ctx
method will create a copy. However, file copies do not generally work,
as executables may expect auxiliary files next to their installation
path.
A shim offers an alternative on Windows. A shim is a small executable,
accompanied by a small data file that points to the destination. It can
be thought of as a custom executable that imitates the functionality of
a symbolic file link.