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 with scalafmt 1.1.0 #29

Closed
nrinaudo opened this issue Jul 9, 2017 · 3 comments
Closed

Fails with scalafmt 1.1.0 #29

nrinaudo opened this issue Jul 9, 2017 · 3 comments

Comments

@nrinaudo
Copy link

nrinaudo commented Jul 9, 2017

When setting the scalafmt to 1.1.0, I'm getting the following error message:

warning: Unknown Scalafmt version 1.1.0; using 1.0 interface
scala.MatchError: 1.0 (of class java.lang.String)
	at com.lucidchart.sbt.scalafmt.ScalafmtCorePlugin$$anonfun$37.apply(ScalafmtCorePlugin.scala:243)
	at com.lucidchart.sbt.scalafmt.ScalafmtCorePlugin$$anonfun$37.apply(ScalafmtCorePlugin.scala:242)
	at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
	at sbt.EvaluateSettings$MixedNode.evaluate0(INode.scala:175)
	at sbt.EvaluateSettings$INode.evaluate(INode.scala:135)
	at sbt.EvaluateSettings$$anonfun$sbt$EvaluateSettings$$submitEvaluate$1.apply$mcV$sp(INode.scala:69)
	at sbt.EvaluateSettings.sbt$EvaluateSettings$$run0(INode.scala:78)
	at sbt.EvaluateSettings$$anon$3.run(INode.scala:74)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
[error] scala.MatchError: 1.0 (of class java.lang.String)

I would assume it has something to do with this bit of code, but I might be missing something.

@olafurpg
Copy link

olafurpg commented Jul 9, 2017

FWIW, the 1.x series will be binary compatible with each other

@hseeberger
Copy link
Contributor

It's this line: https://github.com/lucidsoftware/neo-sbt-scalafmt/blob/master/sbt-scalafmt/src/main/scala/com/lucidchart/sbt/scalafmt/ScalafmtCorePlugin.scala#L248

We need to return a tuple. Will send a PR.

pauldraper added a commit that referenced this issue Jul 10, 2017
Fix support for unknown Scalafmt version (closes #29)
@fommil
Copy link
Contributor

fommil commented Jul 10, 2017

should it still log out when 1.1.0 is used though?

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

4 participants