* feat: support bzlmod repo name aliases in tarred runfiles
Under bzlmod, repos have aliases in addition to their canonical names;
in order for lookups using these canonical names to function properly,
a file name `_repo_mapping` is located in the root of the runfiles tree
and consulted to perform repo-name translation.
See: https://github.com/bazelbuild/proposals/blob/main/designs/2022-07-21-locating-runfiles-with-bzlmod.md
* pre-commit formatting
* Enable runfiles test under bzlmod
It works now.
* feat: add an option to not include copy_to_directory output in runfiles
* chore: docs update
* chore: don't repeat default
---------
Co-authored-by: Alex Eagle <alex@aspect.dev>
* Fix: Moving the preserve mtiem test logic to Go for portability
* add tags to disable remote caching, execution and force the test to always re-run
* include docs
* use the runfiles library for windows compatability
* mark the test as manual
* remove duplicate word in comment
* chore: reduce duplication of the long caveats text
---------
Co-authored-by: Alex Eagle <alex@aspect.dev>
* chore(deps): update coreutils to v0.0.27
This release has an `aarch64-apple-darwin` binary, eliminating the need
for a `version_override` hack to support that platform.
* chore: restore previous coreutils
Users should be able to pin and not have us break them
---------
Co-authored-by: Alex Eagle <alex@aspect.dev>
* chore: turn off bzlmod misguided warning
These are misinformed, the module resolver should be permitted to find an MVS solution
* chore: update golden
* fix(docs): description of jq example didn't match behavior
I think this was wrong? Wish our examples were also executable...
---------
Co-authored-by: Derek Cormier <derek@aspect.dev>
* chore(deps): upgrade stardoc
This uses the Bazel 7 'starlark_doc_extract' rule which our docsite expects for slurping data.
* chore: stardoc setup in WORKSPACE too
* chore: skip stardoc on bazel 6 in cases where the legacy extractor produces different docstrings
* fix: Set size to a default value as well as timeout.
Currently, we are unable to run our `write_source_files` tests in our pre-upload checks, because we have `--test_size_filter=small`, and setting `size` will attempt to set it on both the run rule and the test rule, the former being invalid.
* code review feedback
* chore: fix one more test that should use size for defaulting
---------
Co-authored-by: Alex Eagle <alex@aspect.dev>
* fix(tar): append slash to top-level directory mtree entries
bsdtar's mtree format has a quirk wherein entries without "/" in their
first word are treated as "relative" entries, and "relative" directories
will cause tar to "change directory" into the declared directory entry.
If such a directory is followed by a "relative" entry, then the file
will be created within the directory, instead of at top-level as
expected. To mitigate, we append a slash to top-level directory entries.
Fixes #851.
* chore: golden files have BINDIR placeholder
---------
Co-authored-by: Alex Eagle <alex@aspect.dev>
* Fix #667: Dir hidden files in write_source_file.
Copy and manage hidden files starting with "." in write_source_files.
Previously these files were not supported if they were in the top level
of the directory to copy.
* Add test and fix error messages from cp, chmod.
* Also fix executable dir case.
* Fix issue with copying directory rather than contents.
* 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
* Add platform_transition_test
Signed-off-by: Thomas Lam <thomaslam@canva.com>
* Set target platform constraints for tests
Signed-off-by: Thomas Lam <thomaslam@canva.com>
* Update docs
Signed-off-by: Thomas Lam <thomaslam@canva.com>
---------
Signed-off-by: Thomas Lam <thomaslam@canva.com>