File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 11"""Rule that uses copy actions"""
22
33load ("@aspect_bazel_lib//lib:copy_file.bzl" , "COPY_FILE_TOOLCHAINS" , "copy_file_action" )
4+ load ("@aspect_bazel_lib//lib:copy_to_bin.bzl" , "COPY_FILE_TO_BIN_TOOLCHAINS" )
45
56def _simple_copy_file_impl (ctx ):
67 if len (ctx .files .src ) != 1 :
@@ -22,5 +23,5 @@ simple_copy_file = rule(
2223 "src" : attr .label (mandatory = True , allow_files = True ),
2324 "out" : attr .output (mandatory = True ),
2425 },
25- toolchains = COPY_FILE_TOOLCHAINS ,
26+ toolchains = COPY_FILE_TOOLCHAINS + COPY_FILE_TO_BIN_TOOLCHAINS ,
2627)
Original file line number Diff line number Diff line change @@ -169,7 +169,10 @@ bzl_library(
169169bzl_library (
170170 name = "copy_to_bin" ,
171171 srcs = ["copy_to_bin.bzl" ],
172- deps = ["@bazel_lib//lib:copy_to_bin" ],
172+ deps = [
173+ ":copy_file" ,
174+ "@bazel_lib//lib:copy_to_bin" ,
175+ ],
173176)
174177
175178#keep
Original file line number Diff line number Diff line change @@ -9,13 +9,17 @@ https://github.com/bazel-contrib/rules_nodejs/blob/8b5d27400db51e7027fe95ae413ee
99
1010load (
1111 "@bazel_lib//lib:copy_to_bin.bzl" ,
12- _COPY_FILE_TO_BIN_TOOLCHAINS = "COPY_FILE_TO_BIN_TOOLCHAINS" ,
1312 _copy_file_to_bin_action = "copy_file_to_bin_action" ,
1413 _copy_files_to_bin_actions = "copy_files_to_bin_actions" ,
1514 _copy_to_bin = "copy_to_bin" ,
1615)
1716
17+ # bazel-lib 3.x COPY_FILE_TO_BIN_TOOLCHAINS references COPY_FILE_TOOLCHAINS.
18+ # bazel-lib 2.x COPY_FILE_[TO_BIN_]TOOLCHAINS must only expose the @aspect_bazel_lib toolchain
19+ # names, which may alias to bazel-lib 3.x
20+ load (":copy_file.bzl" , "COPY_FILE_TOOLCHAINS" )
21+
1822copy_file_to_bin_action = _copy_file_to_bin_action
1923copy_files_to_bin_actions = _copy_files_to_bin_actions
2024copy_to_bin = _copy_to_bin
21- COPY_FILE_TO_BIN_TOOLCHAINS = _COPY_FILE_TO_BIN_TOOLCHAINS
25+ COPY_FILE_TO_BIN_TOOLCHAINS = COPY_FILE_TOOLCHAINS
You can’t perform that action at this time.
0 commit comments