* 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>
* chore: turn off bzlmod misguided warning
These are misinformed, the module resolver should be permitted to find an MVS solution
* chore: update golden
* 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
* 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>
This teaches the jq rule about a `data` attribute and adds conditional
support to do bazel location expansion. The expansion is disabled by
default because it likely would cause compat concerns (since jq can take
arbitrary text as input args).
In practice we've disabled this setting at some clients, because there's not a surrounding workflow to find these targets are being silently dropped from CI, nor run them on another schedule.
We can re-introduce something better when we add Test Selection to Aspect Workflows.
* Reproduction for mtree_spec behaving different in other repo
* Fix the bug (but not the test)
* Fix the test
* Rename mtree_spec e2e dir to tar
* Fix bzlmod tests
* Remove unnecessary skylib dependency from e2e repos
* Add e2e tests to matrix
* Replace e2e test with a normal test
To do this, we somewhat abuse the skylib dependency, but that's
probalby OK.
* chore: add windows binaries
* chore: fix/exclude windows brokenness
* chore: try to see why diff tests fail on windows
* fix: rm bazelisk rc again for windows
* fix: try our own diff_test
* chore: use only our own diff_test
* feat: tar includes runfiles
* chore: try to fix red circleci
* fix: tracked down problem
* chore: document tar#srcs supports runfiles
* chore: add comment about logic for trimming manifest suffix
* chore: missed a replacement spot
* chore: give up on the listing test for now