Skip to content

Kill reflect io #2313

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

Merged
merged 12 commits into from
May 9, 2017
Merged

Conversation

felixmulder
Copy link
Contributor

I fixed the backend, inlined the sources. I still want to change one thing. I want to make the API private to Dotty - does that make sense?

I'd rather expose something else or only parts of it.

@felixmulder
Copy link
Contributor Author

felixmulder commented Apr 27, 2017

Admittedly, I did not run this locally before pushing - jumping on a plane. Will amend.

@felixmulder felixmulder force-pushed the topic/kill-reflect-io branch 2 times, most recently from 77ca8d4 to 7de9410 Compare May 1, 2017 20:33
@felixmulder
Copy link
Contributor Author

felixmulder commented May 1, 2017

Did still work, just gotta have a look at the failing tests now.

@felixmulder felixmulder force-pushed the topic/kill-reflect-io branch 2 times, most recently from 55d8db0 to a055aad Compare May 5, 2017 09:35
@felixmulder
Copy link
Contributor Author

@dotty-bot: could you recheck this PR, please?

@dottybot
Copy link
Member

dottybot commented May 5, 2017

Sure thing, I got your back! ❤️

@felixmulder
Copy link
Contributor Author

felixmulder commented May 8, 2017

@odersky - I seem to have encountered an ordering problem. The test that fails - does not fail on different orderings. I.e. the legacy tests contain the same test tasty_dotc - and the new test testPickling#compile(dotc). The first test takes everything sorted wheareas the new test randomizes the order with a known seed.

This is the error:

