Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to load with Scalafmt 1.5.1 #69

Open
onzo-vlamp opened this issue Apr 26, 2018 · 4 comments
Open

Fails to load with Scalafmt 1.5.1 #69

onzo-vlamp opened this issue Apr 26, 2018 · 4 comments

Comments

@onzo-vlamp
Copy link

Plugin works with 1.4, but using scalafmtVersion := "1.5.1" I get:

[error] java.lang.NoSuchMethodError: org.scalafmt.config.ScalafmtConfig.copy$default$23()Ljava/lang/String;
[error] 	at com.lucidchart.scalafmt.impl.Scalafmtter$$anon$1.<init>(Scalafmtter.scala:16)
[error] 	at com.lucidchart.scalafmt.impl.Scalafmtter.formatter(Scalafmtter.scala:14)
[error] 	at com.lucidchart.sbt.scalafmt.ScalafmtCorePlugin$autoImport$.$anonfun$scalafmtFn$1(ScalafmtCorePlugin.scala:59)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:42)
[error] 	at sbt.std.Transform$$anon$4.work(System.scala:64)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:257)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] 	at sbt.Execute.work(Execute.scala:266)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:257)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:167)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:32)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:748)
[error] (sbt:scalafmt::scalafmt) java.lang.NoSuchMethodError: org.scalafmt.config.ScalafmtConfig.copy$default$23()Ljava/lang/String;
@onzo-vlamp onzo-vlamp changed the title Fails to load with ScalaFMT 1.5.1 Fails to load with Scalafmt 1.5.1 Apr 26, 2018
@dwijnand
Copy link

Reported upstream: scalameta/scalafmt#1158.

@olafurpg
Copy link

The org.scalafmt.config package is not public API, neo-sbt-scalafmt should follow the recommendations I made here #36 (comment)
to use the following methods
https://github.com/scalameta/scalafmt/blob/4a5b7681933fa1a1c289d5fa5aa8a4abfe8a71c9/scalafmt-core/shared/src/main/scala/org/scalafmt/Scalafmt.scala#L77-L89

@jubecker
Copy link
Contributor

I created a fix for this #72 . Comments, ideas?
Would love to get this in shape.

@mwz
Copy link

mwz commented Nov 11, 2018

Would it be possible to get the above PR merged and released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants