Commit Graph

549 Commits

Author SHA1 Message Date
Alex Eagle 036d1fdcc2
Use statically-linked bsdtar on all platforms (#804)
* [tar] Switch to statically linked binaries

* chore: don't use bsdtar for extract yet

* chore: add dzbarsky integrity hashes

* Upgrade to 3.7.2.bcr.2 (#806)

* chore: replace URLs with aspect-build fork

---------

Co-authored-by: David Zbarsky <dzbarsky@gmail.com>
2024-03-29 11:37:13 -07:00
Sahin Yort 4109b3cf93
chore: cherry pick doc fixes (#800)
* chore: run gazelle (#584)

Also delete the local_config_platform workaround for bazel 5 which made our docs setup complex

(cherry picked from commit 6a4381bf07)

* chore: test against bazel 7.0.0 (#713)

(cherry picked from commit 5aaa785b96)

---------

Co-authored-by: Alex Eagle <alex@aspect.dev>
Co-authored-by: Greg Magolan <gmagolan@gmail.com>
2024-03-27 12:53:20 -07:00
Greg Magolan 1be542496e
chore: fix docs build 2024-03-27 10:31:05 -04:00
Marc Redemske 7911ff5372
feat(list): add `unique` function (#716)
* feat(list): add `unique` function

* Update lists.bzl

* Update lists.bzl

* Update lists.bzl

* Update lists.bzl

---------

Co-authored-by: Alex Eagle <alex@aspect.dev>
2024-03-27 10:22:24 -04:00
Mike Lundy 044ff55fe9
jq: add data file and location expansion support (#757)
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).
2024-03-27 10:21:39 -04:00
Tiago Quelhas 4b5e43468c
Remove unnecessary ctx.resolve_tools.
`ctx.actions.run(executable = ...)` is sufficient to include the runfiles in the action inputs. (More generally, ctx.resolve_tools is discouraged in favor of `ctx.actions.run(tools = ...)`.)
2024-03-27 10:20:47 -04:00
Alex Eagle 251b1d07db
presets: remove eternal test_timeout_filtering (#758)
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.
2024-03-27 10:19:45 -04:00
Alex Eagle 8c95f4aef6
Update paths.bzl (#735)
Add a more helpful error when runfiles.bash can't be found.
2024-03-27 10:17:28 -04:00
Eric Hauser 2e86d10332
FR-723: make WriteSourceFileInfo public (#724)
* FR-723: make WriteSourceFileInfo public

* Update docs

---------

Co-authored-by: Greg Magolan <greg@aspect.dev>
2024-03-27 10:17:05 -04:00
Greg Magolan 338c15c7fb
feat: allow write_source_file(s) to write source files to bazel packages outside of the target's package (#717) 2024-03-27 10:16:20 -04:00
Alex Eagle a7185aa405
chore: upgrade bash rlocation lib to v3 (#727) 2024-03-27 10:14:48 -04:00
Matt Mackay d099def159
perf: remove unnecessary calls to 'to_list' (#737) 2024-03-27 10:13:56 -04:00
Joy Gao 59ca59cfc1
clean rm of copied dirs and files (#799) 2024-03-27 10:13:01 -04:00
Alex Eagle b4b7d1bc1c
feat: don't require 'out' on expand_template (#798)
In a lot of cases the name of the generated file is unimportant.
For example in https://github.com/bazel-contrib/rules_oci/pull/534 I wanted to remove 'out' in a bunch of these calls.
2024-03-27 10:08:51 -04:00
Greg Magolan 28d343f438
fix: register tar toolchains in MODULE.bazel file so bzlmod consumers don't have to 2024-03-27 10:02:06 -04:00
Greg Magolan 30a9b9d739
refactor: remove tar rule from 1.x branch to reduce branch maintenance 2024-03-26 12:07:05 -07:00
Matt Mackay 77513d2479
chore: bump libxml2 deb to USN-6658-1 (#768) 2024-03-23 02:17:58 -04:00
Sahin Yort cc145959b1
fix: tar#srcs is optional (#785) 2024-03-23 02:17:39 -04:00
Sahin Yort d17884965d
fix: srcs is not mandatory (#786) 2024-03-23 02:17:29 -04:00
Sahin Yort 907a5d42e6
feat: support location expansion in tar (#774) 2024-03-23 02:17:17 -04:00
Tobias Schlatter 2ce45746dd
fix #697: use to_repository_relative_path in mtree_spec (#696)
* 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.
2024-03-23 02:16:57 -04:00
Alex Eagle 30a5725ef4
Update tar.bzl (#751)
* Update tar.bzl

Fix header so it's not presented at the same level as the parent (the `tar` macro)

* fix docs
2024-03-23 02:16:43 -04:00
Alex Eagle cd7c55cc06
fix(tar): propagate testonly attr to mtree_spec (#691) 2024-03-23 02:16:02 -04:00
Alex Eagle 471e074cf7
chore: improve docs about mtree mutation (#692) 2024-03-23 02:14:34 -04:00
Sahin Yort f9b2087280
feat: introduce extension compression mapping (#683) 2024-03-23 02:14:19 -04:00
Sahin Yort d9368f04ff
feat: expose common tar variables (#679) 2024-03-23 02:12:17 -04:00
Sahin Yort 6a543815f1
fix: expose tar_lib as public (#680) 2024-03-23 02:11:54 -04:00
Alex Eagle a98bf91ae9
feat: support treeartifacts (#630) (#631)
Co-authored-by: Sahin Yort <thesayyn@gmail.com>
2024-03-23 02:11:26 -04:00
Alex Eagle b1db281b81
chore: add windows binaries (#610)
* 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
2024-03-23 02:09:57 -04:00
Alex Eagle 90f3a0731f
refactor: use _mtree_line helper (#612)
Also restore the .bazeliskrc file I accidentally removed in 4bfe55711a
2024-03-23 01:49:49 -04:00
Alex Eagle 0d901be0f5
feat: tar includes runfiles (#595)
* 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
2024-03-23 01:49:03 -04:00
David Zbarsky 66a52c34f7
Avoid expanding mtree spec during analysis phase (#576)
* Avoid expanding mtree spec during analysis phase

* Update tar.bzl

remove comment and unused code

---------

Co-authored-by: Alex Eagle <alex@aspect.dev>
2024-03-23 01:46:44 -04:00
Alex Eagle a393109223
feat: add a tar toolchain (#468)
* feat: add a BSD tar toolchain

@thesayyn discovered that it has a feature which should make it a drop-in replacement for pkg_tar
including fine-grained file permissions and symlinks:
https://man.freebsd.org/cgi/man.cgi?mtree(8)

* show example of mtree usage

* feat: introduce tar rule

* cleanup and get test passing

* more cleanup

* chore: add support for compress flags

* chore: add docs

* chore: add docs

* feat: implement linux bsdtar toolchain (#566)

* chore: improve target naming

* WIP: args

* feat: generate mtree spec

Also allow arbitrary args

* refactor: mtree is required

* refactor: style nits

* fix: support mix of source and generated artifacts

* feat: demonstrate strip_prefix

* chore: regen docs

* fix: make host toolchain a fallback toolchain

* fix: include libarchive13.so when installing BSD tar

* chore: buildifier

* fix: aarch64 cpu constraint

* fix(ci): include libarchive13.so when running tar

* chore: add libnettle

* refactor: inputs mutated less

* refactor: remove unneeded substitution arg

* refactor: don't advertise unsupported modes

* fix: hack enough to make it run on my machine

* chore: dynamic libraries included in sh_binary under toolchain

* make sh_binary work

* refactor: drop arm64 for now

* fix toolchain

* fix test

* chore: improve test naming scheme

---------

Co-authored-by: Sahin Yort <thesayyn@gmail.com>
2024-03-23 01:42:58 -04:00
Alex Eagle c215c623f4 chore: make it possible to override run_binary#use_default_shell_env (#762)
Still not documented as public API. We think this leads to non-hermeticity and could cause cache misses, so it must be used with care.

Part of https://github.com/aspect-build/rules_js/issues/1303
2024-03-05 10:26:40 -08:00
Greg Magolan 4db4fb1192 chore: add bazel versions to BCR presubmit.yaml 2024-02-05 19:44:05 -08:00
Greg Magolan 27e3b10472 fix: merge user tags in stardoc_with_diff_test (#746) 2024-02-05 17:51:30 -08:00
Greg Magolan fca58db388 refactor: remove --enable-runfiles from javascript recommended bazelrc settings (#715) 2024-01-08 02:32:34 -08:00
Greg Magolan bf7131ffe7 feat: add is_bazel_7_or_greater utility (#714) 2024-01-08 02:32:28 -08:00
Greg Magolan 61f83128a0 chore: test against bazel 7.0.0 (#713) 2024-01-08 02:31:24 -08:00
Greg Magolan 3e62405a5e fix: move flags that should only be set with bazel 6 to bazel6.bazelrc recommended settings (#711) 2024-01-05 15:50:10 -08:00
Derek Cormier f37958951d
feat: give version.bzl public visibility (#670) 2023-11-22 11:11:31 -08:00
Derek Cormier ffc2807ec8
fix: remove need for rules_go when depending on a bzl_library target (#663) 2023-11-16 13:14:55 -08:00
Derek Cormier 78ed16ae46
feat: backport 2.x features for interoperability (#657) 2023-11-16 11:25:34 -07:00
Derek Cormier 7dbb96e225
fix(ci): fix bzlmod issues and enable on ci (#658) (#659) 2023-11-15 15:55:52 -08:00
Derek Cormier d2d303a2f8
Fix bzlmod (#600) (#660)
* fix: gazelle is not a devdep

It's easy to see because we reference the symbol two lines below here

* fix: gazelle must be a regular dep

I found this mistake when trying to use bazel-lib in a downstream repo.

Co-authored-by: Alex Eagle <alex@aspect.dev>
2023-11-15 15:35:55 -08:00
Greg Magolan b396514bd5 chore: don't run gazelle checks on 1.x branch 2023-10-31 23:34:46 +01:00
Greg Magolan ceaa936fba chore: run GitHub Actions CI on 1.x branch 2023-10-31 23:26:24 +01:00
Greg Magolan 6b0927d5b8 fix: fix execution requirements for 'build without the bytes' (#639) 2023-10-31 23:23:55 +01:00
Greg Magolan 5c1aea58b8 chore: upgrade to Aspect Workflows 5.8.3 (#635) 2023-10-31 23:23:00 +01:00
Greg Magolan 90f78476f8 chore: upgrade to Aspect Workflows 5.8.2 (#628) 2023-10-31 23:21:57 +01:00