-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #2395: Check if the scala or dotty libraries are missing #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
Conversation
9d48aad
to
cdd18ec
Compare
val paths = Jars.dottyTestDeps map { p => | ||
val classPath = mkClassPath(Jars.dottyTestDeps) | ||
|
||
def mkClassPath(deps: List[String]) = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explicit return type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. But someone with a better understanding of compiler internals should have a look.
@@ -1199,7 +1199,10 @@ object Denotations { | |||
val alt = | |||
if (generateStubs) missingHook(owner.symbol.moduleClass, selector) | |||
else NoSymbol | |||
if (alt.exists) alt.denot else MissingRef(owner, selector) | |||
if (alt.exists) alt.denot | |||
else if (owner.symbol == defn.RootClass && (selector == nme.scala_ || selector == nme.scalaShadowing)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe document what this test or extract it to an inner function.
I don't have a good understanding of this does though. @smarter?
c914b04
to
dc7cd4a
Compare
if (alt.exists) alt.denot else MissingRef(owner, selector) | ||
if (alt.exists) alt.denot | ||
else if (isPackageFromCoreLibMissing) throw new MissingCoreLibraryException(selector.toString) | ||
else MissingRef(owner, selector) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smarter could you review the isPackageFromCoreLibMissing
condition in this file. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me.
@@ -1192,14 +1192,23 @@ object Denotations { | |||
def staticRef(path: Name, generateStubs: Boolean = true, isPackage: Boolean = false)(implicit ctx: Context): Denotation = { | |||
def select(prefix: Denotation, selector: Name): Denotation = { | |||
val owner = prefix.disambiguate(_.info.isParameterless) | |||
def isPackageFromCoreLibMissing: Boolean = { | |||
owner.symbol == defn.RootClass && | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use (
not {
1f9a682
to
0258859
Compare
Rebased after drone update |
No description provided.