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

java.lang.NoClassDefFoundError: scala/reflect/api/Symbols$SymbolApi #492

Closed
TimothyKlim opened this Issue Oct 6, 2016 · 8 comments

Comments

Projects
None yet
2 participants
@TimothyKlim

TimothyKlim commented Oct 6, 2016

I'm using the reformatOnCompileSettings settings and I got a strange error when I tried to upgrade sbt-scalafmt from 0.4.3-RC1 to 0.4.3:

>last compile:scalafmt
java.lang.NoClassDefFoundError: scala/reflect/api/Symbols$SymbolApi
    at scala.meta.internal.tokens.package$.XtensionTokenName(package.scala:7)
    at scala.meta.internal.parsers.ScalametaParser.syntaxErrorExpected(ScalametaParser.scala:416)
    at scala.meta.internal.parsers.ScalametaParser.accept(ScalametaParser.scala:422)
    at scala.meta.internal.parsers.ScalametaParser.inParens(ScalametaParser.scala:326)
    at scala.meta.internal.parsers.ScalametaParser.argumentExprs(ScalametaParser.scala:2060)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$simpleExprRest$1$$anonfun$apply$46.apply(ScalametaParser.scala:1995)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$simpleExprRest$1$$anonfun$apply$46.apply(ScalametaParser.scala:1995)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$simpleExprRest$1.apply(ScalametaParser.scala:1995)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$simpleExprRest$1.apply(ScalametaParser.scala:1977)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.simpleExprRest(ScalametaParser.scala:1977)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$simpleExpr$1.apply(ScalametaParser.scala:1974)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$simpleExpr$1.apply(ScalametaParser.scala:1943)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser.simpleExpr(ScalametaParser.scala:1943)
    at scala.meta.internal.parsers.ScalametaParser.prefixExpr(ScalametaParser.scala:1921)
    at scala.meta.internal.parsers.ScalametaParser.postfixExpr(ScalametaParser.scala:1897)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$expr$1$$anonfun$41.apply(ScalametaParser.scala:1594)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$expr$1$$anonfun$41.apply(ScalametaParser.scala:1594)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$expr$1.apply(ScalametaParser.scala:1594)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$expr$1.apply(ScalametaParser.scala:1522)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser.expr(ScalametaParser.scala:1522)
    at scala.meta.internal.parsers.ScalametaParser.expr(ScalametaParser.scala:1499)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$funDefRest$1.apply(ScalametaParser.scala:2997)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$funDefRest$1.apply(ScalametaParser.scala:2969)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.funDefRest(ScalametaParser.scala:2969)
    at scala.meta.internal.parsers.ScalametaParser.funDefOrDclOrSecondaryCtor(ScalametaParser.scala:2965)
    at scala.meta.internal.parsers.ScalametaParser.defOrDclOrSecondaryCtor(ScalametaParser.scala:2909)
    at scala.meta.internal.parsers.ScalametaParser.nonLocalDefOrDcl(ScalametaParser.scala:2883)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateStat$1.applyOrElse(ScalametaParser.scala:3474)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateStat$1.applyOrElse(ScalametaParser.scala:3470)
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
    at scala.meta.internal.parsers.ScalametaParser.statSeq(ScalametaParser.scala:3388)
    at scala.meta.internal.parsers.ScalametaParser.templateStats(ScalametaParser.scala:3469)
    at scala.meta.internal.parsers.ScalametaParser.templateStatSeq(ScalametaParser.scala:3456)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateBody$1.apply(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateBody$1.apply(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser.inBraces(ScalametaParser.scala:338)
    at scala.meta.internal.parsers.ScalametaParser.templateBody(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser.templateBodyOpt(ScalametaParser.scala:3358)
    at scala.meta.internal.parsers.ScalametaParser.templateOpt(ScalametaParser.scala:3342)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$classDef$1.apply(ScalametaParser.scala:3090)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$classDef$1.apply(ScalametaParser.scala:3074)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.classDef(ScalametaParser.scala:3074)
    at scala.meta.internal.parsers.ScalametaParser.tmplDef(ScalametaParser.scala:3041)
    at scala.meta.internal.parsers.ScalametaParser.defOrDclOrSecondaryCtor(ScalametaParser.scala:2913)
    at scala.meta.internal.parsers.ScalametaParser.nonLocalDefOrDcl(ScalametaParser.scala:2883)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateStat$1.applyOrElse(ScalametaParser.scala:3474)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateStat$1.applyOrElse(ScalametaParser.scala:3470)
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
    at scala.meta.internal.parsers.ScalametaParser.statSeq(ScalametaParser.scala:3388)
    at scala.meta.internal.parsers.ScalametaParser.templateStats(ScalametaParser.scala:3469)
    at scala.meta.internal.parsers.ScalametaParser.templateStatSeq(ScalametaParser.scala:3456)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateBody$1.apply(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateBody$1.apply(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser.inBraces(ScalametaParser.scala:338)
    at scala.meta.internal.parsers.ScalametaParser.templateBody(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser.templateBodyOpt(ScalametaParser.scala:3358)
    at scala.meta.internal.parsers.ScalametaParser.templateOpt(ScalametaParser.scala:3342)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$objectDef$1.apply(ScalametaParser.scala:3099)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$objectDef$1.apply(ScalametaParser.scala:3097)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.objectDef(ScalametaParser.scala:3097)
    at scala.meta.internal.parsers.ScalametaParser.tmplDef(ScalametaParser.scala:3047)
    at scala.meta.internal.parsers.ScalametaParser.topLevelTmplDef(ScalametaParser.scala:3027)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$topStat$1.applyOrElse(ScalametaParser.scala:3416)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$topStat$1.applyOrElse(ScalametaParser.scala:3406)
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
    at scala.meta.internal.parsers.ScalametaParser.statSeq(ScalametaParser.scala:3388)
    at scala.meta.internal.parsers.ScalametaParser.topStatSeq(ScalametaParser.scala:3405)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1.scala$meta$internal$parsers$ScalametaParser$$anonfun$$bracelessPackageStats$1(ScalametaParser.scala:3633)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1$$anonfun$apply$87.apply(ScalametaParser.scala:3639)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1$$anonfun$apply$87.apply(ScalametaParser.scala:3639)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1.apply(ScalametaParser.scala:3639)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1.apply(ScalametaParser.scala:3611)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser.batchSource(ScalametaParser.scala:3611)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$source$1.apply(ScalametaParser.scala:3596)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$source$1.apply(ScalametaParser.scala:3595)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser.source(ScalametaParser.scala:3594)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$parseSource$1.apply(ScalametaParser.scala:157)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$parseSource$1.apply(ScalametaParser.scala:157)
    at scala.meta.internal.parsers.ScalametaParser.parseRule(ScalametaParser.scala:46)
    at scala.meta.internal.parsers.ScalametaParser.parseSource(ScalametaParser.scala:157)
    at scala.meta.parsers.Parse$$anonfun$parseSource$1.apply(Parse.scala:31)
    at scala.meta.parsers.Parse$$anonfun$parseSource$1.apply(Parse.scala:31)
    at scala.meta.internal.parsers.ScalametaParser$$anon$201.apply(ScalametaParser.scala:3651)
    at scala.meta.parsers.Api$XtensionParseDialectInput.parse(Api.scala:21)
    at scala.meta.parsers.Api$XtensionParseInputLike.parse(Api.scala:10)
    at org.scalafmt.rewrite.Rewrite$.apply(Rewrite.scala:47)
    at org.scalafmt.Scalafmt$.format(Scalafmt.scala:49)
    at org.scalafmt.cli.Scalafmt210.format(Scalafmt210.scala:46)
    at org.scalafmt.cli.Scalafmt210.format(Scalafmt210.scala:30)
    at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.scalafmt.sbt.HasScalaFmt.org$scalafmt$sbt$HasScalaFmt$$handleFile(HasScalaFmt.scala:85)
    at org.scalafmt.sbt.HasScalaFmt$$anonfun$writeFormattedContentsToFiles$1$$anonfun$apply$3.apply(HasScalaFmt.scala:54)
    at org.scalafmt.sbt.HasScalaFmt$$anonfun$writeFormattedContentsToFiles$1$$anonfun$apply$3.apply(HasScalaFmt.scala:54)
    at scala.collection.Iterator$class.foreach(Iterator.scala:727)
    at scala.collection.parallel.immutable.ParHashSet$ParHashSetIterator.foreach(ParHashSet.scala:76)
    at scala.collection.parallel.ParIterableLike$Foreach.leaf(ParIterableLike.scala:975)
    at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply$mcV$sp(Tasks.scala:54)
    at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply(Tasks.scala:53)
    at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply(Tasks.scala:53)
    at scala.collection.parallel.Task$class.tryLeaf(Tasks.scala:56)
    at scala.collection.parallel.ParIterableLike$Foreach.tryLeaf(ParIterableLike.scala:972)
    at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask$class.internal(Tasks.scala:183)
    at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.internal(Tasks.scala:514)
    at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask$class.compute(Tasks.scala:162)
    at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.compute(Tasks.scala:514)
    at scala.concurrent.forkjoin.RecursiveAction.exec(RecursiveAction.java:160)
    at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
    at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
    at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
    at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.ClassNotFoundException: scala.reflect.api.Symbols$SymbolApi
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at scala.meta.internal.tokens.package$.XtensionTokenName(package.scala:7)
    at scala.meta.internal.parsers.ScalametaParser.syntaxErrorExpected(ScalametaParser.scala:416)
    at scala.meta.internal.parsers.ScalametaParser.accept(ScalametaParser.scala:422)
    at scala.meta.internal.parsers.ScalametaParser.inParens(ScalametaParser.scala:326)
    at scala.meta.internal.parsers.ScalametaParser.argumentExprs(ScalametaParser.scala:2060)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$simpleExprRest$1$$anonfun$apply$46.apply(ScalametaParser.scala:1995)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$simpleExprRest$1$$anonfun$apply$46.apply(ScalametaParser.scala:1995)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$simpleExprRest$1.apply(ScalametaParser.scala:1995)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$simpleExprRest$1.apply(ScalametaParser.scala:1977)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.simpleExprRest(ScalametaParser.scala:1977)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$simpleExpr$1.apply(ScalametaParser.scala:1974)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$simpleExpr$1.apply(ScalametaParser.scala:1943)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser.simpleExpr(ScalametaParser.scala:1943)
    at scala.meta.internal.parsers.ScalametaParser.prefixExpr(ScalametaParser.scala:1921)
    at scala.meta.internal.parsers.ScalametaParser.postfixExpr(ScalametaParser.scala:1897)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$expr$1$$anonfun$41.apply(ScalametaParser.scala:1594)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$expr$1$$anonfun$41.apply(ScalametaParser.scala:1594)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$expr$1.apply(ScalametaParser.scala:1594)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$expr$1.apply(ScalametaParser.scala:1522)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser.expr(ScalametaParser.scala:1522)
    at scala.meta.internal.parsers.ScalametaParser.expr(ScalametaParser.scala:1499)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$funDefRest$1.apply(ScalametaParser.scala:2997)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$funDefRest$1.apply(ScalametaParser.scala:2969)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.funDefRest(ScalametaParser.scala:2969)
    at scala.meta.internal.parsers.ScalametaParser.funDefOrDclOrSecondaryCtor(ScalametaParser.scala:2965)
    at scala.meta.internal.parsers.ScalametaParser.defOrDclOrSecondaryCtor(ScalametaParser.scala:2909)
    at scala.meta.internal.parsers.ScalametaParser.nonLocalDefOrDcl(ScalametaParser.scala:2883)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateStat$1.applyOrElse(ScalametaParser.scala:3474)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateStat$1.applyOrElse(ScalametaParser.scala:3470)
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
    at scala.meta.internal.parsers.ScalametaParser.statSeq(ScalametaParser.scala:3388)
    at scala.meta.internal.parsers.ScalametaParser.templateStats(ScalametaParser.scala:3469)
    at scala.meta.internal.parsers.ScalametaParser.templateStatSeq(ScalametaParser.scala:3456)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateBody$1.apply(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateBody$1.apply(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser.inBraces(ScalametaParser.scala:338)
    at scala.meta.internal.parsers.ScalametaParser.templateBody(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser.templateBodyOpt(ScalametaParser.scala:3358)
    at scala.meta.internal.parsers.ScalametaParser.templateOpt(ScalametaParser.scala:3342)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$classDef$1.apply(ScalametaParser.scala:3090)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$classDef$1.apply(ScalametaParser.scala:3074)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.classDef(ScalametaParser.scala:3074)
    at scala.meta.internal.parsers.ScalametaParser.tmplDef(ScalametaParser.scala:3041)
    at scala.meta.internal.parsers.ScalametaParser.defOrDclOrSecondaryCtor(ScalametaParser.scala:2913)
    at scala.meta.internal.parsers.ScalametaParser.nonLocalDefOrDcl(ScalametaParser.scala:2883)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateStat$1.applyOrElse(ScalametaParser.scala:3474)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateStat$1.applyOrElse(ScalametaParser.scala:3470)
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
    at scala.meta.internal.parsers.ScalametaParser.statSeq(ScalametaParser.scala:3388)
    at scala.meta.internal.parsers.ScalametaParser.templateStats(ScalametaParser.scala:3469)
    at scala.meta.internal.parsers.ScalametaParser.templateStatSeq(ScalametaParser.scala:3456)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateBody$1.apply(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateBody$1.apply(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser.inBraces(ScalametaParser.scala:338)
    at scala.meta.internal.parsers.ScalametaParser.templateBody(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser.templateBodyOpt(ScalametaParser.scala:3358)
    at scala.meta.internal.parsers.ScalametaParser.templateOpt(ScalametaParser.scala:3342)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$objectDef$1.apply(ScalametaParser.scala:3099)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$objectDef$1.apply(ScalametaParser.scala:3097)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.objectDef(ScalametaParser.scala:3097)
    at scala.meta.internal.parsers.ScalametaParser.tmplDef(ScalametaParser.scala:3047)
    at scala.meta.internal.parsers.ScalametaParser.topLevelTmplDef(ScalametaParser.scala:3027)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$topStat$1.applyOrElse(ScalametaParser.scala:3416)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$topStat$1.applyOrElse(ScalametaParser.scala:3406)
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
    at scala.meta.internal.parsers.ScalametaParser.statSeq(ScalametaParser.scala:3388)
    at scala.meta.internal.parsers.ScalametaParser.topStatSeq(ScalametaParser.scala:3405)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1.scala$meta$internal$parsers$ScalametaParser$$anonfun$$bracelessPackageStats$1(ScalametaParser.scala:3633)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1$$anonfun$apply$87.apply(ScalametaParser.scala:3639)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1$$anonfun$apply$87.apply(ScalametaParser.scala:3639)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1.apply(ScalametaParser.scala:3639)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1.apply(ScalametaParser.scala:3611)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser.batchSource(ScalametaParser.scala:3611)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$source$1.apply(ScalametaParser.scala:3596)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$source$1.apply(ScalametaParser.scala:3595)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser.source(ScalametaParser.scala:3594)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$parseSource$1.apply(ScalametaParser.scala:157)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$parseSource$1.apply(ScalametaParser.scala:157)
    at scala.meta.internal.parsers.ScalametaParser.parseRule(ScalametaParser.scala:46)
    at scala.meta.internal.parsers.ScalametaParser.parseSource(ScalametaParser.scala:157)
    at scala.meta.parsers.Parse$$anonfun$parseSource$1.apply(Parse.scala:31)
    at scala.meta.parsers.Parse$$anonfun$parseSource$1.apply(Parse.scala:31)
    at scala.meta.internal.parsers.ScalametaParser$$anon$201.apply(ScalametaParser.scala:3651)
    at scala.meta.parsers.Api$XtensionParseDialectInput.parse(Api.scala:21)
    at scala.meta.parsers.Api$XtensionParseInputLike.parse(Api.scala:10)
    at org.scalafmt.rewrite.Rewrite$.apply(Rewrite.scala:47)
    at org.scalafmt.Scalafmt$.format(Scalafmt.scala:49)
    at org.scalafmt.cli.Scalafmt210.format(Scalafmt210.scala:46)
    at org.scalafmt.cli.Scalafmt210.format(Scalafmt210.scala:30)
    at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.scalafmt.sbt.HasScalaFmt.org$scalafmt$sbt$HasScalaFmt$$handleFile(HasScalaFmt.scala:85)
    at org.scalafmt.sbt.HasScalaFmt$$anonfun$writeFormattedContentsToFiles$1$$anonfun$apply$3.apply(HasScalaFmt.scala:54)
    at org.scalafmt.sbt.HasScalaFmt$$anonfun$writeFormattedContentsToFiles$1$$anonfun$apply$3.apply(HasScalaFmt.scala:54)
    at scala.collection.Iterator$class.foreach(Iterator.scala:727)
    at scala.collection.parallel.immutable.ParHashSet$ParHashSetIterator.foreach(ParHashSet.scala:76)
    at scala.collection.parallel.ParIterableLike$Foreach.leaf(ParIterableLike.scala:975)
    at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply$mcV$sp(Tasks.scala:54)
    at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply(Tasks.scala:53)
    at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply(Tasks.scala:53)
    at scala.collection.parallel.Task$class.tryLeaf(Tasks.scala:56)
    at scala.collection.parallel.ParIterableLike$Foreach.tryLeaf(ParIterableLike.scala:972)
    at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask$class.internal(Tasks.scala:183)
    at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.internal(Tasks.scala:514)
    at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask$class.compute(Tasks.scala:162)
    at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.compute(Tasks.scala:514)
    at scala.concurrent.forkjoin.RecursiveAction.exec(RecursiveAction.java:160)
    at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
    at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
    at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
    at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
@olafurpg

This comment has been minimized.

Show comment
Hide comment
@olafurpg

olafurpg Oct 6, 2016

Member

Can you reproduce the error with the CLI? There now a bash script that can auto-upgrade: https://olafurpg.github.io/scalafmt/#Linux/OSX

Member

olafurpg commented Oct 6, 2016

Can you reproduce the error with the CLI? There now a bash script that can auto-upgrade: https://olafurpg.github.io/scalafmt/#Linux/OSX

@TimothyKlim

This comment has been minimized.

Show comment
Hide comment
@TimothyKlim

TimothyKlim Oct 6, 2016

@olafurpg , yep,

scalafmt -version
scalafmt 0.4.3

Exception in thread "main" java.lang.NoClassDefFoundError: scala/reflect/api/Symbols$SymbolApi
    at scala.meta.internal.tokens.package$.XtensionTokenName(package.scala:7)
    at scala.meta.internal.parsers.ScalametaParser.syntaxErrorExpected(ScalametaParser.scala:416)
    at scala.meta.internal.parsers.ScalametaParser.name(ScalametaParser.scala:1188)
    at scala.meta.internal.parsers.ScalametaParser.termName(ScalametaParser.scala:1190)
    at scala.meta.internal.parsers.ScalametaParser.path(ScalametaParser.scala:1226)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$simpleType$1.apply(ScalametaParser.scala:973)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$simpleType$1.apply(ScalametaParser.scala:969)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.simpleType(ScalametaParser.scala:969)
    at scala.meta.internal.parsers.ScalametaParser$outPattern$.simpleType(ScalametaParser.scala:2478)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.annotType(ScalametaParser.scala:957)
    at scala.meta.internal.parsers.ScalametaParser$outPattern$.annotType(ScalametaParser.scala:2478)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.compoundType(ScalametaParser.scala:1007)
    at scala.meta.internal.parsers.ScalametaParser$outPattern$.compoundType(ScalametaParser.scala:2478)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.infixType(ScalametaParser.scala:1063)
    at scala.meta.internal.parsers.ScalametaParser$outPattern$.infixType(ScalametaParser.scala:2478)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$typ$1.apply(ScalametaParser.scala:938)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$typ$1.apply(ScalametaParser.scala:935)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.typ(ScalametaParser.scala:935)
    at scala.meta.internal.parsers.ScalametaParser$outPattern$.typ(ScalametaParser.scala:2478)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$typ$1.apply(ScalametaParser.scala:941)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$typ$1.apply(ScalametaParser.scala:935)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.typ(ScalametaParser.scala:935)
    at scala.meta.internal.parsers.ScalametaParser$outPattern$.typ(ScalametaParser.scala:2478)
    at scala.meta.internal.parsers.ScalametaParser.typ(ScalametaParser.scala:2498)
    at scala.meta.internal.parsers.ScalametaParser.typeOrInfixType(ScalametaParser.scala:1458)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$expr$1.apply(ScalametaParser.scala:1622)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$expr$1.apply(ScalametaParser.scala:1522)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser.expr(ScalametaParser.scala:1522)
    at scala.meta.internal.parsers.ScalametaParser.expr(ScalametaParser.scala:1499)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$funDefRest$1.apply(ScalametaParser.scala:2997)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$funDefRest$1.apply(ScalametaParser.scala:2969)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.funDefRest(ScalametaParser.scala:2969)
    at scala.meta.internal.parsers.ScalametaParser.funDefOrDclOrSecondaryCtor(ScalametaParser.scala:2965)
    at scala.meta.internal.parsers.ScalametaParser.defOrDclOrSecondaryCtor(ScalametaParser.scala:2909)
    at scala.meta.internal.parsers.ScalametaParser.nonLocalDefOrDcl(ScalametaParser.scala:2883)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateStat$1.applyOrElse(ScalametaParser.scala:3474)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateStat$1.applyOrElse(ScalametaParser.scala:3470)
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
    at scala.meta.internal.parsers.ScalametaParser.statSeq(ScalametaParser.scala:3388)
    at scala.meta.internal.parsers.ScalametaParser.templateStats(ScalametaParser.scala:3469)
    at scala.meta.internal.parsers.ScalametaParser.templateStatSeq(ScalametaParser.scala:3456)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateBody$1.apply(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateBody$1.apply(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser.inBraces(ScalametaParser.scala:338)
    at scala.meta.internal.parsers.ScalametaParser.templateBody(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser.templateBodyOpt(ScalametaParser.scala:3358)
    at scala.meta.internal.parsers.ScalametaParser.templateOpt(ScalametaParser.scala:3342)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$objectDef$1.apply(ScalametaParser.scala:3099)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$objectDef$1.apply(ScalametaParser.scala:3097)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.objectDef(ScalametaParser.scala:3097)
    at scala.meta.internal.parsers.ScalametaParser.tmplDef(ScalametaParser.scala:3047)
    at scala.meta.internal.parsers.ScalametaParser.topLevelTmplDef(ScalametaParser.scala:3027)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$topStat$1.applyOrElse(ScalametaParser.scala:3416)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$topStat$1.applyOrElse(ScalametaParser.scala:3406)
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
    at scala.meta.internal.parsers.ScalametaParser.statSeq(ScalametaParser.scala:3388)
    at scala.meta.internal.parsers.ScalametaParser.topStatSeq(ScalametaParser.scala:3405)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1.scala$meta$internal$parsers$ScalametaParser$$anonfun$$bracelessPackageStats$1(ScalametaParser.scala:3633)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1$$anonfun$apply$87.apply(ScalametaParser.scala:3639)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1$$anonfun$apply$87.apply(ScalametaParser.scala:3639)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1.apply(ScalametaParser.scala:3639)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1.apply(ScalametaParser.scala:3611)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser.batchSource(ScalametaParser.scala:3611)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$source$1.apply(ScalametaParser.scala:3596)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$source$1.apply(ScalametaParser.scala:3595)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser.source(ScalametaParser.scala:3594)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$parseSource$1.apply(ScalametaParser.scala:157)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$parseSource$1.apply(ScalametaParser.scala:157)
    at scala.meta.internal.parsers.ScalametaParser.parseRule(ScalametaParser.scala:46)
    at scala.meta.internal.parsers.ScalametaParser.parseSource(ScalametaParser.scala:157)
    at scala.meta.parsers.Parse$$anonfun$parseSource$1.apply(Parse.scala:31)
    at scala.meta.parsers.Parse$$anonfun$parseSource$1.apply(Parse.scala:31)
    at scala.meta.internal.parsers.ScalametaParser$$anon$201.apply(ScalametaParser.scala:3651)
    at scala.meta.parsers.Api$XtensionParseDialectInput.parse(Api.scala:21)
    at scala.meta.parsers.Api$XtensionParseInputLike.parse(Api.scala:10)
    at org.scalafmt.Scalafmt$.format(Scalafmt.scala:51)
    at org.scalafmt.cli.Cli$$anonfun$run$1.apply(Cli.scala:218)
    at org.scalafmt.cli.Cli$$anonfun$run$1.apply(Cli.scala:209)
    at scala.collection.parallel.mutable.ParArray$ParArrayIterator.foreach_quick(ParArray.scala:143)
    at scala.collection.parallel.mutable.ParArray$ParArrayIterator.foreach(ParArray.scala:136)
    at scala.collection.parallel.ParIterableLike$Foreach.leaf(ParIterableLike.scala:972)
    at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply$mcV$sp(Tasks.scala:49)
    at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply(Tasks.scala:48)
    at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply(Tasks.scala:48)
    at scala.collection.parallel.Task$class.tryLeaf(Tasks.scala:51)
    at scala.collection.parallel.ParIterableLike$Foreach.tryLeaf(ParIterableLike.scala:969)
    at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask$class.internal(Tasks.scala:159)
    at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.internal(Tasks.scala:443)
    at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask$class.compute(Tasks.scala:149)
    at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.compute(Tasks.scala:443)
    at scala.concurrent.forkjoin.RecursiveAction.exec(RecursiveAction.java:160)
    at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
    at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
    at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
    at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.ClassNotFoundException: scala.reflect.api.Symbols$SymbolApi
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 110 more

TimothyKlim commented Oct 6, 2016

@olafurpg , yep,

scalafmt -version
scalafmt 0.4.3

Exception in thread "main" java.lang.NoClassDefFoundError: scala/reflect/api/Symbols$SymbolApi
    at scala.meta.internal.tokens.package$.XtensionTokenName(package.scala:7)
    at scala.meta.internal.parsers.ScalametaParser.syntaxErrorExpected(ScalametaParser.scala:416)
    at scala.meta.internal.parsers.ScalametaParser.name(ScalametaParser.scala:1188)
    at scala.meta.internal.parsers.ScalametaParser.termName(ScalametaParser.scala:1190)
    at scala.meta.internal.parsers.ScalametaParser.path(ScalametaParser.scala:1226)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$simpleType$1.apply(ScalametaParser.scala:973)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$simpleType$1.apply(ScalametaParser.scala:969)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.simpleType(ScalametaParser.scala:969)
    at scala.meta.internal.parsers.ScalametaParser$outPattern$.simpleType(ScalametaParser.scala:2478)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.annotType(ScalametaParser.scala:957)
    at scala.meta.internal.parsers.ScalametaParser$outPattern$.annotType(ScalametaParser.scala:2478)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.compoundType(ScalametaParser.scala:1007)
    at scala.meta.internal.parsers.ScalametaParser$outPattern$.compoundType(ScalametaParser.scala:2478)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.infixType(ScalametaParser.scala:1063)
    at scala.meta.internal.parsers.ScalametaParser$outPattern$.infixType(ScalametaParser.scala:2478)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$typ$1.apply(ScalametaParser.scala:938)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$typ$1.apply(ScalametaParser.scala:935)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.typ(ScalametaParser.scala:935)
    at scala.meta.internal.parsers.ScalametaParser$outPattern$.typ(ScalametaParser.scala:2478)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$typ$1.apply(ScalametaParser.scala:941)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$typ$1.apply(ScalametaParser.scala:935)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.typ(ScalametaParser.scala:935)
    at scala.meta.internal.parsers.ScalametaParser$outPattern$.typ(ScalametaParser.scala:2478)
    at scala.meta.internal.parsers.ScalametaParser.typ(ScalametaParser.scala:2498)
    at scala.meta.internal.parsers.ScalametaParser.typeOrInfixType(ScalametaParser.scala:1458)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$expr$1.apply(ScalametaParser.scala:1622)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$expr$1.apply(ScalametaParser.scala:1522)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser.expr(ScalametaParser.scala:1522)
    at scala.meta.internal.parsers.ScalametaParser.expr(ScalametaParser.scala:1499)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$funDefRest$1.apply(ScalametaParser.scala:2997)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$funDefRest$1.apply(ScalametaParser.scala:2969)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.funDefRest(ScalametaParser.scala:2969)
    at scala.meta.internal.parsers.ScalametaParser.funDefOrDclOrSecondaryCtor(ScalametaParser.scala:2965)
    at scala.meta.internal.parsers.ScalametaParser.defOrDclOrSecondaryCtor(ScalametaParser.scala:2909)
    at scala.meta.internal.parsers.ScalametaParser.nonLocalDefOrDcl(ScalametaParser.scala:2883)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateStat$1.applyOrElse(ScalametaParser.scala:3474)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateStat$1.applyOrElse(ScalametaParser.scala:3470)
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
    at scala.meta.internal.parsers.ScalametaParser.statSeq(ScalametaParser.scala:3388)
    at scala.meta.internal.parsers.ScalametaParser.templateStats(ScalametaParser.scala:3469)
    at scala.meta.internal.parsers.ScalametaParser.templateStatSeq(ScalametaParser.scala:3456)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateBody$1.apply(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateBody$1.apply(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser.inBraces(ScalametaParser.scala:338)
    at scala.meta.internal.parsers.ScalametaParser.templateBody(ScalametaParser.scala:3353)
    at scala.meta.internal.parsers.ScalametaParser.templateBodyOpt(ScalametaParser.scala:3358)
    at scala.meta.internal.parsers.ScalametaParser.templateOpt(ScalametaParser.scala:3342)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$objectDef$1.apply(ScalametaParser.scala:3099)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$objectDef$1.apply(ScalametaParser.scala:3097)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.objectDef(ScalametaParser.scala:3097)
    at scala.meta.internal.parsers.ScalametaParser.tmplDef(ScalametaParser.scala:3047)
    at scala.meta.internal.parsers.ScalametaParser.topLevelTmplDef(ScalametaParser.scala:3027)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$topStat$1.applyOrElse(ScalametaParser.scala:3416)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$topStat$1.applyOrElse(ScalametaParser.scala:3406)
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
    at scala.meta.internal.parsers.ScalametaParser.statSeq(ScalametaParser.scala:3388)
    at scala.meta.internal.parsers.ScalametaParser.topStatSeq(ScalametaParser.scala:3405)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1.scala$meta$internal$parsers$ScalametaParser$$anonfun$$bracelessPackageStats$1(ScalametaParser.scala:3633)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1$$anonfun$apply$87.apply(ScalametaParser.scala:3639)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1$$anonfun$apply$87.apply(ScalametaParser.scala:3639)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1.apply(ScalametaParser.scala:3639)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1.apply(ScalametaParser.scala:3611)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser.batchSource(ScalametaParser.scala:3611)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$source$1.apply(ScalametaParser.scala:3596)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$source$1.apply(ScalametaParser.scala:3595)
    at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
    at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
    at scala.meta.internal.parsers.ScalametaParser.source(ScalametaParser.scala:3594)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$parseSource$1.apply(ScalametaParser.scala:157)
    at scala.meta.internal.parsers.ScalametaParser$$anonfun$parseSource$1.apply(ScalametaParser.scala:157)
    at scala.meta.internal.parsers.ScalametaParser.parseRule(ScalametaParser.scala:46)
    at scala.meta.internal.parsers.ScalametaParser.parseSource(ScalametaParser.scala:157)
    at scala.meta.parsers.Parse$$anonfun$parseSource$1.apply(Parse.scala:31)
    at scala.meta.parsers.Parse$$anonfun$parseSource$1.apply(Parse.scala:31)
    at scala.meta.internal.parsers.ScalametaParser$$anon$201.apply(ScalametaParser.scala:3651)
    at scala.meta.parsers.Api$XtensionParseDialectInput.parse(Api.scala:21)
    at scala.meta.parsers.Api$XtensionParseInputLike.parse(Api.scala:10)
    at org.scalafmt.Scalafmt$.format(Scalafmt.scala:51)
    at org.scalafmt.cli.Cli$$anonfun$run$1.apply(Cli.scala:218)
    at org.scalafmt.cli.Cli$$anonfun$run$1.apply(Cli.scala:209)
    at scala.collection.parallel.mutable.ParArray$ParArrayIterator.foreach_quick(ParArray.scala:143)
    at scala.collection.parallel.mutable.ParArray$ParArrayIterator.foreach(ParArray.scala:136)
    at scala.collection.parallel.ParIterableLike$Foreach.leaf(ParIterableLike.scala:972)
    at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply$mcV$sp(Tasks.scala:49)
    at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply(Tasks.scala:48)
    at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply(Tasks.scala:48)
    at scala.collection.parallel.Task$class.tryLeaf(Tasks.scala:51)
    at scala.collection.parallel.ParIterableLike$Foreach.tryLeaf(ParIterableLike.scala:969)
    at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask$class.internal(Tasks.scala:159)
    at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.internal(Tasks.scala:443)
    at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask$class.compute(Tasks.scala:149)
    at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.compute(Tasks.scala:443)
    at scala.concurrent.forkjoin.RecursiveAction.exec(RecursiveAction.java:160)
    at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
    at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
    at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
    at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.ClassNotFoundException: scala.reflect.api.Symbols$SymbolApi
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 110 more
@olafurpg

This comment has been minimized.

Show comment
Hide comment
@olafurpg

olafurpg Oct 6, 2016

Member

This must caused be the lack of scala-reflect after removing the old style macros in #491 Seems like 0.4.3 will be shortlived, thanks for reporting!

Member

olafurpg commented Oct 6, 2016

This must caused be the lack of scala-reflect after removing the old style macros in #491 Seems like 0.4.3 will be shortlived, thanks for reporting!

@olafurpg

This comment has been minimized.

Show comment
Hide comment
@olafurpg

olafurpg Oct 6, 2016

Member

@TimothyKlim Could you give me a minimal code example to reproduce? I want to add it to the test suite, I am surprised this didn't pop up up formatting >1 million LOC.

Member

olafurpg commented Oct 6, 2016

@TimothyKlim Could you give me a minimal code example to reproduce? I want to add it to the test suite, I am surprised this didn't pop up up formatting >1 million LOC.

@TimothyKlim

This comment has been minimized.

Show comment
Hide comment
@TimothyKlim

TimothyKlim Oct 6, 2016

@olafurpg Aha, I missed ) in the example:

object A {
  <.section(render(props)
}

TimothyKlim commented Oct 6, 2016

@olafurpg Aha, I missed ) in the example:

object A {
  <.section(render(props)
}
@olafurpg

This comment has been minimized.

Show comment
Hide comment
@olafurpg

olafurpg Oct 6, 2016

Member

Interesting! It only appears on parse errors, that might explain why it wasn't caught in the tests. Maybe we can entirely drop scala-reflect then, it makes the fat jar 4mb smaller :))

Member

olafurpg commented Oct 6, 2016

Interesting! It only appears on parse errors, that might explain why it wasn't caught in the tests. Maybe we can entirely drop scala-reflect then, it makes the fat jar 4mb smaller :))

olafurpg added a commit that referenced this issue Oct 6, 2016

Add scala-reflect back, fixes #492.
Once scalameta/scalameta#502 is fixed, we can
remove scala-reflect.

Crazy enough, I wasn't able to reproduce the error via SBT so now I have
a bash script to ensure the same doesn't happen again.

olafurpg added a commit that referenced this issue Oct 6, 2016

Add scala-reflect back, fixes #492.
Once scalameta/scalameta#502 is fixed, we can
remove scala-reflect.

Crazy enough, I wasn't able to reproduce the error via SBT so now I have
a bash script to ensure the same doesn't happen again.

olafurpg added a commit that referenced this issue Oct 6, 2016

Add scala-reflect back, fixes #492.
Once scalameta/scalameta#502 is fixed, we can
remove scala-reflect.

Crazy enough, I wasn't able to reproduce the error via SBT so now I have
a bash script to ensure the same doesn't happen again.
@olafurpg

This comment has been minimized.

Show comment
Hide comment
@olafurpg

olafurpg Oct 6, 2016

Member

Alright, this should be fixed in the next release which I hope to get out tomorrow. I'm surprised I wasn't able to reproduce the error via SBT, not even if I ran a main function in the core library. Plain old bash integration test it is then :)

Member

olafurpg commented Oct 6, 2016

Alright, this should be fixed in the next release which I hope to get out tomorrow. I'm surprised I wasn't able to reproduce the error via SBT, not even if I ran a main function in the core library. Plain old bash integration test it is then :)

@TimothyKlim

This comment has been minimized.

Show comment
Hide comment
@TimothyKlim

TimothyKlim Oct 6, 2016

@olafurpg, Thank you! Will try tomorrow 😄

TimothyKlim commented Oct 6, 2016

@olafurpg, Thank you! Will try tomorrow 😄

olafurpg added a commit that referenced this issue Oct 7, 2016

Add scala-reflect back, fixes #492.
Once scalameta/scalameta#502 is fixed, we can
remove scala-reflect.

Crazy enough, I wasn't able to reproduce the error via SBT so now I have
a bash script to ensure the same doesn't happen again.

@olafurpg olafurpg closed this in 65757b3 Oct 7, 2016

olafurpg added a commit that referenced this issue Oct 7, 2016

Merge pull request #495 from olafurpg/492
Add scala-reflect back, fixes #492.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment