File tree Expand file tree Collapse file tree 5 files changed +20
-18
lines changed Expand file tree Collapse file tree 5 files changed +20
-18
lines changed Original file line number Diff line number Diff line change @@ -66,15 +66,15 @@ erlang_app_info = rule(
6666 "app" : attr .label (allow_files = [".app" ]),
6767 "beam" : attr .label_list (
6868 allow_files = [".beam" , ".appup" ],
69- # cfg = beam_transition,
69+ cfg = beam_transition ,
7070 ),
7171 "priv" : attr .label_list (allow_files = True ),
7272 "license_files" : attr .label_list (allow_files = True ),
7373 "srcs" : attr .label_list (allow_files = True ),
7474 "deps" : attr .label_list (providers = [ErlangAppInfo ]),
75- # "_allowlist_function_transition": attr.label(
76- # default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
77- # ),
75+ "_allowlist_function_transition" : attr .label (
76+ default = "@bazel_tools//tools/allowlists/function_transition_allowlist" ,
77+ ),
7878 },
7979 provides = [ErlangAppInfo ],
8080)
Original file line number Diff line number Diff line change 11load ("//:erlang_app_info.bzl" , "ErlangAppInfo" )
22load ("//:util.bzl" , "path_join" )
33load (":util.bzl" , "erl_libs_contents" )
4+ load ("//transitions:beam_transition.bzl" , "beam_transition" )
45load (
56 "//tools:erlang_toolchain.bzl" ,
67 "erlang_dirs" ,
146147
147148erlang_bytecode = rule (
148149 implementation = _impl ,
150+ cfg = beam_transition ,
149151 attrs = {
150152 "compile_first" : attr .label (
151153 executable = True ,
152- # I would have thought this should be "exec", since this is run
153- # in the execution environment. However, it's an ecript needing
154- # beam, and "target" allows it to match the toolchains for this
155- # rule.
156- cfg = "target" ,
154+ cfg = "exec" ,
157155 ),
158156 "app_name" : attr .string (),
159157 "hdrs" : attr .label_list (
@@ -165,6 +163,7 @@ erlang_bytecode = rule(
165163 ),
166164 "beam" : attr .label_list (
167165 allow_files = [".beam" ],
166+ cfg = beam_transition ,
168167 ),
169168 "deps" : attr .label_list (
170169 providers = [ErlangAppInfo ],
@@ -176,6 +175,9 @@ erlang_bytecode = rule(
176175 "dest" : attr .string (
177176 default = "ebin" ,
178177 ),
178+ "_allowlist_function_transition" : attr .label (
179+ default = "@bazel_tools//tools/allowlists/function_transition_allowlist" ,
180+ ),
179181 },
180182 toolchains = ["//tools:toolchain_type" ],
181183)
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ erlang_bytecode = rule(
135135 ),
136136 "beam" : attr .label_list (
137137 allow_files = [".beam" ],
138- # cfg = beam_transition,
138+ cfg = beam_transition ,
139139 ),
140140 "deps" : attr .label_list (
141141 providers = [ErlangAppInfo ],
Original file line number Diff line number Diff line change @@ -143,14 +143,14 @@ escript_archive = rule(
143143 "hdrs" : attr .label_list (allow_files = [".hrl" ]),
144144 "beam" : attr .label_list (
145145 allow_files = [".beam" ],
146- # cfg = beam_transition,
146+ cfg = beam_transition ,
147147 ),
148148 "app" : attr .label (providers = [ErlangAppInfo ]),
149149 "flat" : attr .bool (),
150150 "drop_hrl" : attr .bool (),
151- # "_allowlist_function_transition": attr.label(
152- # default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
153- # ),
151+ "_allowlist_function_transition" : attr .label (
152+ default = "@bazel_tools//tools/allowlists/function_transition_allowlist" ,
153+ ),
154154 },
155155 toolchains = ["//tools:toolchain_type" ],
156156 executable = True ,
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ eunit_test = rule(
178178 "is_windows" : attr .bool (mandatory = True ),
179179 "compiled_suites" : attr .label_list (
180180 allow_files = [".beam" ],
181- # cfg = beam_transition,
181+ cfg = beam_transition ,
182182 ),
183183 "eunit_mods" : attr .string_list (),
184184 "target" : attr .label (providers = [ErlangAppInfo ]),
@@ -191,9 +191,9 @@ eunit_test = rule(
191191 ),
192192 "tools" : attr .label_list (),
193193 "test_env" : attr .string_dict (),
194- # "_allowlist_function_transition": attr.label(
195- # default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
196- # ),
194+ "_allowlist_function_transition" : attr .label (
195+ default = "@bazel_tools//tools/allowlists/function_transition_allowlist" ,
196+ ),
197197 },
198198 toolchains = ["//tools:toolchain_type" ],
199199 test = True ,
You can’t perform that action at this time.
0 commit comments