* 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: green up CI on main branch
We landed a test that broke the macos/windows builds, let's just disable it there
* chore: mark it flaky
* Update MODULE.bazel
* 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>
Commit 3c121a9cd9 broke E2E tests with the
following error:
```
(23:31:56) ERROR: no such package '@@[unknown repo 'org_golang_x_sys' requested from @@aspect_bazel_lib~]//unix': The repository '@@[unknown repo 'org_golang_x_sys' requested from @@aspect_bazel_lib~]' could not be resolved: No repository visible as '@org_golang_x_sys' from repository '@@aspect_bazel_lib~'
```
The build worked when operating within the `aspect_bazel_lib` repo
itself, but not when importing it with Bzlmod. This is because the
`org_golang_x_sys` repo is imported indirectly by `rules_go`'s
`go_rules_dependencies` macro in the `WORKSPACE` file, which is still
active under bzlmod because there is no `WORKSPACE.bzlmod` file to
suppress it.
* 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
* 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