You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 have resolvers += "Sonatype Something" at "https://something".
Credential files exist in ~/.config/coursier/credentials.properties and ~/.sbt/credentials.
Stacktrace:
[warn] Credentials file **** does not exist
[warn] Credentials file **** does not exist
[warn] Credentials file **** does not exist
[warn] Credentials file **** does not exist
[error] java.lang.RuntimeException: Credentials file **** does not exist
[error] at scala.sys.package$.error(package.scala:30)
[error] at sbt.librarymanagement.ivy.Credentials$.toDirect(Credentials.scala:36)
[error] at sbt.librarymanagement.ivy.Credentials$.$anonfun$allDirect$1(Credentials.scala:31)
[error] at scala.collection.immutable.List.map(List.scala:293)
[error] at sbt.librarymanagement.ivy.Credentials$.allDirect(Credentials.scala:31)
[error] at scalafix.sbt.ScalafixPlugin$.$anonfun$buildSettings$1(ScalafixPlugin.scala:297)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error] at sbt.Execute.work(Execute.scala:292)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[error] at java.base/java.lang.Thread.run(Thread.java:840)
[error] (ThisBuild / scalafixSbtResolversAsCoursierRepositories) Credentials file **** does not exist
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...
The text was updated successfully, but these errors were encountered:
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.
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...The text was updated successfully, but these errors were encountered: