KSP: kotlinSymbolProcessorsResolved does not resolve with bom
Found it during testing with Micronaut:
we should be able to do this
def kotlinSymbolProcessors = Seq(
mvn"io.micronaut:micronaut-inject-kotlin:4.9.9",
mvn"io.micronaut.openapi:micronaut-openapi:6.19.3"
)
without the versions as happens in micronaut gradle for the versions that exist in:
mvn"io.micronaut.platform:micronaut-platform:4.9.2"
it looks like if checkGradleModules is true bom is not working , for example with:
def kotlinSymbolProcessorsResolved: T[Seq[PathRef]] = Task {
defaultResolver().classpath(
kotlinSymbolProcessors(),
boms = allBomDeps()
)
}
See: https://github.com/com-lihaoyi/mill/pull/6359
any ideas?
@lefou @alexarchambault @lihaoyi
Error without the checkGradleModules override:
8461] done compiling
8461] [error] micronaut.kotlinSymbolProcessorsResolved
8461] java.lang.RuntimeException:
8461] Resolution failed for 1 modules:
8461] --------------------------------------------
8461] io.micronaut:micronaut-inject-kotlin:
8461] not found: /home/vnicolaou/mill/out/dist/localRepo.dest/io/micronaut/micronaut-inject-kotlin/maven-metadata.xml
8461] not found: /home/vnicolaou/.ivy2/local/io.micronaut/micronaut-inject-kotlin
8461] No version available in (,)
8461]
I'm not sure TBH, @alexarchambault would probably know if anyone since he worked on the gradle module support in coursier
from my side, I can either introduce a workaround, with a ksp dedicated resolver that has gradle modules disabled or start looking into coursier . A third option is to figure out the difference in code paths with the resolve mvn deps which is clearly working and see if it can be reused
EDIT: I'll start with the third option
So https://github.com/coursier/coursier/pull/3534 should fix that, after a coursier release, and coursier version bump here
So coursier/coursier#3534 should fix that, after a coursier release, and coursier version bump here
ah nice, thank you! if we had that default in kotlinmodule and pass it to the resolver, it would also fix it , right? (just out of interest)
ah nice, thank you! if we had that default in kotlinmodule and pass it to the resolver, it would also fix it , right? (just out of interest)
What do you mean? Which default?
ah nice, thank you! if we had that default in kotlinmodule and pass it to the resolver, it would also fix it , right? (just out of interest)
What do you mean? Which default?
def classpath[T: CoursierModule.Resolvable](
deps: IterableOnce[T],
sources: Boolean = false,
artifactTypes: Option[Set[coursier.Type]] = None,
resolutionParamsMapOpt: Option[ResolutionParams => ResolutionParams] = None,
I thought there was something in the resolution params to workaround the issue, but looking at it now, I think not
Waiting for a new coursier release, which should fix it.
there's a new version that fixes both issues (+ the gradle rejects), thanks @alexarchambault
there's a new version that fixes both issues (+ the gradle rejects), thanks @alexarchambault
Yes, but there are issues on the coursier CI that are making the release fail. Working on it.
there's a new version that fixes both issues (+ the gradle rejects), thanks @alexarchambault
Yes, but there are issues on the coursier CI that are making the release fail. Working on it.
ah , I saw the tag, yep, no worries!