Could you guys publish v5.0.0 with artefacts for a...
# kotest
b
Could you guys publish v5.0.0 with artefacts for all targets, please. Currently snapshots are missing artefacts for non-testable targets, however it's sstill important to have them as otherwise you can't use kotest in commonMain for projects that also have production sources for untestable targets. Here's an easy escape hatch to cover them all with a single sourceSet https://github.com/mpetuska/klip/blob/master/buildSrc/src/main/kotlin/plugin.library-mpp.gradle.kts#L52
j
As I read, 5.0.0 will be released with Kotlin 1.6.0
b
I know, but that's irrelevant for this.
s
Can you make a pr ?
b
I'll try next week.
Just to confirm, are you happy with the general strategy of throwing errors on all actual implementations for untestable targets?
s
To be honest I don't know what you're asking for that's why a PR is best. Then I can review and understand.
b
Gotcha. I'll raise a pr regardless, but on a high level the strategy is as follows: 1. Create custom sourceSets fallbackMain and fallbackTest 2. Make them depend on commonMain and commonTest respectively 3. Implement all actuals from common sourceSets to throw errors 4. Identify targets that you cannot run tests for (e.g. mingwX86) 5. Register those targets and make their main and test sourceSets depend on fallback sourceSets That way the artifacts still get published for those targets without having to implement actuals for each of them individually
s
Why can't we publish for them properly
Is there a limitation
b
You could, but that'd just be throwaway work since code for those platforms would never get executed (untestable targets and all)
Main problem this is trying to solve is unlocking kotest usage in commonTest for projects that use those untestable targets
j
Main problem of those untestable targets is the fact kotest depends on coroutines and coroutines doesn't have them, no?
b
Some of them do, but I see your point. However kotest public api doesn't depend on kotlinx.coroutines (or at least I haven't encountered anything that does yet), so we could introduce commonCoroutinesMain that testable targets could depend on, while commonMain wouldn't and would only use stdlib bit of coroutines support.
s
What does untestable target mean
b
Targets which you cannot run tests for (even if you write them)
Examples include mingwX86 and all linux targets except linuxX64
Oh and android native targets
s
I guess android makes sense. Why can't you test mingw?