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
SearchStateExploded exception #1527
Comments
I just hit the exact same problem, thank you @poslegm for the workaround. |
Here is an additional file that won't format from Scala Native. This has not formatted for as long as I can remember. Using $ scripts/scalafmt
org.scalafmt.cli.FailedToFormat: /Users/eric/workspace/scala-native/nscplugin/src/main/scala/scala/scalanative/nscplugin/NirGenExpr.scala
Caused by: org.scalafmt.Error$SearchStateExploded: Search state exploded around line 1271 |
Also, this previously in 1.5.1 was a Warning with no stack trace which I think is more appropriate if the user does not have much control over the error/warning. [warn] Error in /home/travis/build/scala-native/scala-native/nscplugin/src/main/scala/scala/scalanative/nscplugin/NirGenExpr.scala:
org.scalafmt.Error$SearchStateExploded: Search state exploded around line 1271 |
Looks like it works fine on master. Will see after 2.5.0-RC1 release |
This template is a guideline, not a strict requirement.
Steps
Given code like this:
When I run scalafmt like this:
Problem
Scalafmt formats code like this:
Expectation
Scalafmt doesn't fail
Notes
Braces around function body solves the issue:
And this code formats fine:
The text was updated successfully, but these errors were encountered: