@@ -17,6 +17,21 @@ import org.gradle.api.provider.Property
17
17
import org.gradle.workers.WorkAction
18
18
import org.gradle.workers.WorkParameters
19
19
20
+ /* *
21
+ * Infers a possible KLib ABI dump for an unsupported target.
22
+ *
23
+ * To infer a dump, walk up the default targets hierarchy tree starting from the unsupported
24
+ * target until it finds a node corresponding to a group containing least one supported target.
25
+ *
26
+ * After that, dumps generated for such supported targets are merged and declarations that are
27
+ * common to all of them are considered as a common ABI that most likely will be shared by the
28
+ * unsupported target.
29
+ *
30
+ * At the next step, if a project contains an old dump, declarations specific to the unsupported
31
+ * target are copied from it and merged into the common ABI extracted previously.
32
+ *
33
+ * The resulting dump is then used as an inferred dump for the unsupported target.
34
+ */
20
35
@BCVInternalApi
21
36
@BCVExperimentalApi
22
37
@OptIn(ExperimentalBCVApi ::class )
@@ -38,6 +53,8 @@ abstract class KLibInferSignaturesWorker : WorkAction<KLibInferSignaturesWorker.
38
53
val taskPath: Property <String >
39
54
}
40
55
56
+ private val taskPath: String = parameters.taskPath.get()
57
+
41
58
override fun execute () {
42
59
// Find a set of supported targets that are closer to unsupported target in the hierarchy.
43
60
// Note that dumps are stored using configurable name, but grouped by the canonical target name.
@@ -60,7 +77,7 @@ abstract class KLibInferSignaturesWorker : WorkAction<KLibInferSignaturesWorker.
60
77
}
61
78
if (extantImage == null ) {
62
79
logger.warn(
63
- " Project's ABI file exists, but empty: ${extantApiDumpFile} . " +
80
+ " [ $taskPath ] Project's ABI file exists, but empty: ${extantApiDumpFile} . " +
64
81
" The file will be ignored during ABI dump inference for the unsupported target "
65
82
// + target.get()
66
83
)
0 commit comments