-- [E045] Syntax Error: /Users/fixel/Projects/dotty/compiler/../compiler/src/dotty/tools/dotc/classpath/ZipAndJarFileLookupFactory.scala:58:49
58 |    override protected def createFileEntry(file: FileZipArchive#Entry): ClassFileEntryImpl = ClassFileEntryImpl(file)
   |                                                 ^^^^^^^^^^^^^^
   |                                                 cyclic reference involving class FileZipArchive

And here's the stacktrace:


java.lang.Throwable
	at dotty.tools.dotc.reporting.ConsoleReporter.loop$1(ConsoleReporter.scala:54)
	at dotty.tools.dotc.reporting.ConsoleReporter.displayPrompt(ConsoleReporter.scala:62)
	at dotty.tools.dotc.reporting.ConsoleReporter.doReport(ConsoleReporter.scala:28)
	at dotty.tools.dotc.reporting.Reporter.report(Reporter.scala:233)
	at dotty.tools.dotc.reporting.Reporting$class.error(Reporter.scala:89)
	at dotty.tools.dotc.core.Contexts$Context.error(Contexts.scala:57)
	at dotty.tools.dotc.typer.ErrorReporting$.errorType(ErrorReporting.scala:25)
	at dotty.tools.dotc.typer.ErrorReporting$.errorTree(ErrorReporting.scala:22)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1593)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1591)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1591)
	at dotty.tools.dotc.typer.Typer.typedType(Typer.scala:1649)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedSelect$1.apply(Typer.scala:418)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedSelect$1.apply(Typer.scala:395)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedSelect(Typer.scala:395)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1513)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1577)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1593)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1591)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1591)
	at dotty.tools.dotc.typer.Namer$$anonfun$typedAheadType$1.apply(Namer.scala:931)
	at dotty.tools.dotc.typer.Namer$$anonfun$typedAheadType$1.apply(Namer.scala:931)
	at dotty.tools.dotc.typer.Namer.typedAheadImpl(Namer.scala:924)
	at dotty.tools.dotc.typer.Namer.typedAheadType(Namer.scala:931)
	at dotty.tools.dotc.typer.Namer.valOrDefDefSig(Namer.scala:1096)
	at dotty.tools.dotc.typer.Namer$Completer.typeSig(Namer.scala:729)
	at dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:777)
	at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:755)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:219)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.info(SymDenotations.scala:197)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:336)
	at dotty.tools.dotc.typer.Typer.retrieveSym(Typer.scala:1485)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1510)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1577)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1593)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1591)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1591)
	at dotty.tools.dotc.typer.Namer$$anonfun$typedAheadExpr$1.apply(Namer.scala:934)
	at dotty.tools.dotc.typer.Namer$$anonfun$typedAheadExpr$1.apply(Namer.scala:934)
	at dotty.tools.dotc.typer.Namer.typedAheadImpl(Namer.scala:924)
	at dotty.tools.dotc.typer.Namer.typedAheadExpr(Namer.scala:934)
	at dotty.tools.dotc.typer.Namer$$anonfun$completeParams$1.apply(Namer.scala:946)
	at dotty.tools.dotc.typer.Namer$$anonfun$completeParams$1.apply(Namer.scala:946)
	at scala.collection.immutable.List.foreach(List.scala:392)
	at dotty.tools.dotc.typer.Namer.completeParams(Namer.scala:946)
	at dotty.tools.dotc.typer.Namer$$anonfun$defDefSig$3.apply(Namer.scala:1131)
	at dotty.tools.dotc.typer.Namer$$anonfun$defDefSig$3.apply(Namer.scala:1131)
	at scala.collection.immutable.List.foreach(List.scala:392)
	at dotty.tools.dotc.typer.Namer.defDefSig(Namer.scala:1131)
	at dotty.tools.dotc.typer.Namer$Completer.typeSig(Namer.scala:733)
	at dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:777)
	at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:755)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:219)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.info(SymDenotations.scala:197)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:336)
	at dotty.tools.dotc.typer.Typer.retrieveSym(Typer.scala:1485)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1510)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1577)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1593)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1591)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1591)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1615)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1635)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:1329)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:1277)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:1277)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1523)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1577)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1593)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1591)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1591)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1615)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1635)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:1329)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:1277)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:1277)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1523)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1577)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1593)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1591)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1591)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1615)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1635)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedPackageDef$1.apply(Typer.scala:1438)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedPackageDef$1.apply(Typer.scala:1425)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:1425)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1562)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1578)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1593)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1591)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1591)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1647)
	at dotty.tools.dotc.typer.FrontEnd$$anonfun$typeCheck$1.apply$mcV$sp(FrontEnd.scala:64)
	at dotty.tools.dotc.typer.FrontEnd.monitor(FrontEnd.scala:32)
	at dotty.tools.dotc.typer.FrontEnd.typeCheck(FrontEnd.scala:62)
	at dotty.tools.dotc.typer.FrontEnd$$anonfun$runOn$3.apply(FrontEnd.scala:93)
	at dotty.tools.dotc.typer.FrontEnd$$anonfun$runOn$3.apply(FrontEnd.scala:93)
	at scala.collection.immutable.List.foreach(List.scala:392)
	at dotty.tools.dotc.typer.FrontEnd.runOn(FrontEnd.scala:93)
	at dotty.tools.dotc.Run$$anonfun$compileUnits$1$$anonfun$apply$mcV$sp$1.apply(Run.scala:82)
	at dotty.tools.dotc.Run$$anonfun$compileUnits$1$$anonfun$apply$mcV$sp$1.apply(Run.scala:79)
	at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
	at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
	at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply$mcV$sp(Run.scala:79)
	at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply(Run.scala:67)
	at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply(Run.scala:67)
	at dotty.tools.dotc.util.Stats$.monitorHeartBeat(Stats.scala:76)
	at dotty.tools.dotc.Run.compileUnits(Run.scala:67)
	at dotty.tools.dotc.Run.compileSources(Run.scala:64)
	at dotty.tools.dotc.Run.compile(Run.scala:48)
	at dotty.tools.dotc.Driver.doCompile(Driver.scala:26)
	at dotty.tools.dotc.Driver.process(Driver.scala:124)
	at dotty.tools.dotc.Driver.process(Driver.scala:93)
	at dotty.tools.dotc.Driver.process(Driver.scala:105)
	at dotty.tools.dotc.Driver.main(Driver.scala:132)
	at dotty.tools.dotc.Main.main(Main.scala)

I'll try to minimize it as much as possible.

@felixmulder
Copy link
Contributor Author

It's enough with:

dotc \
    -classpath library/target/scala-2.11/dotty-library_2.11-0.1.1-bin-SNAPSHOT-nonbootstrapped.jar:compiler/target/scala-2.11/dotty-compiler_2.11-0.1.1-bin-SNAPSHOT-nonbootstrapped.jar:interfaces/target/dotty-interfaces-0.1.1-bin-SNAPSHOT.jar \
    compiler/src/dotty/tools/dotc/classpath/ZipAndJarFileLookupFactory.scala \
    compiler/src/dotty/tools/dotc/classpath/ZipArchiveFileLookup.scala

@felixmulder
Copy link
Contributor Author

felixmulder commented May 8, 2017

Which in turn can be simplified to:

// Foo.scala
import dotty.tools.io.FileZipArchive

