scalameta / sbt-scalafmt

sbt plugin for Scalafmt
https://scalameta.org/scalafmt/
Apache License 2.0
197 stars 42 forks source link

Build crashes with a "corrupted class path" error after upgrading to Scalafmt 3.7.16 #290

Closed odisseus closed 11 months ago

odisseus commented 11 months ago

I have a SBT project which works well with Scalafmt 3.7.15. When attempting to upgrade to 3.7.16, I get the following error:

$ sbt scalafmtCheckAll
[info] welcome to sbt 1.9.7 (Oracle Corporation Java 19.0.2)
...
[error] (driver_2_13 / Compile / scalafmtCheck) org.scalafmt.sbt.ScalafmtSbtReporter$ScalafmtSbtError: scalafmt: [v3.7.16] corrupted class path: [/lots/of/paths/here ...][[~/devel/ide-probe/.scalafmt.conf]]

The same problem can be seen here in CI.

Interestingly, the Coursier distribution of Scalafmt seems to work without error:

$ scalafmt
Reformatting...
  100.0% [##########] 247 source files formatted

My configuration file looks like this:

version = "3.7.16"
project.git = true
align = most
runner.dialect = scala213
align.arrowEnumeratorGenerator = true
danglingParentheses.preset = true
docstrings.style = asterisk
maxColumn = 120

rewrite.rules = [AvoidInfix]
kitbellew commented 11 months ago

duplicate of scalameta/scalafmt#3689