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

scalariform-example fails on Windows 10 #578

Open
sake92 opened this issue Jan 10, 2018 · 0 comments
Open

scalariform-example fails on Windows 10 #578

sake92 opened this issue Jan 10, 2018 · 0 comments

Comments

@sake92
Copy link
Contributor

sake92 commented Jan 10, 2018

Probably some issue with char encoding or something.
When I change the arrow character with '=>' it works, but it replaces them with '?' characters.

PS C:\cbt\examples\scalariform-example> cbt scalariform
INFO: Could not find files for the given pattern(s).
Exception in thread "main" java.lang.RuntimeException: Scalariform failed to parse some files:
C:\cbt\examples\scalariform-example\src\Main.scala: illegal character: ç
        at cbt.Scalariform$apply$config.apply(Scalariform.scala:45)
        at cbt.Scalariform$apply$config.apply(Scalariform.scala:33)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at cbt.Lib$$anonfun$5.apply(Lib.scala:109)
        at cbt.Lib$$anonfun$5.apply(Lib.scala:109)
        at scala.Option.map(Option.scala:146)
        at cbt.Lib.callReflective(Lib.scala:108)
        at cbt.Stage2$.run(Stage2.scala:35)
        at cbt.Stage2.run(Stage2.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at cbt.Stage1$.run(Stage1.scala:210)
        at cbt.Stage1.run(Stage1.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at cbt.NailgunLauncher.main(NailgunLauncher.java:123)
Caused by: scalariform.lexer.ScalaLexerException: illegal character: ç
        at scalariform.lexer.ScalaOnlyLexer$class.fetchScalaToken(ScalaOnlyLexer.scala:142)
        at scalariform.lexer.ScalaLexer.fetchScalaToken(ScalaLexer.scala:14)
        at scalariform.lexer.ScalaLexer.next(ScalaLexer.scala:192)
        at scalariform.lexer.WhitespaceAndCommentsGrouper.next(WhitespaceAndCommentsGrouper.scala:27)
        at scalariform.lexer.NewlineInferencer.fetchNextToken(NewlineInferencer.scala:72)
        at scalariform.lexer.NewlineInferencer.next(NewlineInferencer.scala:36)
        at scalariform.lexer.NewlineInferencer.next(NewlineInferencer.scala:8)
        at scala.collection.Iterator$class.foreach(Iterator.scala:893)
        at scalariform.lexer.NewlineInferencer.foreach(NewlineInferencer.scala:8)
        at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:59)
        at scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:183)
        at scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:45)
        at scala.collection.TraversableOnce$class.to(TraversableOnce.scala:310)
        at scalariform.lexer.NewlineInferencer.to(NewlineInferencer.scala:8)
        at scala.collection.TraversableOnce$class.toList(TraversableOnce.scala:294)
        at scalariform.lexer.NewlineInferencer.toList(NewlineInferencer.scala:8)
        at scalariform.lexer.ScalaLexer$.tokenise(ScalaLexer.scala:264)
        at scalariform.formatter.SpecificFormatter$class.fullFormat(SpecificFormatter.scala:31)
        at scalariform.formatter.ScalaFormatter$$anon$1.fullFormat(ScalaFormatter.scala:476)
        at scalariform.formatter.ScalaFormatter$.formatAsEdits(ScalaFormatter.scala:485)
        at scalariform.formatter.ScalaFormatter$.format(ScalaFormatter.scala:469)
        at cbt.Scalariform$apply$config$$anonfun$2.apply(Scalariform.scala:39)
        at cbt.Scalariform$apply$config$$anonfun$2.apply(Scalariform.scala:37)
        at cbt.file.Module$$anonfun$2.apply(file.scala:48)
        at cbt.file.Module$$anonfun$2.apply(file.scala:46)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
        at scala.collection.immutable.List.foreach(List.scala:381)
        at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
        at scala.collection.immutable.List.map(List.scala:285)
        at cbt.file.Module$class.transformFilesOrError(file.scala:46)
        at cbt.Stage1Lib.transformFilesOrError(Stage1Lib.scala:14)
        at cbt.Scalariform$apply$config.apply(Scalariform.scala:37)
        ... 22 more
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

1 participant