Is it possible somehow to have the same Kotlin fil...
# intellij
m
Is it possible somehow to have the same Kotlin file added to 2 different sourceSets that have different compile classpaths? That works with Gradle but obviously, IntelliJ can only show errors from one sourceSet. Is that configurable somehow? Like
analyze this file as foo sourceSet
?
e
I've never been able to get IntelliJ to handle overlapping sourcesets well. (did some symlink hacks before but bleh) would be curious to know if there's a way
m
I was happily surprised to see running the tests recognized the different sourceSets
Autocomplete is another story.. TBH I'm not sure what the UI would look like for something like this
Certainly a drop-down in the upper right corner saying "analyze as..."
c
but if its part of 2 source sets, idea can only show whats valid for both source sets, can’t it? what would analyze as do?
m
Switch what the errors are shown for 🙂
Depending the source set you chose, you get the compile classpath of one sourceSet or the other
Agree it's kind of a edge case so I'm perfectly ok if it doesn't exist, I was mainly curious
y
This kind of works but not. Really buggy sharing for example tests between two modules