Skip to content

Conversation

@gatorsmile
Copy link
Member

What changes were proposed in this pull request?

After #16311 is merged, I am unable to build it in my IntelliJ. Got the following error:

Error:scalac: error while loading Object, Missing dependency 'object scala in compiler mirror', required by /Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/rt.jar(java/lang/Object.class)
Error:scalac: Error: object scala in compiler mirror not found.
scala.reflect.internal.MissingRequirementError: object scala in compiler mirror not found.
	at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:17)
	at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:18)
	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:53)
	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:66)
	at scala.reflect.internal.Mirrors$RootsBase.getPackage(Mirrors.scala:173)
	at scala.reflect.internal.Definitions$DefinitionsClass.ScalaPackage$lzycompute(Definitions.scala:161)
	at scala.reflect.internal.Definitions$DefinitionsClass.ScalaPackage(Definitions.scala:161)
	at scala.reflect.internal.Definitions$DefinitionsClass.ScalaPackageClass$lzycompute(Definitions.scala:162)
	at scala.reflect.internal.Definitions$DefinitionsClass.ScalaPackageClass(Definitions.scala:162)
	at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1395)
	at scala.tools.nsc.Global$Run.<init>(Global.scala:1215)
	at xsbt.CachedCompiler0$$anon$2.<init>(CompilerInterface.scala:105)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:105)
	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.GeneratedMethodAccessor8.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)

How was this patch tested?

Manually

@srowen
Copy link
Member

srowen commented Dec 24, 2016

Do a full clean build, including clearing caches, and restarting zinc. This change shouldn't result in that error.

@gatorsmile
Copy link
Member Author

In the command line, everything works well. However, in IntelliJ, it does not work well.

@srowen Thanks for a quick reply. Just wondering if you also hit this issue when you building Spark in IntelliJ?

<artifactId>scalatest_${scala.binary.version}</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
Copy link
Member Author

@gatorsmile gatorsmile Dec 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far, I used both mvn and sbt to do a full rebuild in the command line. I also clicked Invalidate Caches/Restart in IntelliJ. I tried to shut down zinc. Still got the same error.

To bypass/resolve the compilation failure, I have to add the above dependency back in my local environement. After this, everything works well in IntelliJ.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hit the same issue after fetching the latest master. I did clean and rebuild. It still has the issue.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You just need to add it back the changes in this pom.xml. Then, it should work.

@SparkQA
Copy link

SparkQA commented Dec 24, 2016

Test build #70559 has finished for PR 16393 at commit 685f28b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member

srowen commented Dec 24, 2016

I can reproduce this now on a clean build. I don't think the whole change needs to be reverted; I think it's narrower than that. test-tags no longer has any dependency on Scala libs but does reference a few Scala classes. I think that could be the issue. I'm investigating now

@srowen
Copy link
Member

srowen commented Dec 27, 2016

Have a look at #16418 instead? @gatorsmile et al

@gatorsmile gatorsmile closed this Dec 28, 2016
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

Successfully merging this pull request may close these issues.

4 participants