-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
document that repository_ctx.template requires text files #11857
Comments
As I commented at #11858 (comment), yes, So the code is working as in intended, but the documentation is not. |
This closes #136 `repository_ctx` is meant to work on "text" files and does text encoding and decoding, which breaks in the context of a binary file. There is no `cp` API in repository_ctx, as suggested in bazelbuild/bazel#11858, but bazelbuild/bazel#11857 suggested to use this approach with `repository_ctx.file`.
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team ( |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team ( |
Description of the problem / feature request:
repository_ctx.template
seems to corrupt binaries files. For example:Will results in a corrupted file in
outPath
. Tested withsha256sum
.Feature requests: what underlying problem are you trying to solve with this feature?
Using
repository_ctx.template
as a way to copy file. I do realize that it is an abuse of the API, but there is norepository_ctx.copy
.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
What operating system are you running Bazel on?
Linux
What's the output of
bazel info release
?If
bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.nixpkgs
Have you found anything relevant by searching the web?
no.
The text was updated successfully, but these errors were encountered: