Closed cptwunderlich closed 4 months ago
Thanks for the report @cptwunderlich !
I've seen these initial warnings before, but everything works normally after that.
You probably have an invalid setup around credentials on CI, which sbt handles gracefully, but sbt-scalafix does not. I'll open a PR to align the behavior.
This should be fixed in the latest snapshot being published right now
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1+6-861ec563-SNAPSHOT")
resolvers += Resolver.sonatypeRepo("snapshots")
One month ago, scala-steward upgraded the sbt-scalafix plugin to v 0.12.1 and the build of this branch has been broken since, now I'm investigating.
Strangely, the build only fails in CI, but works locally. We have used sbt-scalafix 0.12.0 before and it worked fine, no other changes. We use a custom resolver to a private Sonatype repo, i.e., in
plugins.sbt
we haveresolvers += "Sonatype Something" at "https://something"
.Credential files exist in
~/.config/coursier/credentials.properties
and~/.sbt/credentials
.Stacktrace:
I've seen these initial warnings before, but everything works normally after that. This exception is new. As I said, nothing else changed, only the sbt-scalafix version.
The stack-trace leads to ScalafixPlugin.sbt:297 and I can see that this code was added in the latest release, with PR 404.
Do you have any pointers on what changed here and what credential files scalafix is looking for now?
Sbt version used is 1.9.9
EDIT: We're only using the
OrganizeImports
task, no custom tasks. So the private repo is only for our build artifacts. Scalafix is run in our formatting step, which runs scalafmt and scalafix. So I'm not sure why it would even need any credentials...