From 93295b0e7c1f3b4e7f400fc5c58659b112d1a1a4 Mon Sep 17 00:00:00 2001 From: Tomasz Pasternak Date: Thu, 12 Dec 2024 17:04:46 +0100 Subject: [PATCH] fix(qsync): Handle codegen - generic case (#7069) relates to ##6547 --- aspect/build_dependencies.bzl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/aspect/build_dependencies.bzl b/aspect/build_dependencies.bzl index 72024edd59b..a279e5b3774 100644 --- a/aspect/build_dependencies.bzl +++ b/aspect/build_dependencies.bzl @@ -546,6 +546,17 @@ def _collect_own_java_artifacts( own_gensrc_files.append(java_output.generated_source_jar) elif java_output.generated_class_jar: generated_class_jars.append(java_output.generated_class_jar) + else: + for src_attr in JVM_SRC_ATTRS: + # unfortunately, in cases where we have non-cource + # src attribute, we had to add full output jar + # to avoid red code + # We would need jar filtering to handle it well + if hasattr(rule.attr, src_attr): + for src in getattr(rule.attr, src_attr): + for file in src.files.to_list(): + if not file.is_source: + generated_class_jars.append(java_output.class_jar) if generated_class_jars: own_jar_files += generated_class_jars