Improve error reporting #2

Closed
gbasler opened this Issue Dec 17, 2012 · 4 comments

Projects

None yet

3 participants

@gbasler
gbasler commented Dec 17, 2012

Failures in the parser are swallowed

https://github.com/sbt/sbt-scalariform/blob/master/src/main/scala/com/typesafe/sbt/Scalariform.scala#L89

[debug] Initially invalidated: Set()
[error] Scalariform parser error: see compile for details
[info] Classpath: [Attributed(c:\var\ivy2\cache\com.efgfp.protobufenricher\protobuf-enricher\jars\protobuf-enricher-1.1.5.jar)]
[success] Total time: 3 s, completed 17.12.2012 15:56:23
@retronym
Member

It would also be prudent to move the try/catch into the loop over files, so that a parser bug in one file doesn't prevent reformatting for everything else.

@hseeberger
Member

@gbasler Could you please provide a reproducible test case?

@gbasler
gbasler commented Dec 21, 2012

Try to format this small example with the sbt-plugin: scala-ide/scalariform#60

We have a file that triggered this bug in Scalariform 0.1.3 (which is the version the sbt plugin uses). It has been fixed only recently.

@hseeberger hseeberger pushed a commit that closed this issue Dec 21, 2012
Heiko Seeberger closes #2: Improve error reporting 1cd2628
@hseeberger
Member

Thanks. Fixed in 1.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment