Commit Graph

744 Commits

Author SHA1 Message Date
Greg Magolan 0ed8bdd8ab
chore: update old reference to aspect-build/bazel-lib (#962) 2024-10-13 09:58:26 -07:00
Alex Eagle f0e8c006c0
chore(docs): add tar to API listing (#960) 2024-10-10 21:06:49 +00:00
ajwerner 7d901b7d9b
fix(bazelrc): move flag to bazel6.bazelrc (#959)
This flag became a no-op in Bazel 7 (see [here][0]) and then was removed in
Bazel 8 (see [here][1]).

Fixes #958

[0]: c88f374246
[1]: 17ee62e91d
2024-10-08 11:35:51 -07:00
Marcel ca80d07fca
Fix unknown repo error with mtree_mutate and Bzlmod (#948)
With Bzlmod, every repo has its own namespace. Using Label() should make sure it uses the namespace of the .bzl file instead of the caller's one.
2024-10-04 15:41:24 +00:00
Alex Eagle 1b4d9a7f04
feat(presets): java bazelrc options (#947)
* feat(presets): java bazelrc options

* chore: improved comments
2024-10-04 15:34:34 +00:00
renovate[bot] f479afd502
chore(deps): update dependency bazel to v7.3.2 (#955)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-04 08:32:27 -07:00
Peter Lobsinger 0db9fbe519
feat: support bzlmod runfiles lookups (#953)
* 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.
2024-09-30 21:10:06 -07:00
Alex Eagle a75770bef3
Update metadata.template.json (#950)
Required by a BCR presubmit check, which blocked the last two releases.
2024-09-26 21:34:31 +00:00
Alex Eagle b48be23780
fix(presets): restore build runfile links for the 'coverage' command (#943)
* Update performance.bazelrc

* Update performance.bazelrc

* Update performance.bazelrc
2024-09-23 21:38:54 -07:00
Jason Bedard 1c05cd3224
fix: declare host_platform as non-dev dep (#945)
Fix https://github.com/bazel-contrib/bazel-lib/issues/944
2024-09-23 18:43:45 -07:00
Alex Eagle c5f65e8890
fix: pick up bsdtar windows fix (#942)
see https://github.com/aspect-build/bsdtar-prebuilt/pull/10
2024-09-18 18:29:33 -07:00
Derek Cormier 716af223c2
feat: add an option to not include copy_to_directory output in runfiles (#886)
* 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>
2024-09-19 01:16:14 +00:00
Alex Eagle fa583181ff
chore: stable job name for branch protection (#883)
adopts https://github.com/bazel-contrib/rules-template/pull/124
2024-09-17 17:55:40 -07:00
renovate[bot] 25437fd3e6
chore(deps): update dependency rules_go to v0.50.1 (#941)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-17 17:54:39 -07:00
Justin Pinkul ad48c0d855
fix: moving the preserve mtime test logic to Go for portability (#908)
* 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>
2024-09-17 17:25:26 -07:00
Alex Eagle 2f65c8c0c7
chore: update git urls (#926)
This repository was donated to the Linux Foundation and is now in the bazel-contrib GH org
2024-09-17 17:05:35 -07:00
Sahin Yort 8f0b38004e
fix: add empty files to tar (#939) 2024-09-17 17:05:20 -07:00
Alex Eagle 3b6a3d50b1
chore(deps): upgrade to newest bsdtar (#940) 2024-09-17 17:00:54 -07:00
renovate[bot] eb575d5782
chore(deps): update dependency bazel_skylib to v1.7.1 (#924)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-15 01:45:22 -07:00
Alex Eagle 408f76cb9a
feat: performance preset: nobuild_runfiles_links (#922)
* feat: performance preset: nobuild_runfiles_links

* Update performance.bazelrc

* chore: more docs
2024-09-12 23:55:04 +02:00
renovate[bot] 3a9720ec61
chore(deps): update dependency io_bazel_rules_go to v0.50.1 (#930)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-12 06:53:29 -07:00
David Zbarsky 4c1267fc27
perf: improve copy_file.bzl progress_message (#931) 2024-09-10 10:08:34 -07:00
Peter Lobsinger de9fd596fd
chore(deps): update coreutils to v0.0.27 (#905)
* 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>
2024-09-02 15:39:32 -07:00
renovate[bot] 208b057953
fix(deps): update golang.org/x/exp digest to 9b4947d (#923)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-02 15:39:17 -07:00
renovate[bot] 4e19e6aee7
chore(deps): update dependency io_bazel_rules_go to v0.50.0 (#925)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-02 15:29:45 -07:00
Greg Magolan fb0677ad57
chore: cleanup before bazel-contrib handoff (#918)
* chore: clenaup before bazel-contrib handoff

* chore: apply lint fixes

---------

Co-authored-by: Alex Eagle <alex@aspect.dev>
2024-09-02 09:32:38 -07:00
Greg Magolan edaafd2ca5
chore: now testing on Aspect Workflows RBE (#920) 2024-08-26 22:16:09 -07:00
Derek Cormier cf03a14551
chore: use aspect workflows RBE (#919) 2024-08-26 15:07:35 -07:00
Diogo Teles Sant'Anna 07b98dc477
fix: github workflow vulnerable to script injection (#899)
Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>
Co-authored-by: Alex Eagle <alex@aspect.dev>
2024-08-21 19:25:00 -04:00
Greg Magolan 0870fadf4c
chore: remove non-bzlmod dep on @internal_platforms_do_not_use//host:constraints.bzl now that root workspace is bzlmod-only (#916) 2024-08-20 16:14:37 -04:00
Greg Magolan 11aacaf5df
chore: enable go, shell, yaml formatters and bazel run //:format (#917) 2024-08-20 11:56:40 -07:00
Greg Magolan cccf5ac1b8
refactor: make root workspace bzlmod only (#915) 2024-08-20 14:20:51 -04:00
Greg Magolan 0e1f1e82c9
chore: bump to Bazel 7.3.1 (#914) 2024-08-20 13:37:52 -04:00
Greg Magolan abbbd54a15
chore: right size tests to supress bazel warning (#913) 2024-08-19 15:55:21 -07:00
Greg Magolan 9b87fa7050
chore: skip linux only tests on non-linux platforms (#912) 2024-08-19 18:26:12 -04:00
Greg Magolan 73d021fb36
fix: correctly split quoted args (#909) 2024-08-19 16:36:41 -04:00
Greg Magolan 62b2fd06aa
chore: fixup test sizes to resolve warnings (#911) 2024-08-19 15:33:54 -04:00
Greg Magolan eb55a3c03f
refactor: deprecated expand_locations which is just pass-through to ctx.expand_location() (#910) 2024-08-19 15:28:45 -04:00
Alex Eagle 492de2b358
chore: green up CI on main branch (#904)
* 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
2024-08-14 11:31:04 -07:00
Greg Magolan a36dd1201a
chore: bazel run //:buildifier (#903) 2024-08-14 11:27:58 -07:00
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