scala/scala — pull request #4112 by retronym (2014-11-07 23:45:13+00:00)
Title: SI-8502 Improve resiliance to absent packages

When unpickling a class, we create stub symbols for references
to classes absent from the current classpath. If these references
only appear in method signatures that aren't called, we can
proceed with compilation. This is in line with javac.

We're getting better at this, but there are still some gaps.
This bug is about the behaviour when a package is completely
missing, rather than just a single class within that package.

To make this work we have to add two special cases to the unpickler:

- When unpickling a `ThisType`, convert a `StubTermSymbol` into
a `StubTypeSymbol`. We hit this when unpickling
`ThisType(missingPackage)`.
- When unpickling a reference to `.name` where ``
is a stub symbol, don't call info on that owner, but rather
allow the enclosing code in `readSymbol` fall through to
create a stub for the member.

The test case was distilled from an a problem that a Spray user
encountered when Akka was missing from the classpath.

Two existing test cases have progressed, and the checkfiles are
accordingly updated.

Review by @gkossakowski