Commit Graph

333 Commits

Author SHA1 Message Date
Marc Redemske a3d7efe298
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-02-27 08:25:00 -08:00
Mike Lundy dfcffca8f5
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-02-26 17:43:56 -08:00
Jason Bedard 8e5a86f8b8 docs: add bats docs 2024-02-26 15:55:48 -08:00
Tiago Quelhas e514283dd8 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-02-25 17:43:38 -08:00
Alex Eagle 1c98ca9f34
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-02-21 13:37:47 -08:00
Alex Eagle 6d3195f05c
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-02-16 13:56:38 -08:00
Alex Eagle 38fecbcbb5
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-02-08 15:26:05 -08:00
Greg Magolan 71a8052589
fix: merge user tags in stardoc_with_diff_test (#746) 2024-02-05 17:43:58 -08:00
renovate[bot] e19315230c chore(deps): update dependency bazel_skylib to v1.5.0 2024-01-30 00:18:44 -08:00
Matt Mackay 59cc7058de
perf: remove unnecessary calls to 'to_list' (#737) 2024-01-29 12:43:32 -05:00
Alex Eagle f0a19f5a7c
Update paths.bzl (#735)
Add a more helpful error when runfiles.bash can't be found.
2024-01-27 12:26:12 -08:00
Eric Hauser ee0442db9c
FR-723: make WriteSourceFileInfo public (#724)
* FR-723: make WriteSourceFileInfo public

* Update docs

---------

Co-authored-by: Greg Magolan <greg@aspect.dev>
2024-01-22 21:51:05 -08:00
Greg Magolan 1baf14f65c
chore: add example of using write_source_file to merge output tree artifact files with source files that are already in an output directory (#730) 2024-01-22 21:03:31 -08:00
Alex Eagle 58b65c1736
chore: upgrade bash rlocation lib to v3 (#727) 2024-01-18 13:23:14 -08:00
Greg Magolan 5b3b7d7794
feat: allow write_source_file(s) to write source files to bazel packages outside of the target's package (#717) 2024-01-10 15:07:03 -08:00
Greg Magolan 57bcf288bd
chore: fix failing test on arm64 machines (#718) 2024-01-10 11:16:37 -08:00
Greg Magolan c9d08234ce
refactor: remove --enable-runfiles from javascript recommended bazelrc settings (#715) 2024-01-07 21:29:45 -08:00
Greg Magolan 516a5fe725
feat: add is_bazel_7_or_greater utility (#714) 2024-01-07 16:42:57 -08:00
Greg Magolan 5aaa785b96
chore: test against bazel 7.0.0 (#713) 2024-01-07 16:12:05 -08:00
Alex Eagle 1be6994ca6
Fix prerelease (#708)
* fix: use source toolchains for git archive prereleases

* Add comment about "g" prefix
2024-01-04 12:07:19 -08:00
Greg Magolan d313c8bf75
fix: move flags that should only be set with bazel 6 to bazel6.bazelrc recommended settings (#711) 2024-01-04 08:16:59 -08:00
Sahin Yort ac0055e092
test: fix timeout (#707) 2023-12-22 11:44:44 -08:00
Sahin Yort 33bc4443fd
fix: create windows launcher for bats (#704) 2023-12-21 14:27:21 -08:00
Sahin Yort 4f6b4bd5cb
feat: implement bats test runner (#699) 2023-12-20 13:08:47 -08:00
Tobias Schlatter 8d805e16bf
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.
2023-12-20 11:22:42 -08:00
Alex Eagle 303779e9ef
fix(tar): propagate testonly attr to mtree_spec (#691) 2023-12-13 15:21:02 -08:00
Alex Eagle f65019be4e
chore: improve docs about mtree mutation (#692) 2023-12-13 15:03:32 -08:00
Sahin Yort cef25915d7
feat: introduce extension compression mapping (#683) 2023-12-08 21:47:20 +00:00
Sahin Yort a219f5260d
fix: expose tar_lib as public (#680) 2023-12-08 10:31:01 -08:00
Greg Magolan b1c342a96f
chore: bazel run //:format (#682) 2023-12-08 00:30:39 -08:00
Sahin Yort d1642aa020
feat: expose common tar variables (#679) 2023-12-07 12:29:35 -08:00
Tobias Schlatter 975a933e24
docs: fix load path for copy_file_to_bin_action (#673) 2023-11-30 10:58:48 -08:00
Derek Cormier 2b38ad5d29
feat: expose toolchains used for copy actions (#661) 2023-11-16 07:15:50 -08:00
Derek Cormier 95e7ad5e0b
fix: fix a bug where toolchain repositories were potentially duplicated (#662) 2023-11-16 06:57:29 -08:00
Derek Cormier 5bd6e5fdd4
fix(ci): fix bzlmod issues and enable on ci (#658) 2023-11-15 15:07:03 -08:00
David Zbarsky 01ca8f9432
Use coreutils toolchain for copy_file action (#622)
refactor: use coreutils toolchain for copy_file action
---------

Co-authored-by: Greg Magolan <greg@aspect.dev>
Co-authored-by: Derek Cormier <derek@aspect.dev>
2023-11-14 11:03:51 -08:00
David Zbarsky b74a45456d
Upgrade coreutils and add darwin arm64 binary (#649) 2023-11-14 08:47:21 -08:00
Greg Magolan 602b7b8f80
Revert: feat: expose a config_setting for copy execution_requirements (#606) (#640) 2023-10-31 15:19:38 -07:00
Greg Magolan a47eebfa65
fix: fix execution requirements for 'build without the bytes' (#639) 2023-10-31 13:38:32 -07:00
Alex Eagle 8cf7e6f995
feat: support treeartifacts (#630) (#631)
Co-authored-by: Sahin Yort <thesayyn@gmail.com>
2023-10-19 15:57:48 -07:00
David Zbarsky a4f99946c6 Unconditionally use runfiles.merge_all in write_source_file 2023-10-16 15:45:24 -07:00
Derek Cormier 5077d5ae4a
chore: remove bazel5 presets (#614) 2023-10-16 13:35:41 -07:00
Alex Eagle eda4929c72
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
2023-10-10 14:13:17 -07:00
Alex Eagle 177b883991
refactor: use _mtree_line helper (#612)
Also restore the .bazeliskrc file I accidentally removed in 4bfe55711a
2023-10-10 12:33:21 -07:00
Derek Cormier 20f1ac39e0
refactor: rework toolchain registration for WORKSPACE and bzlmod users (#597) 2023-10-10 12:16:13 -07:00
Alex Eagle e1d9d9b58f fix: windows home directory (#608)
HOMEPATH isn't always set. For example https://buildkite.com/bazel/bazel-bazel-examples/builds/2163#018b1a9d-0127-461f-8200-e89894397f35
USERPROFILE seems more widely documented as being the equivalent of HOME
2023-10-10 10:57:18 -07:00
Douglas Parker 323329f119 fix: always include files from the same workspace as the build target in `copy_to_directory()` (#360)
* fix: always include files from the same workspace as the build target in `copy_to_directory`

Fixes #359.

This updates the `copy_to_directory` tool to accept a workspace name representing the workspace of the target it is executing under. Any files in this workspace are automatically included, regardless of the `include_external_repositories` option. This makes it support usage within an external target (such as `@wksp//:dir`).

* test: add e2e test which uses `copy_to_directory` within an external workspace

Refs #359.

This should catch regressions where no files are copied when built within an external workspace and not using `include_external_repositories`.

* ci: fix stray workspace refs

---------

Co-authored-by: Alex Eagle <alex@aspect.dev>
2023-10-10 10:57:08 -07:00
Alex Eagle 472bf9b122
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
2023-10-09 15:57:52 -07:00
Alex Eagle 4bfe55711a
feat: expose a config_setting for copy execution_requirements (#606)
* feat: expose a config_setting for copy execution_requirements

Fixes #604

* chore: add user docs

* chore: improve docs

* chore: better link to copy_file
2023-10-09 13:57:34 -07:00
Alex Eagle bc97305fcd Revert "refactor: reduce execution requirements for copy" (#594)
* Revert "refactor: reduce execution requirements for copy"

This reverts commit 40c2ddc71a.

* Update ci.bazelrc
2023-10-06 19:19:18 -07:00