trait Foo {
  def bar(entry: FileZipArchive#Entry): Any
}

compiled with:

dotc \
    -classpath library/target/scala-2.11/dotty-library_2.11-0.1.1-bin-SNAPSHOT-nonbootstrapped.jar:compiler/target/scala-2.11/dotty-compiler_2.11-0.1.1-bin-SNAPSHOT-nonbootstrapped.jar:interfaces/target/dotty-interfaces-0.1.1-bin-SNAPSHOT.jar \
    Foo.scala

@felixmulder
Copy link
Contributor Author

There's a further hint:

exception caught when loading class ZipArchive: dotty.tools.dotc.core.Types$CyclicReference: cyclic reference involving class FileZipArchive

@smarter
Copy link
Member

smarter commented May 8, 2017

You should try to get the stacktrace for that cyclicreference exception.

@smarter
Copy link
Member

smarter commented May 8, 2017

Would also be nice if you could minimize it to something that can reproduced on master, that means taking ZipArchive.scala and minimizing it too.

@felixmulder
Copy link
Contributor Author

I'll try that, in the meanwhile - here's the stacktrace from the unpickling:


exception caught when loading class ZipArchive: dotty.tools.dotc.core.Types$CyclicReference: cyclic reference involving class FileZipArchive
dotty.tools.dotc.core.Types$CyclicReference: cyclic reference involving class FileZipArchive
	at dotty.tools.dotc.core.Types$CyclicReference$.apply(Types.scala:4022)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:215)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.info(SymDenotations.scala:197)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler.declIn$1(Scala2Unpickler.scala:360)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler.dotty$tools$dotc$core$unpickleScala2$Scala2Unpickler$$fromName$1(Scala2Unpickler.scala:361)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler.readExtSymbol$1(Scala2Unpickler.scala:392)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler.readDisambiguatedSymbol(Scala2Unpickler.scala:419)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler.readSymbol(Scala2Unpickler.scala:331)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler.readSymbolRef(Scala2Unpickler.scala:843)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler.readChildren(Scala2Unpickler.scala:833)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler.run(Scala2Unpickler.scala:211)
	at dotty.tools.dotc.core.classfile.ClassfileParser.unpickleScala$1(ClassfileParser.scala:716)
	at dotty.tools.dotc.core.classfile.ClassfileParser.unpickleOrParseInnerClasses(ClassfileParser.scala:762)
	at dotty.tools.dotc.core.classfile.ClassfileParser.parseClass(ClassfileParser.scala:120)
	at dotty.tools.dotc.core.classfile.ClassfileParser.run(ClassfileParser.scala:57)
	at dotty.tools.dotc.core.ClassfileLoader.load(SymbolLoaders.scala:330)
	at dotty.tools.dotc.core.ClassfileLoader.doComplete(SymbolLoaders.scala:326)
	at dotty.tools.dotc.core.SymbolLoader.complete(SymbolLoaders.scala:274)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:219)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.unforcedDecls(SymDenotations.scala:352)
	at dotty.tools.dotc.core.SymDenotations$ClassDenotation.typeParamsFromDecls(SymDenotations.scala:1232)
	at dotty.tools.dotc.core.SymDenotations$ClassDenotation.typeParams(SymDenotations.scala:1245)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler.readType(Scala2Unpickler.scala:742)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler$$anonfun$readTypeRef$1.apply(Scala2Unpickler.scala:855)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler$$anonfun$readTypeRef$1.apply(Scala2Unpickler.scala:855)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler.atReadPos(Scala2Unpickler.scala:313)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler.at(Scala2Unpickler.scala:303)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler.readTypeRef(Scala2Unpickler.scala:855)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler$$anonfun$readType$2.apply(Scala2Unpickler.scala:763)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler$$anonfun$readType$2.apply(Scala2Unpickler.scala:763)
	at dotty.tools.dotc.core.unpickleScala2.PickleBuffer.until(PickleBuffer.scala:161)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler.readType(Scala2Unpickler.scala:763)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler$LocalUnpickler$$anonfun$9.apply(Scala2Unpickler.scala:550)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler$LocalUnpickler$$anonfun$9.apply(Scala2Unpickler.scala:550)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler.atReadPos(Scala2Unpickler.scala:313)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler.at(Scala2Unpickler.scala:303)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler$LocalUnpickler.dotty$tools$dotc$core$unpickleScala2$Scala2Unpickler$LocalUnpickler$$parseToCompletion$1(Scala2Unpickler.scala:550)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler$LocalUnpickler$$anonfun$complete$1.apply$mcV$sp(Scala2Unpickler.scala:580)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler$LocalUnpickler$$anonfun$complete$1.apply(Scala2Unpickler.scala:580)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler$LocalUnpickler$$anonfun$complete$1.apply(Scala2Unpickler.scala:580)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler.atReadPos(Scala2Unpickler.scala:313)
	at dotty.tools.dotc.core.unpickleScala2.Scala2Unpickler$LocalUnpickler.complete(Scala2Unpickler.scala:579)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:219)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.info(SymDenotations.scala:197)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.isAccessibleFrom(SymDenotations.scala:698)
	at dotty.tools.dotc.core.Denotations$SingleDenotation.accessibleFrom(Denotations.scala:617)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedIdent$1.selection$1(Typer.scala:190)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedIdent$1.unambiguousSelection$1(Typer.scala:212)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedIdent$1.recur$1(Typer.scala:219)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedIdent$1.namedImportRef$1(Typer.scala:226)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedIdent$1.loop$1(Typer.scala:291)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedIdent$1.findRef$1(Typer.scala:314)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedIdent$1.apply(Typer.scala:333)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedIdent$1.apply(Typer.scala:98)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedIdent(Typer.scala:98)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1512)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1577)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1593)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1591)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1591)
	at dotty.tools.dotc.typer.Typer.typedType(Typer.scala:1649)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedSelect$1.apply(Typer.scala:418)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedSelect$1.apply(Typer.scala:395)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedSelect(Typer.scala:395)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1513)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1577)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1593)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1591)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1591)
	at dotty.tools.dotc.typer.Namer$$anonfun$typedAheadType$1.apply(Namer.scala:931)
	at dotty.tools.dotc.typer.Namer$$anonfun$typedAheadType$1.apply(Namer.scala:931)
	at dotty.tools.dotc.typer.Namer.typedAheadImpl(Namer.scala:924)
	at dotty.tools.dotc.typer.Namer.typedAheadType(Namer.scala:931)
	at dotty.tools.dotc.typer.Namer.valOrDefDefSig(Namer.scala:1096)
	at dotty.tools.dotc.typer.Namer$Completer.typeSig(Namer.scala:729)
	at dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:777)
	at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:755)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:219)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.info(SymDenotations.scala:197)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:336)
	at dotty.tools.dotc.typer.Typer.retrieveSym(Typer.scala:1485)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1510)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1577)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1593)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1591)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1591)
	at dotty.tools.dotc.typer.Namer$$anonfun$typedAheadExpr$1.apply(Namer.scala:934)
	at dotty.tools.dotc.typer.Namer$$anonfun$typedAheadExpr$1.apply(Namer.scala:934)
	at dotty.tools.dotc.typer.Namer.typedAheadImpl(Namer.scala:924)
	at dotty.tools.dotc.typer.Namer.typedAheadExpr(Namer.scala:934)
	at dotty.tools.dotc.typer.Namer$$anonfun$completeParams$1.apply(Namer.scala:946)
	at dotty.tools.dotc.typer.Namer$$anonfun$completeParams$1.apply(Namer.scala:946)
	at scala.collection.immutable.List.foreach(List.scala:392)
	at dotty.tools.dotc.typer.Namer.completeParams(Namer.scala:946)
	at dotty.tools.dotc.typer.Namer$$anonfun$defDefSig$3.apply(Namer.scala:1131)
	at dotty.tools.dotc.typer.Namer$$anonfun$defDefSig$3.apply(Namer.scala:1131)
	at scala.collection.immutable.List.foreach(List.scala:392)
	at dotty.tools.dotc.typer.Namer.defDefSig(Namer.scala:1131)
	at dotty.tools.dotc.typer.Namer$Completer.typeSig(Namer.scala:733)
	at dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:777)
	at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:755)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:219)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.info(SymDenotations.scala:197)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:336)
	at dotty.tools.dotc.typer.Typer.retrieveSym(Typer.scala:1485)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1510)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1577)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1593)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1591)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1591)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1615)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1635)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:1329)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:1277)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:1277)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1523)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1577)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1593)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1591)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1591)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1615)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1635)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedPackageDef$1.apply(Typer.scala:1438)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedPackageDef$1.apply(Typer.scala:1425)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:1425)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1562)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1578)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1593)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1591)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1591)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1647)
	at dotty.tools.dotc.typer.FrontEnd$$anonfun$typeCheck$1.apply$mcV$sp(FrontEnd.scala:64)
	at dotty.tools.dotc.typer.FrontEnd.monitor(FrontEnd.scala:32)
	at dotty.tools.dotc.typer.FrontEnd.typeCheck(FrontEnd.scala:62)
	at dotty.tools.dotc.typer.FrontEnd$$anonfun$runOn$3.apply(FrontEnd.scala:93)
	at dotty.tools.dotc.typer.FrontEnd$$anonfun$runOn$3.apply(FrontEnd.scala:93)
	at scala.collection.immutable.List.foreach(List.scala:392)
	at dotty.tools.dotc.typer.FrontEnd.runOn(FrontEnd.scala:93)
	at dotty.tools.dotc.Run$$anonfun$compileUnits$1$$anonfun$apply$mcV$sp$1.apply(Run.scala:82)
	at dotty.tools.dotc.Run$$anonfun$compileUnits$1$$anonfun$apply$mcV$sp$1.apply(Run.scala:79)
	at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
	at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
	at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply$mcV$sp(Run.scala:79)
	at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply(Run.scala:67)
	at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply(Run.scala:67)
	at dotty.tools.dotc.util.Stats$.monitorHeartBeat(Stats.scala:76)
	at dotty.tools.dotc.Run.compileUnits(Run.scala:67)
	at dotty.tools.dotc.Run.compileSources(Run.scala:64)
	at dotty.tools.dotc.Run.compile(Run.scala:48)
	at dotty.tools.dotc.Driver.doCompile(Driver.scala:26)
	at dotty.tools.dotc.Driver.process(Driver.scala:124)
	at dotty.tools.dotc.Driver.process(Driver.scala:93)
	at dotty.tools.dotc.Driver.process(Driver.scala:105)
	at dotty.tools.dotc.Driver.main(Driver.scala:132)
	at dotty.tools.dotc.Main.main(Main.scala)

