Greg Magolan
1cd2eb7e0a
refactor: remove exclude_prefixes from copy_to_directory and copy_to_directory_bin_action ( #591 )
2023-10-06 10:17:33 -07:00
Greg Magolan
cb9b74f41e
refactor: remove to_workspace_path and to_manifest_path ( #590 )
2023-10-06 08:37:53 -07:00
Greg Magolan
231dad5c92
refactor: remove output_dir from run_binary and expand_variables ( #588 )
2023-10-06 08:32:55 -07:00
Greg Magolan
3a16b4de26
refactor: remove legacy copy_directory_action helper ( #589 )
2023-10-06 08:32:25 -07:00
Alex Eagle
894ba445c4
chore: remove is_windows attributes ( #587 )
...
Fixes some TODOs for 2.0
2023-10-05 16:03:15 -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
David Zbarsky
8fe4f6f8d5
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>
2023-10-05 12:36:55 -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
Sahin Yort
ef364b54b4
refactor: consume tools from source if unstamped ( #543 )
2023-09-24 15:06:10 -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
Sahin Yort
719b8f33b0
refactor: add ability to test against tools from source ( #532 )
2023-09-21 15:12:46 -07: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
Alex Eagle
d2203e9020
chore: pick up new expand_template go binary ( #518 )
...
Also fix an error that was getting reported in our release pipeline
2023-09-06 16:47:15 -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
Alex Eagle
40c2ddc71a
refactor: reduce execution requirements for copy
...
It causes warnings like 753cd459e4/src/main/java/com/google/devtools/build/lib/sandbox/SandboxModule.java (L514)
and also makes toolchain selection broken for host!=exec
Fixes #466
2023-08-29 14:56:22 -07:00
Greg Magolan
76ef6c8988
chore: add test coverage for run_binary & expand_variables makevars ( #504 )
2023-08-26 13:59:48 -07:00
Matt Mackay
ef4830bf25
docs: add comment regarding linux-arm64 JQ toolchain ( #503 )
2023-08-24 09:54:44 -07:00
Steven E. Harris
3af9e00308
docs: clarify write_source_files output constraint ( #498 )
...
* docs: clarify write_source_files output constraint
For both the "write_source_files" rule's "files" attribute and the
"write_source_file" rule's "out_file" attribute, we ensure that the
destination files and directories to which we'll write sit within the
same containing Bazel package as the Bazel target requesting this
writing. Clarify the documentation for each attribute to make it clear
that we're constraining the destinations and not the sources of the
content to be written.
* Update lib/write_source_files.bzl
---------
Co-authored-by: Derek Cormier <derek@aspect.dev>
2023-08-23 12:32:56 -07:00
Fabian Meumertzheim
682d6f2345
Fix update_docs
with Bazel 7 and stardoc 0.6.0
2023-08-14 12:01:13 -07:00
Alex Eagle
c6e9fa0e62
chore: document JQ_BIN make var
2023-07-26 13:18:31 -07:00
Ricky Stewart
2931a1018a
feat: add freebsd support
2023-07-25 20:14:46 -07:00
Alex Eagle
383bbd589b
fix(windows): use HOMEPATH in place of HOME
2023-07-21 11:52:10 -07:00
Alex Eagle
5ecaeb5c53
chore: update docs
2023-07-18 11:01:26 -07:00
Alex Eagle
2fd7f9138c
docs: this sentence shouldn't be quoted
2023-07-18 11:01:26 -07:00
Alex Eagle
ff43d15afa
Update coreutils_toolchain.bzl
...
fix typo in url
2023-07-17 19:22:46 -07:00
Malte Poll
794df714d7
Use actual newline (instead of "\n") to split strings in yq rule
...
Fixes d79f4d4
Fixes #463
This is required since versions of yq older than 4.30.3 do not parse "\n" correctly.
See https://github.com/mikefarah/yq/issues/1430 and e02bb7194897edb916a6787fb8f8e5a7f432dd94
2023-06-22 17:09:44 -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
renovate[bot]
713824e8a7
chore(deps): update dependency bazel_skylib to v1.4.2 ( #453 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-12 22:16:56 -07:00
Alex Eagle
c89ec6a554
docs: clarify rlocationpath
2023-05-24 17:16:00 -07:00
Alex Eagle
9b148663d1
fix(stardoc): upgrade and stop skipping under bzlmod
...
Newest stardoc has fixed it, and since bzlmod will select the lowest
version in the dependencies, our bump here will take effect for users
as well.
2023-05-17 15:06:35 -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
Jiawen (Kevin) Chen
4c8866b618
Fix typos in run_binary docs.
2023-05-08 07:49:24 -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
1bb1056153
refactor: simplify glob validation
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
Greg Magolan
51f1ce702f
chore: update copy directory golang binary release versions to use ( #416 )
2023-05-01 20:21:10 -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
Jason Bedard
b983608c08
docs(write_source_file): specify the name of the generated diff_test ( #410 )
...
Fix #409
2023-04-19 14:09:03 -07:00
Alex Eagle
a04c31248b
docs(jq): document empty srcs
2023-04-19 09:03:52 -07:00
Alex Eagle
e9c0612fbf
Update stamping.bzl
...
Fix formatting error with underscores
2023-04-18 13:27:19 -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
Alister Cordiner
803d5ecda8
Correctly handle empty directory when checking for missing file
2023-04-03 18:03:19 -07:00
Alex Eagle
5162ae4d8c
feat: detect bzlmod automatically rather than requiring the user sets the flag.
...
Thanks to @aherrmann for pointing out this is possible: https://github.com/aherrmann/demo-bazel-detect-bzlmod-config-setting
2023-03-31 14:56:22 -07:00
Alex Eagle
035473873a
fix: disable stardoc under bzlmod and windows by default
...
We've been making these exceptions in downstream repos
2023-03-11 13:58:03 -08:00
Sahin Yort
e31867302e
chore: use coreutils hashsum ( #333 )
2023-03-10 20:37:57 +03:00
Derek Cormier
be41c1d686
fix: remove merkle tree caching ( #390 )
2023-03-09 12:24:44 -08:00
Gary Miguel
e872660dbc
Update link to example from angular ( #388 )
...
* Update link to example from angular
Previous target was deleted or renamed. Now use a permalink.
* bazel run @//docs:update
2023-03-07 15:42:16 -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
Matt Mackay
09c08e4ed7
fix: update recommend CI flags from Workflows ( #378 )
2023-02-22 15:46:20 -08:00
Greg Magolan
1fdfd6e831
fix: add missing **kwargs to write_aspect_bazelrc_presets ( #379 )
2023-02-22 12:17:00 -08:00
Derek Cormier
83fb3050c2
feat: allow additional common args to be passed to update_docs
2023-02-21 10:49:06 -08:00
Derek Cormier
23eb184493
feat: declare host_repo in bzlmod extension
2023-02-21 10:49:06 -08:00
Greg Magolan
569fa374ef
feat: add write_aspect_bazelrc_presets macro ( #370 )
2023-02-17 14:34:06 -08:00
Alex Eagle
1df2becc7a
chore: turn on more basic precommit checks
...
In particular this makes our bazelrc presets more compliant with client codebases, ensuring they can copy these files and not trip on their own pre-commit check
2023-02-17 11:00:00 -08:00
Greg Magolan
fde705ba8c
feat: make bazel-lib the source-of-truth for Aspect recommended bazelrc settings ( #369 )
2023-02-16 16:59:21 -08:00
Alex Eagle
bda8e69ea0
chore: fix spelling
2023-02-15 09:08:46 -08:00
Alister Cordiner
34d05573e2
Fix the 'find -type' argument used on MacOS ( #366 )
2023-02-14 10:38:43 -08:00
Greg Magolan
8f02b3364e
feat: add to_rlocation_path and to_repository_relative_path functions to paths.bzl ( #362 )
2023-02-11 12:36:49 -08:00
Derek Cormier
096805f0ce
enhancement: allow additional attributes to be passed to assert_* tests
2023-02-10 07:14:05 -08:00
Jason Bedard
05a92b8b99
fix: show directory being copied to in copy_to_directory progress message ( #345 )
...
* fix: use formatted short_path in copy progress messages
* fix: display destination directory in copy_to_directory progress message
2023-02-05 20:47:02 -08:00
Derek Cormier
d413641195
fix: fix a bug where bazel run @jq//:jq
cannot be run on M1
2023-02-03 08:15:48 -08:00
Greg Magolan
95d4b6974c
fix: update copy_directory and copy_to_directory to use binaries with copy concurrency limited ( #352 )
2023-02-01 16:14:51 -08:00
Alex Eagle
cb610ef169
chore: change to unzip -Z as it looks more likely to be on windows
2023-01-20 16:16:42 -08:00
Alex Eagle
2cb6c7ac4f
chore: also accept expected as a list of entries
2023-01-20 16:16:42 -08:00
Alex Eagle
19dcea9828
refactor: infer the archive type from the filename
2023-01-20 16:16:42 -08:00
Alex Eagle
9b7250d146
test: add happy-path test for assert_archive_contains
2023-01-20 16:16:42 -08:00
Alex Eagle
083ff26ced
feat: add assert helper for zip contents
...
Helps to make sure that Python wheels are correctly constructed, as one example.
2023-01-20 16:16:42 -08:00
Greg Magolan
1deb42c31f
chore: update copy toolchain to latest releases ( #340 )
2023-01-16 22:11:33 -08:00
Greg Magolan
d5631bc18d
chore: update copy toolchains to latest release ( #337 )
2023-01-16 19:38:56 -08:00
Greg Magolan
497409b15b
fix: bzlmod toolchain registration for copy_directory & copy_to_directory ( #336 )
2023-01-16 19:37:36 -08:00
Greg Magolan
63f5aff803
feat: hardlink generated files in copy_to_directory and copy_directory instead of copying ( #321 )
2023-01-16 17:19:13 -08:00
Greg Magolan
ce043b299d
fix: fix pathing issue in new copy_to_directory binary tool on Windows ( #334 )
2023-01-16 15:09:18 -08:00
Sahin Yort
4dc36a97f2
feat: add coreutils toolchain ( #332 )
2023-01-16 21:02:17 +03:00
Greg Magolan
1d3f04f7b9
chore: cleanup copy_to_directory docs and expose attr docstrings via lib for use downstream ( #330 )
2023-01-15 13:24:15 -08:00
Greg Magolan
7b6c814e27
Add copy_directory binary tool ( #324 )
2023-01-14 15:51:01 -08:00
Greg Magolan
4edb5018e8
chore: update pre-bazel 6 work-around in utils to only apply for bazel versions < 6 ( #320 )
2023-01-14 12:13:02 -08:00
Alex Eagle
14b8ec7a7b
refactor: just point to jq doc
2023-01-09 11:31:15 -08:00
Derek Cormier
0df23e54db
feat: modify assert_json_matches api before release
2023-01-09 11:31:15 -08:00