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
Derek Cormier
c64bb72324
fix: write_source_files incompatibility with bzlmod when writing from external repo
2023-01-09 10:54:51 -08:00
Alex Eagle
fe867981ee
feat(jq): add a diff_test helper
...
This is useful in rules_swc where we want to check that tsconfig.json and .swcrc have matching paths, and most users will want that too
2023-01-07 13:10:28 -08:00
Greg Magolan
fb3ef6e45d
feat: improved copy_to_directory performance & globbing support using copy_to_directory_bin_action ( #311 )
2023-01-07 11:26:27 -08:00
Konstantin Zadorozhny
b13fd20bee
Remove the use of realpath in tests ( #315 )
...
* do not use realpath
* make the file to follow symlinks on linux
2023-01-06 11:56:25 -08:00
Greg Magolan
bf76da829c
fix: handle directory symlinks in copy_to_directory_bin_action tool binary ( #314 )
2023-01-06 10:29:45 -08:00
Greg Magolan
ec13ec9a69
feat: improve performance of copy_to_directory by moving glob match & copying to a golang binary ( #308 )
2023-01-03 09:42:20 -08:00
Greg Magolan
4ad1dc2398
chore: run gazelle for golang ( #305 )
2023-01-01 15:37:00 -08:00
Greg Magolan
bad190e3dd
chore: ignore override_local_config_platform if Bazel 6 or newer ( #304 )
2023-01-01 15:17:41 -08:00
Greg Magolan
0d456be3c6
fix: formatting for new docsite ( #302 )
2022-12-28 08:03:18 -08:00
Derek Cormier
2689a48940
fix: fix a bug where transition tests required cpp toolchain on osx ( #299 )
2022-12-14 18:49:45 -08:00
Derek Cormier
72a26212f2
Add platform_transition_binary rule ( #289 )
...
* feat: add platform_transition_binary rule
2022-12-14 11:21:08 -08:00
Greg Magolan
2c66c1c778
fix: fail with better error message with trying to base64 decode a string that is not base64 encoded ( #298 )
2022-12-12 12:03:18 -08:00
Greg Magolan
35b7662e55
fix: write_source_files should use target platform for additional_update_targets ( #297 )
2022-12-03 15:02:33 -08:00
Greg Magolan
68aee64093
feat: add write_source_file to public API ( #295 )
2022-12-03 14:57:28 -08:00
Greg Magolan
421cf266bc
fix: add diff_test to docs ( #296 )
2022-12-03 11:32:37 -08:00
Greg Magolan
0109a2eee3
refactor: use rm -R instead -r as it is the primary option and lowercase -r is the alias ( #294 )
2022-12-03 10:52:52 -08:00
Greg Magolan
9059f8fa5e
feat: add executable attribute to write_source_files
2022-12-03 10:46:08 -08:00
Greg Magolan
3d73637ee5
feat: add base64 encode & decode utility functions ( #292 )
2022-11-25 17:00:02 -08:00
Greg Magolan
b5e0ac13e1
perf: optimize glob_match if the expression does not have any glob symbols ( #283 )
2022-11-14 14:45:25 -08:00
Greg Magolan
9077a147c0
fix: fix copy_to_directory flattening with root_paths = ['**'] ( #277 )
2022-11-07 18:28:04 -08:00
Greg Magolan
eab96f51f0
refactor: move bzl_library target out of @local_config_platform and just use exports_files in there instead ( #276 )
2022-11-04 15:11:14 -07:00
Greg Magolan
1f76b0b0bb
chore: nit cleanup in copy_to_directory _longest_glob_match helper ( #275 )
2022-11-03 09:42:03 -07:00
Jason Bedard
350408b93d
perf: do not execute glob for non-glob copy_to_directory root_paths/replace_prefix params ( #274 )
...
* glob: add is_glob util method
* perf: do not execute glob for non-glob copy_to_directory root_paths/replace_prefix params
* perf: add common path matching shortcuts
* fix: disallow invalid empty glob expressions
2022-11-02 18:44:42 -07:00
Alex Eagle
a9dc052c8b
feat: add assert_outputs
...
It's a simple way to make an executable example demonstrate what outputs a rule produces.
See https://github.com/aspect-build/rules_ts/pull/214 for an example usage in the real world.
2022-10-31 15:25:12 -07:00
Greg Magolan
f030847908
feat: add maybe_http_archive ( #270 )
2022-10-27 15:55:57 -07:00
Greg Magolan
21873d57b7
fix: use bzlmod @@ in to_label if Bazel version is 6 or greater ( #265 )
2022-10-26 15:46:39 -07:00
Greg Magolan
93c43e908e
chore: upgrade to Bazel 6.0.0rc1 but continue to also test Bazel 5.3.2 on CI ( #266 )
2022-10-26 15:05:27 -07:00
Greg Magolan
35623e23fe
feat: add is_bazel_6_or_greater utility function ( #264 )
2022-10-26 12:30:08 -07:00
Alex Eagle
1ec71cdcb5
fix: @@//label is not external
...
Workaround https://github.com/bazelbuild/bazel/issues/16528
2022-10-21 14:42:37 -07:00
renovate[bot]
b0921687e5
chore(deps): update dependency bazel_skylib to v1.3.0 ( #259 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-12 09:07:11 -06:00
Matt Mackay
569dd2663b
fix: handle other CPU architectures in local_config_platform ( #257 )
2022-10-07 12:41:31 -07:00
Matt Mackay
9d531ca646
feat: add test_suite containing all tests from write_source_files ( #256 )
2022-10-05 09:01:50 -07:00
Thulio Ferraz Assis
e609c85efe
Update stamping.bzl
2022-09-29 09:54:09 -07:00
Greg Magolan
6f37a3808b
fix: isolate bzl_libary targets for //lib/private:*.bzl i //lib/private/docs package so that platform_utils dep on @local_config_platform//:constraints doesn't leak unless downstream consumer is generating docs ( #254 )
2022-09-27 09:59:19 -07:00
Jason Bedard
475015bee0
refactor: give internal impl methods meaningful names ( #252 )
2022-09-20 15:23:56 -07:00
Greg Magolan
8e230b0721
feat: add bazel_version value to host_repo repository rule ( #246 )
2022-09-16 11:51:48 -07:00
Greg Magolan
65e852f774
fix: don't generate @aspect_bazel_lib_local_config_platform repository as it is a leaky abstraction for rule consumers and not just rule authors ( #243 )
2022-09-13 21:58:08 -07:00
Greg Magolan
be5c9d06bc
fix: fix bzl_library breakage created with load from @local_config_platform in copy rules ( #242 )
2022-09-13 20:37:24 -07:00
Greg Magolan
bbfb74c8e6
fix: fix host platform detection on all copy actions which always run locally ( #241 )
2022-09-12 20:45:48 -07:00
Jason Bedard
803dbf815e
copy_to_directory performance improvements ( #236 )
...
* reduce use of depset.to_list()
* avoid copying arrays when invoking copy_file
* fixup! reduce use of depset.to_list()
* fixup! reduce use of depset.to_list()
2022-09-12 18:01:25 -07:00
John Firebaugh
21216126b6
Add TODO comment in the windows implementation
2022-09-07 13:53:08 -07:00
John Firebaugh
77137f4020
Add JUnit XML output for diff_test
2022-09-07 13:53:08 -07:00
David Zbarsky
5edb10a0d8
Cleanup diff_test and copy_file implementations
2022-08-31 12:12:47 -07:00
Alex Eagle
b5653b6037
fix: TARGET make variable expansion: no extra leading @
...
Part of https://github.com/aspect-build/rules_js/issues/406
2022-08-29 07:45:00 -07:00
Greg Magolan
9efedb72c0
fix: handle the ** root_path case correctly in copy_to_directory
2022-08-25 21:25:13 -07:00
Greg Magolan
cbec12b286
chore: remote out-of-date reference to DefaultOutputPathInfo in write_source_files error message
2022-08-25 20:25:21 -07:00
Alex Eagle
f688d17cfb
feat: jq supports stamping
...
Fixes #223
2022-08-22 12:39:54 -07:00
Alex Eagle
896ee0c1f0
chore: set test timeouts to short
...
I recently enabled --test_verbose_timeout_warnings and that caused a bunch of warnings in our build.
This fixes it, and adds a utility for us or others to make test-wrapping macros that set to short by default.
2022-08-20 13:58:43 -07:00
Derek Cormier
889e736476
fix: fix a bug where the same file couldn't be copied to the same output
...
dir twice on Windows
2022-08-20 11:31:56 -07:00
Alex Eagle
15ec78eb73
ci: enable engflow RBE for github actions
2022-08-19 08:42:00 -07:00
Greg Magolan
3e20e6c0b1
fix: fix issue in copy_to_directory where root_path is the full path of a directory input
2022-08-18 21:14:12 -07:00
Twan Koolen
e446a3d8e7
Add failing test case demonstrating issue with root_paths in the presence of globs in dependencies.
2022-08-18 21:14:12 -07:00
Derek Cormier
c1e7aa1181
fix: fix a bug where multiple files were not written at the root package
2022-08-16 11:20:55 -07:00
Greg Magolan
c867e37856
fix: fix make var expansion in expand_template ( #213 )
2022-08-11 19:30:45 -07:00
Greg Magolan
3caff577b9
fix: handle copy_to_directory '.' and './**' special patterns correctly when in the root package ( #212 )
2022-08-11 16:25:51 -07:00
Alex Eagle
20d759f669
feat: add utility for asserting that a file contains a string
...
Useful for basic smoke tests of bazel outputs
2022-08-04 18:02:29 -07:00
Greg Magolan
165d7dafdb
chore: normalize src and outputs paths in copy_to_directory ( #206 )
2022-08-01 13:14:18 -07:00
Greg Magolan
06d54eef4c
fix: improve handling of duplicate files in copy_to_directory ( #205 )
2022-08-01 09:56:52 -07:00
Greg Magolan
c4f6fcff42
fix: add missing convienence aliases to exclude_srcs_packages
2022-07-29 18:52:54 -07:00
Greg Magolan
01da4db80c
fix: add missing convienence aliases to include_srcs_packages
2022-07-29 18:52:54 -07:00
Greg Magolan
6d3c1a393b
chore: add improved error messages to copy_to_directory when include_srcs_packages and include_srcs_patterns are empty
2022-07-29 18:52:54 -07:00
Greg Magolan
71910e93f3
feat: add include_srcs_packages and exclude_srcs_packages and improve implementation and documentation of other filters and transformations ( #203 )
2022-07-29 16:16:33 -07:00
Greg Magolan
83912625a3
chore: fix out-of-date text in copy_to_directory.include_srcs_patterns docstring ( #202 )
2022-07-28 23:31:08 -07:00
Greg Magolan
c74f0e29a6
chore: fix out-of-date text in copy_to_directory.include_srcs_patterns docstring: ( #201 )
2022-07-28 23:13:22 -07:00
Greg Magolan
a5e61b3961
fix: dedup additional files in copy_to_directory_action ( #200 )
2022-07-28 20:39:12 -07:00
Greg Magolan
e4399557d7
chore: add '?' pattern to test cases of copy_to_directory ( #199 )
2022-07-28 12:59:30 -07:00
Greg Magolan
85e8b7e555
feat: add glob support to copy_to_directory include_srcs_patterns, exclude_srcs_patterns, replace_prefixes and root_paths. ( #196 )
...
This deprecates exclude_prefixes with docs suggesting to using exclude_srcs_patterns instead
2022-07-28 12:50:41 -07:00
Greg Magolan
a945d66eb5
chore: add glob_match to docs ( #195 )
2022-07-28 11:15:14 -07:00
Greg Magolan
fd03cf0ecb
feat: add glob_match starlark utility function that support "*", "**" and "?" expressions as well as optionally allow for "*" and "?" to match of path separators ( #194 )
2022-07-27 18:48:02 -07:00
Greg Magolan
61c7cc209b
feat: add include_prefixes to copy_to_directory ( #193 )
2022-07-27 15:15:42 -07:00
Derek Cormier
998ee22369
fix: improve error message in directory_path when directory does not ( #192 )
...
exist
2022-07-22 09:37:27 -07:00
Derek Cormier
d0a897488b
fix: patch diff_test with runfiles fix
2022-07-15 13:07:28 -07:00
Alex Eagle
8a11a106db
chore: change default for run_binary#stamp
...
Greg convinced me that users will get really slow stamped builds because most run_binary tools don't actually read the status files, but will be cache-invalidated.
2022-07-15 09:29:28 -07:00
Alex Eagle
56bc408d94
feat: add stamping ability to run_binary
...
Fixes #185
2022-07-14 22:37:42 -07:00
Alex Eagle
de081fb72e
feat: basic stamping support
2022-07-14 22:37:42 -07:00
Alex Eagle
6f52c77a51
assert that directories aren't included in file_exists
2022-07-14 07:53:05 -07:00
Alex Eagle
546758589d
Add utility for checking file existence.
...
Avoids continued copy-paste of this like https://github.com/aspect-build/rules_ts/blob/main/ts/defs.bzl#L35-L44
2022-07-14 07:53:05 -07:00
Jesse Schalken
f2e5f4675f
fix: diff_test not working for files in directories starting with "external"
...
Example "external-dependencies/foo.txt"
2022-07-07 16:31:00 -07:00
Derek Cormier
a24508a202
fix: remote target_compatible_with from jq and yq toolchains
2022-07-06 10:46:23 -07:00
Derek Cormier
77474915d8
docs: encourage use of latest yq/jq in docs
2022-07-02 10:00:23 -07:00
Greg Magolan
d4f6524fbd
feat: add copy_to_directory_action
2022-06-28 09:08:45 -07:00
Alex Eagle
910786038c
chore: improve error when run_binary has no outputs
...
Otherwise users get
```
Traceback (most recent call last):
File "/private/var/tmp/_bazel_long.ho/a2216e06a77a9425f6dcd5fd195f64d5/external/aspect_bazel_lib/lib/private/run_binary.bzl", line 46, column 20, in _impl
ctx.actions.run(
Error in run: param 'outputs' may not be empty
```
2022-06-27 12:30:13 -07:00
David
f08952a8a6
docs: add a note about excluding from linters/formatters ( #156 )
2022-06-24 12:30:08 -07:00
Derek Cormier
de6e9ef843
fix: improve copy_to_bin error messaging when file is in external repo
2022-06-22 10:43:16 -07:00
Matt Mackay
829e5d513d
feat: add buildozer command to add visibility to the copy_to_bin helper error ( #171 )
2022-06-22 16:46:35 +01:00
Alex Eagle
32882befdf
feat: let jq act like copy_to_bin
...
This lets you have a file in the output tree with the same path as a source file, but modified.
2022-06-21 18:40:29 -07:00
Jesse Tatasciore
63ae772087
fix: Allow relative_file to take in paths starting with ../ ( #166 )
...
* fix: relative_file fix when to path is itself relative starting with ../
* feat: Allow users to use ../ in paths and add tests
* fix: Clarify documentation
Co-authored-by: Greg Magolan <gmagolan@gmail.com>
2022-06-20 14:21:49 -07:00
Derek Cormier
ce015ca4f3
fix: support non-json input files in jq
2022-06-17 10:27:18 -07:00
Greg Magolan
b3c2884bdf
feat: add mnemonic, progress_message && execution_requirements to run_binary ( #161 )
2022-06-16 16:58:41 -07:00
Greg Magolan
14f83ab4e8
feat: add out_dirs to run_binary rule and deprecate output_dir ( #160 )
2022-06-16 16:26:29 -07:00
Derek Cormier
80603fb7eb
fix: fix a bug where two copy_to_bin actions couldn't copy the same file
2022-06-16 11:49:09 -07:00
Derek Cormier
3ff61c57e9
fix: fix a bug where write_source_files diff_test fails on windows when
...
a source is from an external repository
2022-06-16 09:10:30 -07:00
Greg Magolan
6ba7c64c8d
feat: add allow_overwrites attribute to copy_to_directory and disable overwrites as the default behavior on linux and macos ( #153 )
2022-06-14 10:52:40 -07:00
Greg Magolan
63014de382
chore: cleanup fail msgs with substitutions for cleaner error logs
2022-06-14 06:46:34 -07:00
Alex Eagle
5a39b1fdab
chore: warn when copy_to_bin reads from bazel-out
2022-06-13 19:07:40 -07:00
Alex Eagle
562c4b231d
feat: add to_output_relative_path
...
This is useful in rules_js ecosystem where the working directory is bazel-out/arch/bin so many paths need to be relative to there.
2022-06-13 12:55:22 -07:00
Renovate Bot
1fcd85b247
chore(deps): update dependency bazel_skylib to v1.2.1
2022-06-10 17:46:01 -07:00
Alex Eagle
40f130b43b
refactor: nicer pattern for inlined maybe
2022-06-10 14:04:49 -07:00
Alex Eagle
abc3128fe7
refactor: remove use of maybe() helper ( #138 )
...
This allows renovate to understand our dependencies
2022-06-10 12:51:13 -07:00
Alex Eagle
695a8c4ad4
fix: copy_to_directory repairs read-only file permissions ( #134 )
...
When two srcs have the same nested folder, we need to correct the permissions like bazel's sandbox would.
Fixes #133
2022-06-08 15:41:54 -07:00
Greg Magolan
128f7c63fb
fix: improve error message when an invalid label or a file that is not a directory is passed to directory_path ( #127 )
2022-06-03 00:39:35 -07:00
Derek Cormier
9162a3f552
fix: buildifier lint errors
2022-06-02 18:15:24 -07:00
Alex Eagle
f11dea1b7a
chore: nit on error message ( #125 )
2022-06-01 18:01:15 -07:00
=
7017045707
fix: fix yq windows issues by bumping version
2022-05-31 11:07:14 -07:00
Greg Magolan
9a1edce1aa
fix: set correct suggested_update_target for write_source_files macros with multiple files ( #120 )
2022-05-25 18:47:32 -07:00
Derek Cormier
faba95385d
fix: fix a bug where copy_to_directory wouldn't copy hidden files inside
...
of folders
2022-05-19 20:50:43 -07:00
Derek Cormier
147a373568
fix: add mandatory provider for write_source_files
...
additional_update_targets
2022-05-18 10:50:09 -07:00
Sahin Yort
a699ccd4eb
fix: add mnemonic to jq and yq ( #106 )
2022-05-06 21:01:27 +03:00
Greg Magolan
47114fd4f9
fix: only use ctx.attr.patches if patches param is not specified ( #105 )
...
The currently implementation differs from the docstring here and in upstream skylib:
This rule is intended to be used in the implementation function of
a repository rule. If the parameters "patches", "patch_tool",
"patch_args", "patch_cmds" and "patch_cmds_win" are not specified
then they are taken from "ctx.attr".
2022-05-04 10:32:18 -07:00
Derek Cormier
2b50f99ab3
refactor: show a more helpful error message in copy_to_bin
2022-05-03 15:46:57 -07:00
Derek Cormier
400ff189b3
fix: fix a bug where yq failed to build in the root package
2022-05-02 20:35:59 -07:00
Greg Magolan
58b2c59bb0
refactor: export copy_to_directory_lib in the public API for use downstream in packaging rules ( #96 )
2022-04-29 15:26:24 -07:00
Greg Magolan
9a9a1888e1
chore: normalize @generated by comments ( #93 )
2022-04-29 00:49:15 -07:00
Greg Magolan
f1e10df09c
chore: replace is_windows select pattern with target_platform_has_constraint pattern ( #95 )
2022-04-29 00:36:51 -07:00
Greg Magolan
67e1072e25
chore: use aspect_bazel_lib diff_test ( #94 )
2022-04-29 00:36:41 -07:00
Greg Magolan
ec587d974e
chore: rename all instances of repository_ctx to the preferred rctx ( #92 )
2022-04-29 00:36:25 -07:00
Derek Cormier
6743c0cbcf
feat: make it easier to resolve jq/yq toolchains from a repository rule
2022-04-28 16:30:24 -07:00
Greg Magolan
41ce34470f
feat: add @aspect_bazel_lib_host repository and normalize function names in repo_utils ( #90 )
2022-04-28 14:18:06 -07:00
Alex Eagle
626af72fe8
test: add test coverage for docs rules
2022-04-27 17:34:45 -07:00
Alex Eagle
8138d7f6c3
test: introduce an e2e test asserting that bzlmod works
2022-04-27 17:34:45 -07:00
Greg Magolan
04c0f95136
feat: rename @yq_host and @jq_host to @yq and @jq respectively and export bin() function in index.bzl to get bin label for host platform ( #87 )
2022-04-27 08:08:28 -07:00
Greg Magolan
c2d4481570
feat: add default yq and jq versions ( #86 )
2022-04-23 12:06:40 -07:00
Derek Cormier
cf7b195031
fix: minor yq docs updates and fixes
2022-04-22 13:21:57 -07:00
Greg Magolan
048c32ae8d
feat: add jq_host and yq_host repositories
2022-04-21 18:48:45 -07:00
Greg Magolan
207d219a88
feat: add os_arch_name() function to repo_utils and cleanup yq & jq toolchains for repository names follow this convention ( #82 )
2022-04-21 17:45:33 -07:00
Derek Cormier
3e4024c785
feat: yq ( #80 )
2022-04-19 21:45:06 -07:00
Derek Cormier
e0af9633ed
chore: fix buildifier errors
2022-04-15 15:44:40 -07:00
Greg Magolan
d59ca6092f
fix: improve execution requirements of all copy files/directory rules for better perf ( #79 )
2022-04-14 10:48:44 -07:00
Greg Magolan
48b6f29367
fix: make tool of run_binary cfg=exec ( #74 )
2022-04-14 10:40:39 -07:00
Greg Magolan
0a9c48a712
feat: add create_windows_native_launcher_script to lib/windows_utils.bzl ( #75 )
2022-04-14 09:01:08 -07:00