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

Acyclic throws exception when compiling with IDEA incremental compiler #11

Open
s-nel opened this issue Mar 15, 2016 · 3 comments
Open

Comments

@s-nel
Copy link

s-nel commented Mar 15, 2016

Periodically after saving a single file and attempting to run tests in IDEA, I get the following exception from Acyclic. Exception goes away if I do a complete rebuild. Exception is not thrown when compiling with SBT.

Error:scalac: Error: key not found: /foo/bar.scala
java.util.NoSuchElementException: key not found: /foo/bar.scala
    at scala.collection.MapLike$class.default(MapLike.scala:228)
    at scala.collection.AbstractMap.default(Map.scala:59)
    at scala.collection.MapLike$class.apply(MapLike.scala:141)
    at scala.collection.AbstractMap.apply(Map.scala:59)
    at acyclic.plugin.PluginPhase$$anon$1$$anonfun$6$$anonfun$apply$8.apply(PluginPhase.scala:84)
    at acyclic.plugin.PluginPhase$$anon$1$$anonfun$6$$anonfun$apply$8.apply(PluginPhase.scala:84)
    at scala.collection.TraversableLike$$anonfun$groupBy$1.apply(TraversableLike.scala:321)
    at scala.collection.TraversableLike$$anonfun$groupBy$1.apply(TraversableLike.scala:320)
    at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
    at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
    at scala.collection.TraversableLike$class.groupBy(TraversableLike.scala:320)
    at scala.collection.AbstractTraversable.groupBy(Traversable.scala:104)
    at acyclic.plugin.PluginPhase$$anon$1$$anonfun$6.apply(PluginPhase.scala:84)
    at acyclic.plugin.PluginPhase$$anon$1$$anonfun$6.apply(PluginPhase.scala:71)
    at scala.collection.immutable.Stream$$anonfun$map$1.apply(Stream.scala:418)
    at scala.collection.immutable.Stream$$anonfun$map$1.apply(Stream.scala:418)
    at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1233)
    at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1223)
    at scala.collection.immutable.Stream$$anonfun$map$1.apply(Stream.scala:418)
    at scala.collection.immutable.Stream$$anonfun$map$1.apply(Stream.scala:418)
    at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1233)
    at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1223)
    at scala.collection.immutable.Stream.foreach(Stream.scala:595)
    at scala.collection.TraversableOnce$class.toMap(TraversableOnce.scala:316)
    at scala.collection.AbstractTraversable.toMap(Traversable.scala:104)
    at acyclic.plugin.PluginPhase$$anon$1.run(PluginPhase.scala:89)
    at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1501)
    at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1486)
    at scala.tools.nsc.Global$Run.compileSources(Global.scala:1481)
    at scala.tools.nsc.Global$Run.compile(Global.scala:1582)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:115)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:94)
    at xsbt.CompilerInterface.run(CompilerInterface.scala:22)
    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 sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:101)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
    at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:29)
    at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26)
    at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:67)
    at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:24)
    at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
@seanmcl
Copy link

seanmcl commented Mar 23, 2016

I hit this as well. It makes acyclic unusable because it occurs on every compilation after the first one after an sbt clean.

@vuspenskiy
Copy link

+1

@ninadingole
Copy link

+1 Same happening with Intellij IDE 2018 EAP

Error:scalac: Error: key not found: Repository.scala
java.util.NoSuchElementException: key not found: Repository.scala
	at scala.collection.MapLike$class.default(MapLike.scala:228)
	at scala.collection.AbstractMap.default(Map.scala:59)
	at scala.collection.MapLike$class.apply(MapLike.scala:141)
	at scala.collection.AbstractMap.apply(Map.scala:59)
	at acyclic.plugin.PluginPhase$$anon$1$$anonfun$8$$anonfun$apply$10.apply(PluginPhase.scala:95)
	at acyclic.plugin.PluginPhase$$anon$1$$anonfun$8$$anonfun$apply$10.apply(PluginPhase.scala:95)
	at scala.collection.TraversableLike$$anonfun$groupBy$1.apply(TraversableLike.scala:321)
	at scala.collection.TraversableLike$$anonfun$groupBy$1.apply(TraversableLike.scala:320)
	at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)

Any workaround for the issue ?

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