@felixmulder
Copy link
Contributor Author

felixmulder commented May 8, 2017

"Blocker": #2391

@felixmulder felixmulder force-pushed the topic/kill-reflect-io branch from a055aad to 9d89076 Compare May 8, 2017 12:09
@felixmulder
Copy link
Contributor Author

@smarter - would you mind reviewing?

@felixmulder felixmulder changed the title [WIP] Kill reflect io Kill reflect io May 8, 2017
@felixmulder felixmulder force-pushed the topic/kill-reflect-io branch from 9d89076 to a7bec36 Compare May 8, 2017 14:00
@@ -0,0 +1,410 @@
/** Taken from the original implementation of WeakHashSet in scala-reflect
Copy link
Member

Choose a reason for hiding this comment

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

The commit message should include the hash of the version of scalac from which this file was taken.

@@ -101,7 +101,7 @@ class ExtractDependencies extends Phase {
val classSegments = Path(ze.path).segments
binaryDependency(zipFile, className(classSegments))
}
case pf: scala.reflect.io.PlainFile =>
case pf: dotty.tools.io.PlainFile =>
Copy link
Member

Choose a reason for hiding this comment

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

This could just be PlainFile now, it's imported.

Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM.

@@ -0,0 +1,114 @@
/* __ *\
Copy link
Member

Choose a reason for hiding this comment

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

The commit message should include the hash of the version of theses files you're importing. If it works, try importing the latest version from scala 2.12.

@@ -274,12 +206,11 @@ final class ManifestResources(val url: URL) extends ZipArchive(null) {
for (zipEntry <- iter) {
val dir = getDir(dirs, zipEntry)
if (!zipEntry.isDirectory) {
class FileEntry() extends Entry(zipEntry.getName) {
val f = new Entry(zipEntry.getName) {
Copy link
Member

Choose a reason for hiding this comment

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

I think this change is no longer necessary now that #2282 got merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@odersky - despite #2282 and other fixes - this still had to be changed in order for Dotty to accept it. I've had a hard time minimizing it, but I'll take another crack at it.

@@ -621,6 +621,7 @@ object Build {
settings(
publishArtifact := false,
parallelExecution in Test := false,
testOptions in Test += Tests.Argument(TestFrameworks.JUnit, "-a", "-v"),
Copy link
Member

Choose a reason for hiding this comment

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

What is this for? Could you leave a comment?

@felixmulder felixmulder force-pushed the topic/kill-reflect-io branch from a7bec36 to 1096a28 Compare May 9, 2017 10:15
@felixmulder felixmulder force-pushed the topic/kill-reflect-io branch 2 times, most recently from b505c29 to ea59cb3 Compare May 9, 2017 13:18
@felixmulder felixmulder merged commit 7a3f880 into scala:master May 9, 2017
@allanrenucci allanrenucci deleted the topic/kill-reflect-io branch December 14, 2017 19:25
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.

3 participants