* perf: use darwin's clonefile syscall
This saves time and disk-space when copying files around on the same
device. File clones (aka reflinks) share backing disk blocks; they
differ from hardlinks in that inodes are not shared and the contents are
copy-on-write.
The Go standard library (as of v1.22) arranges to do a similar thing for file
copies on Linux (see: https://cs.opensource.google/go/go/+/refs/tags/go1.22.6:src/os/zero_copy_linux.go;l=53).
Unfortunately, Mac OS' more limited API is less amenable to that form of
transparent wrapping.
* Assign to named return params and use naked returns
* refactor(release): switch release integrity to be dynamic
This matches rules_py as documented by
https://blog.aspect.build/releasing-bazel-rulesets-rust
It has the benefit that developers no longer get yelled at to vendor some updated integrity hashes into bazel-lib every time they touch the Go sources.
* refactor: echo should produce trailing newline
* chore: bump action-gh-release to avoid Node 16 warning
* chore: update test that is sensitive to compilation mode
We now only use --compilation_mode=opt when cutting a release
* coreutils toolchain: Use statically linked linux amd64 variant
Uutils has a musl release artifact for linux amd64.
In the future, it should probably also be possible to add a
aarch64 musl toolchain. At the moment, this is not an upstream release
artifact.
* coreutils toolchain: temporarily add back old darwin variant
On release 0.0.26 of uutils/coreutils, the darwin x86_64 binary is missing.
Also, any releases between 0.0.23 and 0.0.26 are missing binary artifacts.
Downgrade coreutils toolchain on darwin x86_64 for now.
https://github.com/uutils/coreutils/releases/tag/0.0.26
* only check for blank space between status entries in expand_template
* chore: update tool integrity
---------
Co-authored-by: Alex Eagle <alex@aspect.dev>
Refs #359.
This allows `copy_to_directory` to be run in an external workspace and include files from that workspace automatically once the `copy_to_directory` rule is updated. The rule update needs to be separated from the tool update because the tool is pre-built and vendored rather than built at HEAD.
We used hexadecimal where we meant to use octal.
0x666 in binary is 11001100110 but 0666 is 110110110 (9 digits as
expected)
so this was producing an output like
---xr--r-- 1 108 114 206 Sep 6 20:55 bazel-out/k8-opt/bin/stamped_labels.txt
In particular this makes our bazelrc presets more compliant with client codebases, ensuring they can copy these files and not trip on their own pre-commit check