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

regression in error quality with missing symbols #5148

Closed
scabug opened this issue Nov 4, 2011 · 3 comments
Closed

regression in error quality with missing symbols #5148

scabug opened this issue Nov 4, 2011 · 3 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Nov 4, 2011

Trying to compile this file fails kind of sensibly in 2.9.1:

package scala.tools.nsc
package interpreter

class IMain extends Imports
error: class file needed by Imports is missing.
reference value global of scala.tools.nsc.interpreter.IMain refers to nonexisting symbol.
one error found

In current trunk it explodes instead:

scalac3 -d /tmp ./IMain.scala 
unhandled exception while transforming IMain.scala
error: scala.reflect.internal.MissingRequirementError
[...]
	at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:16)
	at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:17)
	at scala.reflect.internal.pickling.UnPickler$Scan$$anonfun$errorMissingRequirement$1.apply(UnPickler.scala:822)
	at scala.reflect.internal.pickling.UnPickler$Scan$$anonfun$errorMissingRequirement$1.apply(UnPickler.scala:822)
	at scala.reflect.internal.Symbols$Symbol.orElse(Symbols.scala:1773)

This hits me every day, plus or minus.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Nov 4, 2011

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Jun 26, 2012

@hubertp said:
Currently it fails with

error: 
     while compiling: t5148.scala
        during phase: specialize
     library version: version 2.10.0-20120626-010055-5a7bbfe035
    compiler version: version 2.10.0-20120626-010055-5a7bbfe035
  reconstructed args: -d /tmp

  last tree to typer: Literal(Constant(()))
              symbol: null
   symbol definition: null
                 tpe: Unit
       symbol owners: 
      context owners: package interpreter

== Enclosing template or block ==

PackageDef(
  "interpreter" // final package interpreter in package nsc, tree.tpe=scala.tools.nsc.interpreter.type
  ClassDef( // class IMain extends Imports in package interpreter
    0
    "IMain"
    []
    Template( // val <local IMain>: <notype> in class IMain, tree.tpe=scala.tools.nsc.interpreter.IMain
      "java.lang.Object", "scala.tools.nsc.interpreter.Imports" // parents
      ValDef(
        private
        "_"
        <tpt>
        <empty>
      )
      DefDef( // def <init>(): scala.tools.nsc.interpreter.IMain in class IMain
        <method>
        "<init>"
        []
        List(Nil)
        <tpt> // tree.tpe=scala.tools.nsc.interpreter.IMain
        Block( // tree.tpe=Unit
          Apply( // def <init>(): Object in class Object, tree.tpe=Object
            IMain.super."<init>" // def <init>(): Object in class Object, tree.tpe=()Object
            Nil
          )
          ()
        )
      )
    )
  )
)

== Expanded type of tree ==

TypeRef(TypeSymbol(final abstract class Unit extends AnyVal))

