@@ -46,7 +46,6 @@ BuildEnvironment = record(
46
46
priv_dirs = field (PathArtifactMapping , {}),
47
47
include_dirs = field (PathArtifactMapping , {}),
48
48
private_include_dir = field (list [Artifact ], []),
49
- ebin_dirs = field (PathArtifactMapping , {}),
50
49
deps_files = field (PathArtifactMapping , {}),
51
50
app_files = field (PathArtifactMapping , {}),
52
51
# convenience storrage
@@ -75,7 +74,6 @@ def _prepare_build_environment(
75
74
"""Prepare build environment and collect the context from all dependencies."""
76
75
priv_dirs = {}
77
76
include_dirs = {}
78
- ebin_dirs = {}
79
77
deps_files = {}
80
78
includes = {}
81
79
beams = {}
@@ -108,7 +106,6 @@ def _prepare_build_environment(
108
106
109
107
# collect dirs
110
108
priv_dirs [name ] = dep_info .priv_dir [toolchain .name ]
111
- ebin_dirs [name ] = dep_info .ebin_dir [toolchain .name ]
112
109
113
110
# collect app files
114
111
app_files [name ] = dep_info .app_file [toolchain .name ]
@@ -145,7 +142,6 @@ def _prepare_build_environment(
145
142
beams = beams ,
146
143
priv_dirs = priv_dirs ,
147
144
include_dirs = include_dirs ,
148
- ebin_dirs = ebin_dirs ,
149
145
deps_files = deps_files ,
150
146
app_files = app_files ,
151
147
input_mapping = input_mapping ,
@@ -175,7 +171,6 @@ def _generate_input_mapping(build_environment: BuildEnvironment, input_artifacts
175
171
priv_dirs = build_environment .priv_dirs ,
176
172
include_dirs = build_environment .include_dirs ,
177
173
private_include_dir = build_environment .private_include_dir ,
178
- ebin_dirs = build_environment .ebin_dirs ,
179
174
deps_files = build_environment .deps_files ,
180
175
app_files = build_environment .app_files ,
181
176
app_includes = build_environment .app_includes ,
@@ -244,7 +239,6 @@ def _generate_include_artifacts(
244
239
# copied fields
245
240
beams = build_environment .beams ,
246
241
priv_dirs = build_environment .priv_dirs ,
247
- ebin_dirs = build_environment .ebin_dirs ,
248
242
app_beams = build_environment .app_beams ,
249
243
app_files = build_environment .app_files ,
250
244
input_mapping = build_environment .input_mapping ,
@@ -261,20 +255,19 @@ def _generate_beam_artifacts(
261
255
name : str ,
262
256
src_artifacts : list [Artifact ]) -> BuildEnvironment :
263
257
# anchor for ebin dir
264
- anchor = _make_dir_anchor ( ctx , paths .join (_build_dir (toolchain ), name , "ebin" ) )
258
+ ebin = paths .join (_build_dir (toolchain ), name , "ebin" )
265
259
266
- beam_mapping = {
267
- module_name ( src ): ctx . actions . declare_output ( beam_path ( anchor , src ))
268
- for src in src_artifacts
269
- }
260
+ beam_mapping = {}
261
+ for erl in src_artifacts :
262
+ module = module_name ( erl )
263
+ beam_mapping [ module ] = ctx . actions . declare_output ( ebin , module + ".beam" )
270
264
271
265
# dep files
272
266
deps_files = _get_deps_files (ctx , toolchain , src_artifacts , build_environment .deps_files )
273
267
274
268
updated_build_environment = BuildEnvironment (
275
269
# updated fields
276
270
beams = _merge (beam_mapping , build_environment .beams ),
277
- ebin_dirs = _add (build_environment .ebin_dirs , name , anchor .artifact ),
278
271
deps_files = deps_files ,
279
272
app_beams = beam_mapping ,
280
273
# copied fields
@@ -317,7 +310,6 @@ def _generate_chunk_artifacts(
317
310
priv_dirs = build_environment .priv_dirs ,
318
311
include_dirs = build_environment .include_dirs ,
319
312
private_include_dir = build_environment .private_include_dir ,
320
- ebin_dirs = build_environment .ebin_dirs ,
321
313
deps_files = build_environment .deps_files ,
322
314
app_files = build_environment .app_files ,
323
315
app_includes = build_environment .app_includes ,
@@ -813,7 +805,6 @@ def _peek_private_includes(
813
805
beams = build_environment .beams ,
814
806
priv_dirs = build_environment .priv_dirs ,
815
807
include_dirs = build_environment .include_dirs ,
816
- ebin_dirs = build_environment .ebin_dirs ,
817
808
deps_files = build_environment .deps_files ,
818
809
app_files = build_environment .app_files ,
819
810
app_includes = build_environment .app_includes ,
0 commit comments