@@ -329,6 +329,16 @@ def _collect_mixed_language_output_files(
329
329
],
330
330
)
331
331
332
+ # TODO: Once BwB mode no longer has target dependencies, remove
333
+ # transitive products. Until then we need them, to allow `Copy Bazel
334
+ # Outputs` to be able to copy the products of transitive dependencies.
335
+ transitive_products = memory_efficient_depset (
336
+ transitive = [
337
+ info .outputs ._transitive_products
338
+ for info in mixed_target_infos
339
+ ],
340
+ )
341
+
332
342
transitive_compile_params = memory_efficient_depset (
333
343
compile_params_files ,
334
344
transitive = [
@@ -354,13 +364,15 @@ def _collect_mixed_language_output_files(
354
364
)
355
365
356
366
products_depset = memory_efficient_depset (
357
- (
358
- # We don't want to declare indexstore files as outputs, because they
359
- # expand to individual files and blow up the BEP. Instead they are
360
- # declared as inputs to `indexstores_filelist`, ensuring they are
361
- # downloaded as needed.
362
- [indexstores_filelist ]
363
- ),
367
+ # We don't want to declare indexstore files as outputs, because they
368
+ # expand to individual files and blow up the BEP. Instead they are
369
+ # declared as inputs to `indexstores_filelist`, ensuring they are
370
+ # downloaded as needed.
371
+ [indexstores_filelist ],
372
+ transitive = [
373
+ info .outputs ._transitive_products
374
+ for info in mixed_target_infos
375
+ ],
364
376
)
365
377
366
378
direct_group_list = [
@@ -382,8 +394,7 @@ def _collect_mixed_language_output_files(
382
394
_transitive_indexstores = transitive_indexstores ,
383
395
_transitive_infoplists = transitive_infoplists ,
384
396
_transitive_link_params = transitive_link_params ,
385
- # Only top-level targets will have products or dSYM files
386
- _transitive_products = EMPTY_DEPSET ,
397
+ _transitive_products = products_depset ,
387
398
),
388
399
struct (
389
400
_direct_group_list = direct_group_list ,
0 commit comments