Skip to content

Build manager failure with Java source #3045

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

Closed
scabug opened this issue Feb 10, 2010 · 4 comments
Closed

Build manager failure with Java source #3045

scabug opened this issue Feb 10, 2010 · 4 comments
Assignees
Labels

Comments

@scabug
Copy link

scabug commented Feb 10, 2010

With the following Java source,

public interface I {
  public class C implements I {}
}

the refined build manager fails with the following stacktrace,

java.lang.Error: no-symbol does not have owner
at scala.tools.nsc.symtab.Symbols$$NoSymbol$$.owner(Symbols.scala:1985)
at scala.tools.nsc.symtab.Symbols$$Symbol.cloneSymbol(Symbols.scala:1042)
at scala.tools.nsc.interactive.RefinedBuildManager$$$$anonfun$$updateDefinitions$$2$$$$anonfun$$apply$$21.apply(RefinedBuildManager.scala:331)
at scala.tools.nsc.interactive.RefinedBuildManager$$$$anonfun$$updateDefinitions$$2$$$$anonfun$$apply$$21.apply(RefinedBuildManager.scala:328)
at scala.collection.TraversableLike$$$$anonfun$$map$$1.apply(TraversableLike.scala:238)
at scala.collection.TraversableLike$$$$anonfun$$map$$1.apply(TraversableLike.scala:238)
at scala.collection.LinearSeqLike$$class.foreach(LinearSeqLike.scala:97)
at scala.collection.immutable.List.foreach(List.scala:46)
at scala.collection.TraversableLike$$class.map(TraversableLike.scala:238)
at scala.collection.immutable.List.map(List.scala:46)
at scala.tools.nsc.interactive.RefinedBuildManager$$$$anonfun$$updateDefinitions$$2.apply(RefinedBuildManager.scala:328)
at scala.tools.nsc.interactive.RefinedBuildManager$$$$anonfun$$updateDefinitions$$2.apply(RefinedBuildManager.scala:327)
at scala.collection.Iterator$$class.foreach(Iterator.scala:582)
at scala.collection.IndexedSeqLike$$Elements.foreach(IndexedSeqLike.scala:47)
at scala.collection.IterableLike$$class.foreach(IterableLike.scala:83)
at scala.collection.immutable.HashSet.foreach(HashSet.scala:36)
at scala.tools.nsc.interactive.RefinedBuildManager.updateDefinitions(RefinedBuildManager.scala:327)
at scala.tools.nsc.interactive.RefinedBuildManager.update0$$1(RefinedBuildManager.scala:180)
at scala.tools.nsc.interactive.RefinedBuildManager.update(RefinedBuildManager.scala:185)
at scala.tools.nsc.interactive.RefinedBuildManager.update(RefinedBuildManager.scala:93)
at scala.tools.eclipse.EclipseBuildManager.build(EclipseBuildManager.scala:120)
at scala.tools.eclipse.ScalaProject.build(ScalaProject.scala:407)
at scala.tools.eclipse.ScalaBuilder.build(ScalaBuilder.scala:87)
at org.eclipse.core.internal.events.BuildManager$$2.run(BuildManager.java:627)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
at org.eclipse.core.internal.events.BuildManager$$1.run(BuildManager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:218)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:360)
at org.eclipse.core.internal.resources.Project$$1.run(Project.java:522)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1782)
at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:502)
at org.eclipse.core.internal.resources.Project.build(Project.java:94)
at org.eclipse.ui.actions.BuildAction.invokeOperation(BuildAction.java:221)
at org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:162)
at org.eclipse.ui.actions.WorkspaceAction$$2.runInWorkspace(WorkspaceAction.java:483)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

in updateDefinitions. It seems that the dependency analyzer is reporting NoSymbol as the definition corresponding to C. Nb. if I is changed to a class with C extending it, then there is no error.

@scabug
Copy link
Author

scabug commented Feb 10, 2010

Imported From: https://issues.scala-lang.org/browse/SI-3045?orig=1
Reporter: @milessabin

@scabug
Copy link
Author

scabug commented Feb 10, 2010

@hubertp said:
Consequence of r20776, this example must have slipped my tests.

@scabug
Copy link
Author

scabug commented Feb 10, 2010

@hubertp said:
(In r20858) Fixes #3045. No review.

@scabug
Copy link
Author

scabug commented Feb 11, 2010

@hubertp said:
I am guessing that the problem should actually be solved in a different way ( by enabling namers, typers phases for .java files?) but this quick fix is I believe a good temporary solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants