rules_kotlin icon indicating copy to clipboard operation
rules_kotlin copied to clipboard

Associates or friends leak the internals of their compile classpath

Open Bencodes opened this issue 2 years ago • 2 comments

The flatten jar macro currently collects the entire compilation classpath of any target passed is as an associate which gives access to all of the Kotlin internal functions of not just the direct associate dependencies, but all of the compile time jars provided by the associate dependencies.

https://github.com/bazelbuild/rules_kotlin/blob/e1a92bc4077fb28456e34329e480cf6bfb0d1e31/kotlin/internal/jvm/associates.bzl#L55-L67

Bencodes avatar Aug 31 '23 00:08 Bencodes

Assuming this is not the intended behavior, replacing the JavaInfo#compile_jars with just the direct outputs will likely be a breaking change for some people and need to be feature flagged and gradually rolled out.

Bencodes avatar Aug 31 '23 00:08 Bencodes

This is implementing strict associates. Flag it?

restingbull avatar Sep 15 '23 20:09 restingbull