Commit Graph

147 Commits

Author SHA1 Message Date
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 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
Greg Magolan b1c342a96f
chore: bazel run //:format (#682) 2023-12-08 00:30:39 -08:00
Derek Cormier 5bd6e5fdd4
fix(ci): fix bzlmod issues and enable on ci (#658) 2023-11-15 15:07:03 -08: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
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 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
Greg Magolan cb9b74f41e
refactor: remove to_workspace_path and to_manifest_path (#590) 2023-10-06 08:37:53 -07:00
Derek Cormier 99f36cc298 feat(presets): always fetch all coverage files on coverage runs (#564) 2023-10-05 15:57:37 -07:00
Derek Cormier dca2b1df0c
chore: remove legacy copy_to_directory_action (#582) 2023-10-05 15:52:37 -07:00
Alex Eagle 6a4381bf07
chore: run gazelle (#584)
Also delete the local_config_platform workaround for bazel 5 which made our docs setup complex
2023-10-05 14:22:38 -07:00
Derek Cormier 46a16e500c
chore: remove expand_template re-export (#580) 2023-10-05 12:33:13 -07:00
Alex Eagle a283a8216d 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>
2023-10-03 13:50:55 -07:00
Derek Cormier 174bb9425d feat: support jq 1.7 toolchain (#520) 2023-10-03 13:50:55 -07:00
Alex Eagle e00ea2b977
chore: update pre-commit buildifier (#563)
It needs to match the one CI runs in
https://github.com/aspect-build/bazel-lib/actions/runs/6357283303/job/17268197322
2023-09-29 14:42:33 -07:00
Greg Magolan bcb10f8154
feat: add undeclared output mode to expand_template (#561) 2023-09-29 11:30:02 -07:00
Greg Magolan 1d816e011b
feat: add assert_directory_contains test to testing.bzl (#560) 2023-09-29 09:53:00 -07:00
Alex Eagle bc54655e71
ci: add assertion that bcr patches apply (#556) 2023-09-27 10:26:38 -07:00
Aaron Son a4e997de1f
feat: add `propagate_common_{,test_,binary_}rule_attributes` to lib/utils. (#553)
* feat: add `propagate_common_{,test_,binary_}rule_attributes` to lib/utils.

* lib/private/utils: PR feedback: extract COMMON_BINARY_RULE_ATTRIBUTES and COMMON_TEST_RULE_ATTRIBUTES to global constants.

* lib/private/utils: PR feedback: remove default value for attrs param to propagate_common_*rule_attributes

* fix: lib/private/utils: buildifier.
2023-09-26 14:29:42 -07:00
Matt Mackay 8fa2127518
fix: allow for BUILD files in outputs of write_source_file (#540) 2023-09-21 19:50:04 -04:00
Matt Mackay 62394fbb68
fix: lookup source files from execroot when running diff_test on RBE (#531) 2023-09-21 13:27:08 -07:00
Marc Redemske 45986f000d
feat: add list utils (#512)
* feat: add list utils

* chore: add docs for lists

* fixes accoding to review

---------

Co-authored-by: Alex Eagle <alex@aspect.dev>
2023-09-21 10:12:47 -07:00
Alex Eagle 882bc95615
feat: expand_template allows inline template content (#533)
Co-authored-by: thesayyn <thesayyn@gmail.com>
2023-09-20 18:32:05 -07:00
Ted Kaplan fc3c3181f3
docs: Add --incompatible_disallow_empty_glob to correctness.bazelrc (#524) 2023-09-18 19:58:27 -07:00
peter woodman 3e9577ab16
yq: allow any filename in srcs (#496)
* yq: allow any filename in srcs

* yq: add test cases for free-form file extensions in input

* run buildifier

---------

Co-authored-by: Alex Eagle <alex@aspect.dev>
2023-08-30 09:18:10 -07:00
Greg Magolan 76ef6c8988
chore: add test coverage for run_binary & expand_variables makevars (#504) 2023-08-26 13:59:48 -07:00
Malte Poll d79f4d4867 feat: yq supports stamping
Fixes #223
2023-06-15 16:50:26 -07:00
Jason Bedard 47dd4ce9fd chore: run buildifier 2023-06-13 16:28:17 -07:00
Jason Bedard c4e601f244
ci: add bazel 7 prerelease tests (#452) 2023-06-13 16:26:33 -07:00
Sahin Yort 6af964f261
feat: support stamp substituions (#435) 2023-05-16 16:14:50 -07:00
Jason Bedard e0ae19940c
test: add tests for copying hidden files (#438)
See https://github.com/aspect-build/rules_js/issues/1055
2023-05-16 15:57:57 -07:00
Sahin Yort 781d1cbebf
feat: implement chr, ord, and hex (#425) 2023-05-15 12:15:55 -07:00
Jason Bedard b5e9238dfa
fix: support special chars in assert_contains expected expression (#426)
See https://github.com/aspect-build/rules_js/issues/1045
2023-05-10 16:07:40 -07:00
Jason Bedard 14be93a63e fix: rewrite glob implementation to follow standard glob specs
Implementation based on 465a339d8d/match.go (L74)

Fix https://github.com/aspect-build/bazel-lib/issues/419
2023-05-08 07:46:19 -07:00
Jason Bedard c363420c70
refactor: cleanup glob implementation, add tests (#420)
Prefactor to https://github.com/aspect-build/bazel-lib/issues/419
2023-05-05 15:11:16 -07:00
Alex Eagle 6f1f2fb198 fix(yq): restore default version, reverting #405
The new version of yq is quite breaking, as it requires '-oj -r' for continued operation in rules_oci.
We can do a default version flip later when more downstream projects are compatible.
2023-05-05 13:07:51 -07:00
Henk Erik van der Hoek 39d556a225
Chore: update YQ (#405)
* Chore: update YQ

* Update tests

* Update docs

* Update docs

---------

Co-authored-by: Greg Magolan <gmagolan@gmail.com>
2023-05-01 19:18:50 -07:00
Alex Eagle adca277409 fix: use test command for test flags
I don't think there's any reason we apply these two flags for `build`?
2023-04-13 07:45:07 -07:00
Derek Cormier be41c1d686
fix: remove merkle tree caching (#390) 2023-03-09 12:24:44 -08:00
Greg Magolan 34bcfdedea chore: update goldens 2023-03-05 17:52:12 -08:00
Greg Magolan 8c58935da1
feat: add label_str utility to generate consistent label strings for all Bazel versions (#386) 2023-03-03 18:23:17 -08:00
Derek Cormier 018fb2db18 chore: set --heap_dump_on_oom preset to apply to all commands 2023-03-01 15:40:17 -08:00
Derek Cormier 2704c61128 chore: remove unnecessary duplication in bazelrc presets 2023-03-01 14:47:54 -08:00
Greg Magolan 91eeca7d40
fix: remove --experimental_guard_against_concurrent_changes from recommended correctness settings (#380) 2023-02-23 00:28:46 -08:00