Commit Graph

704 Commits

Author SHA1 Message Date
Alex Eagle 385717a2a5
chore: turn off bzlmod misguided warning (#901)
* chore: turn off bzlmod misguided warning

These are misinformed, the module resolver should be permitted to find an MVS solution

* chore: update golden
2024-08-14 10:41:50 -07:00
Alex Eagle 5d09fc1b83
fix(docs): description of jq example didn't match behavior (#897)
* 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>
2024-08-11 15:56:06 -07:00
Justin Pinkul 74ac451d8a
Adding a preserve time feature to copy_to_directory and copy_directory (#898) 2024-08-10 22:08:56 -07:00
Peter Lobsinger 2b69a7a1f6
fix: add bzlmod use_repo of org_golang_x_sys (#896)
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.
2024-08-08 17:57:03 -07:00
Peter Lobsinger 3c121a9cd9
perf: use darwin's clonefile syscall (#893)
* 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
2024-08-08 16:29:47 -07:00
Greg Magolan 34288d3f1b
chore: bazel run //:gazelle_update_repos (#895) 2024-08-08 14:55:16 -07:00
Alex Eagle 0f5e1dcafd
chore(deps): upgrade stardoc (#894)
* 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
2024-08-08 12:56:11 -07:00
Alex Eagle 109f32eefb
docs(tar): point to the tests as useful examples (#892)
* docs(tar): point to the tests as useful examples

Improve the content to make it easier to reference as examples of usage.

* fix broken link
2024-08-05 11:18:57 -07:00
Markus Hofbauer cdbfe4190c
fix(typos): Fix almost all typos with hook (#884)
* Fix almost all typos with hook

* align docs
2024-07-31 10:09:17 -04:00
Greg Magolan 424137f6fc
chore: upgrade to Aspect Workflows 5.10.12 (#890) 2024-07-29 17:14:32 -07:00
Greg Magolan 8b5be28449
chore: upgrade to Aspect Workflows 5.10.11 (#888) 2024-07-26 11:05:00 -07:00
Markus Hofbauer 6bad7f3d3c
chore(typos): Add typos hook plus some fixes (#637)
* fix(typos): Add typos hook plus some fixes

* Use latest version of hook
2024-07-19 22:10:26 -07:00
Matt 59453e5c50
fix: Set size to a default value as well as timeout. (#839)
* 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>
2024-07-19 12:50:50 -07:00
Alex Eagle db5556df6f
chore(deps): update bsdtar prebuilt (#882)
This fixes the dynamic lookup of zstd from the PATH.
Fixes #877
2024-07-19 12:16:27 -07:00
Greg Magolan be4b0d6455
chore: upgrade to Aspect Workflows 5.10.9 (#881) 2024-07-18 17:54:51 -07:00
Synchronization Acknowledgement cc956d8589
fix(tar): append slash to top-level directory mtree entries (#852)
* 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>
2024-07-02 09:27:06 -07:00
Tobias Schlatter 086624ae47
fix(tar): expose package_dir argument in mtree_mutate (#873)
This was likely forgotten in #829 when making the parameters explicit
during review.
2024-07-02 13:29:24 +03:00
Greg Magolan 90d1878ec8
chore: upgrade to Aspect Workflows 5.10.6 (#876) 2024-07-01 23:13:54 -04:00
Jason Bedard 31b4bb68f6 perf: reduce concatenation in relative_path 2024-06-21 20:05:45 -07:00
Greg Magolan 18ae5a89a6
fix: allow copy_to_directory to have an empty srcs list (#871) 2024-06-21 11:33:00 -06:00
Alex Eagle 3330c38904
chore: upgrade bsdtar to 3.7.4 (#866) 2024-06-17 07:49:35 -07:00
Alex Eagle fb950d38ae
docs: add missing default stamp var (#865)
* docs: add missing default stamp var

* update docs
2024-06-13 09:56:06 -07:00
Josh Giles 3c0dbd5895
fix: Directory hidden files in write_source_file. (#860)
* 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.
2024-06-11 00:30:53 -07:00
Greg Magolan 0cb85f693d
chore: add --check_direct_dependencies to .bazelrc (#864) 2024-06-07 11:49:45 -07:00
Greg Magolan 2b5947a33e
chore: upgrade to Aspect Workflows 5.10.0 (#863) 2024-06-05 17:53:20 -07:00
Greg Magolan 00310a5b91
test: add test / example of using root path on a run_binary directory output (#862) 2024-06-05 13:48:07 -07:00
Greg Magolan 2da5d43b89
chore: upgrade to Aspect Workflows 5.10.0-rc1 (#861) 2024-06-01 22:09:32 -07:00
Greg Magolan 7a8f00cd7f
fix: exclude files in copy_to_directory before checking their realpath (#857) 2024-05-28 11:04:25 -07:00
Greg Magolan f30debb505
refactor: pre-factors for fix in copy_to_directory (#858) 2024-05-28 09:42:06 -07:00
Alex Eagle 22c33dfc51
fix: integrity hashes are now sha256 since #854 (#855) 2024-05-23 16:26:14 -07:00
Alex Eagle 4ad02b7795
refactor(release): switch release integrity to be dynamic (#854)
* 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
2024-05-23 16:08:35 -07:00
mrmeku 6959b3f807
fix: coreutils download path for darwin_amd64 (#853)
* fix: coreutils download path for darwin_amd64

* fixup

---------

Co-authored-by: Greg Magolan <greg@aspect.dev>
2024-05-23 13:12:36 -07:00
Greg Magolan 474e680cad
ci: green up rbe on main (#847) 2024-05-14 07:44:33 -07:00
Greg Magolan e11bd38403
chore: tidy in MODULE.bazel file (#846) 2024-05-14 00:17:27 -07:00
Greg Magolan ffc5a7bfa1
chore: align ci patterns (#843) 2024-05-13 23:51:10 -07:00
Greg Magolan 155e3f250e
chore: bump buildifier, go and gazelle deps (#845) 2024-05-13 23:30:19 -07:00
Greg Magolan 7c958d665f
ci: green up main (#844) 2024-05-13 23:20:39 -07:00
Greg Magolan c6c9426918
chore: bump to Bazel 7.1.2 (#842) 2024-05-13 21:28:28 -07:00
Greg Magolan a704c2608b
chore: run buildifier to green up main (#841) 2024-05-13 20:00:42 -07:00
Malte Poll 1697a3275b
fix: coreutils toolchain: Use statically linked linux amd64 variant (#706)
* 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
2024-05-08 07:06:12 -07:00
Alex Eagle b15dc31a81
fix(tar): handle spaces in input filenames (#835) 2024-05-07 17:52:35 -07:00
Jordan Rodgers d8d22cbf77
fix: only check for blank space between status entries in expand_template (#834)
* only check for blank space between status entries in expand_template

* chore: update tool integrity

---------

Co-authored-by: Alex Eagle <alex@aspect.dev>
2024-05-06 13:29:56 -07:00
Sahin Yort fdf3be1c85
fix: register @zstd_toolchains//:all (#832) 2024-05-04 08:15:20 -07:00
Sahin Yort d1d063f3e5
feat: introduce zstd toolchain (#831) 2024-05-03 16:12:56 -07:00
Alex Eagle 977f27f7a0
feat(tar): add ergonomic way to strip_prefix (#829) 2024-05-01 12:36:39 -07:00
Greg Magolan c0607f67ca
chore: upgrade to Aspect Workflows 5.10.0-rc0 (#828) 2024-04-29 16:28:09 -07:00
Alex Eagle 31e6c76b7d
refactor: update conventional-commits.yml (#824)
* refactor: update conventional-commits.yml

Ensure that our workflow runs for PRs that originate from an untrusted fork.
See https://github.com/amannn/action-semantic-pull-request#event-triggers

* Update conventional-commits.yml
2024-04-29 06:11:29 -07:00
Greg Magolan 41413388da
chore: add bazel test support to javascript --config=debug preset (#825) 2024-04-25 16:33:16 -07:00
Alex Eagle 223b278735
ci: enforce PR titles are semantic (#823) 2024-04-24 14:54:31 -07:00
Greg Magolan 8d789e71c4
chore: upgrade to Aspect Workflows 5.10.0-alpha.10 (#822) 2024-04-24 14:12:33 -07:00