uncaught exception during compilation: scala.reflect.internal.Types$TypeError
error: scala.reflect.internal.Types$TypeError: bad reference while unpickling /home/hubert/tmp/repos/scala-dev/build/pack/lib/scala-compiler.jar(scala/tools/nsc/interpreter/Imports.class): term memberHandlers not found in scala.tools.nsc.interpreter.IMain
	at scala.reflect.internal.pickling.UnPickler$Scan.toTypeError(UnPickler.scala:836)
	at scala.reflect.internal.pickling.UnPickler$Scan$LazyTypeRef.complete(UnPickler.scala:849)
	at scala.reflect.internal.pickling.UnPickler$Scan$LazyTypeRef.load(UnPickler.scala:851)
	at scala.reflect.internal.Symbols$Symbol$$anonfun$typeParams$1.apply$mcV$sp(Symbols.scala:1420)
	at scala.reflect.internal.Symbols$Symbol$$anonfun$typeParams$1.apply(Symbols.scala:1420)
	at scala.reflect.internal.Symbols$Symbol$$anonfun$typeParams$1.apply(Symbols.scala:1420)
	at scala.reflect.internal.SymbolTable.atPhase(SymbolTable.scala:195)
	at scala.reflect.internal.Symbols$Symbol.typeParams(Symbols.scala:1420)
	at scala.tools.nsc.transform.SpecializeTypes$$anonfun$scala$tools$nsc$transform$SpecializeTypes$$normalizeMember$1.apply$mcZ$sp(SpecializeTypes.scala:795)
	at scala.tools.nsc.transform.SpecializeTypes$$anonfun$scala$tools$nsc$transform$SpecializeTypes$$normalizeMember$1.apply(SpecializeTypes.scala:795)
	at scala.tools.nsc.transform.SpecializeTypes$$anonfun$scala$tools$nsc$transform$SpecializeTypes$$normalizeMember$1.apply(SpecializeTypes.scala:795)
	at scala.reflect.internal.SymbolTable.atPhase(SymbolTable.scala:195)
	at scala.reflect.internal.SymbolTable.beforePhase(SymbolTable.scala:203)
	at scala.tools.nsc.Global.beforeTyper(Global.scala:1118)
	at scala.tools.nsc.transform.SpecializeTypes.scala$tools$nsc$transform$SpecializeTypes$$normalizeMember(SpecializeTypes.scala:795)
	at scala.tools.nsc.transform.SpecializeTypes$$anonfun$29.apply(SpecializeTypes.scala:748)
	at scala.tools.nsc.transform.SpecializeTypes$$anonfun$29.apply(SpecializeTypes.scala:746)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:245)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:245)
	at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
	at scala.collection.immutable.List.foreach(List.scala:77)
	at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:245)
	at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
	at scala.tools.nsc.transform.SpecializeTypes.specializeClass(SpecializeTypes.scala:746)
	at scala.tools.nsc.transform.SpecializeTypes.transformInfo(SpecializeTypes.scala:1151)
	at scala.tools.nsc.transform.InfoTransform$Phase$$anon$1.transform(InfoTransform.scala:38)
	at scala.reflect.internal.Symbols$Symbol.rawInfo(Symbols.scala:1295)
	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1223)
	at scala.tools.nsc.transform.SpecializeTypes$$anonfun$transformInfo$1$$anonfun$apply$37.apply(SpecializeTypes.scala:1143)
	at scala.tools.nsc.transform.SpecializeTypes$$anonfun$transformInfo$1$$anonfun$apply$37.apply(SpecializeTypes.scala:1143)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:239)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:239)
	at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
	at scala.collection.immutable.List.foreach(List.scala:77)
	at scala.collection.TraversableLike$class.map(TraversableLike.scala:239)
	at scala.collection.AbstractTraversable.map(Traversable.scala:105)
	at scala.tools.nsc.transform.SpecializeTypes$$anonfun$transformInfo$1.apply(SpecializeTypes.scala:1143)
	at scala.tools.nsc.transform.SpecializeTypes$$anonfun$transformInfo$1.apply(SpecializeTypes.scala:1143)
	at scala.reflect.internal.SymbolTable.atPhase(SymbolTable.scala:195)
	at scala.reflect.internal.SymbolTable.afterPhase(SymbolTable.scala:204)
	at scala.tools.nsc.Global.afterSpecialize(Global.scala:1107)
	at scala.tools.nsc.transform.SpecializeTypes.transformInfo(SpecializeTypes.scala:1143)
	at scala.tools.nsc.transform.InfoTransform$Phase$$anon$1.transform(InfoTransform.scala:38)
	at scala.reflect.internal.Symbols$Symbol.rawInfo(Symbols.scala:1295)
	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1223)
	at scala.tools.nsc.transform.SpecializeTypes$$anon$2$$anonfun$implSpecClasses$1.apply(SpecializeTypes.scala:1755)
	at scala.tools.nsc.transform.SpecializeTypes$$anon$2$$anonfun$implSpecClasses$1.apply(SpecializeTypes.scala:1752)
	at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
	at scala.collection.immutable.List.foreach(List.scala:77)
	at scala.tools.nsc.transform.SpecializeTypes$$anon$2.implSpecClasses(SpecializeTypes.scala:1752)
	at scala.tools.nsc.transform.SpecializeTypes$$anon$2$$anonfun$transform$17.apply(SpecializeTypes.scala:1486)
	at scala.tools.nsc.transform.SpecializeTypes$$anon$2$$anonfun$transform$17.apply(SpecializeTypes.scala:1485)
	at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:674)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.SpecializeTypes$$anon$2.transform(SpecializeTypes.scala:1485)
	at scala.tools.nsc.transform.SpecializeTypes$$anon$2.transform(SpecializeTypes.scala:1311)
	at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$2.apply(Trees.scala:667)
	at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$2.apply(Trees.scala:665)
	at scala.collection.immutable.List.loop$1(List.scala:163)
	at scala.collection.immutable.List.mapConserve(List.scala:179)
	at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:665)
	at scala.tools.nsc.transform.SpecializeTypes$$anon$2$$anonfun$transform$17.apply(SpecializeTypes.scala:1487)
	at scala.tools.nsc.transform.SpecializeTypes$$anon$2$$anonfun$transform$17.apply(SpecializeTypes.scala:1485)
	at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:674)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.SpecializeTypes$$anon$2.transform(SpecializeTypes.scala:1485)
	at scala.tools.nsc.transform.SpecializeTypes$SpecializationTransformer$$anonfun$48.apply(SpecializeTypes.scala:1845)
	at scala.tools.nsc.transform.SpecializeTypes$SpecializationTransformer$$anonfun$48.apply(SpecializeTypes.scala:1845)
	at scala.reflect.internal.SymbolTable.atPhase(SymbolTable.scala:195)
	at scala.reflect.internal.SymbolTable.afterPhase(SymbolTable.scala:204)
	at scala.tools.nsc.Global.afterSpecialize(Global.scala:1107)
	at scala.tools.nsc.transform.SpecializeTypes$SpecializationTransformer.transform(SpecializeTypes.scala:1845)
	at scala.tools.nsc.transform.SpecializeTypes$SpecializationTransformer.transform(SpecializeTypes.scala:1841)
	at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:229)
	at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Jun 27, 2012

@hubertp said (edited by @lrytz on Sep 30, 2016 8:48:18 AM UTC):
Closed by scala/scala#779

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.