Skip to content

Conversation

smarter
Copy link
Member

@smarter smarter commented Jul 5, 2017

No description provided.

@smarter smarter requested a review from odersky July 5, 2017 06:41
@smarter smarter force-pushed the fix-complete-scala branch 3 times, most recently from 0fc8632 to 8aa02c0 Compare July 6, 2017 07:48
@smarter
Copy link
Member Author

smarter commented Jul 10, 2017

Ping @odersky, this might be nice to get in the release.

if (scan(tpnme.ScalaATTR) && !scalaUnpickleWhitelist.contains(classRoot.name)) {
// If the Scala attribute is present but the TASTY attribute isn't, this
// classfile is a compilation artifact.
return Some(NoEmbedded)
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't understand the logic here, What is the significance of ScalaATTR? What happens with Scala2 classfiles?

val boundaryCtx = ctx.withOwner(boundary)
prefix.memberDenots(completionsFilter, (name, buf) =>
buf ++= prefix.member(name).altsWith(_.symbol.isAccessibleFrom(prefix)(boundaryCtx))
buf ++= prefix.member(name).altsWith(d => !d.isAbsent && d.symbol.isAccessibleFrom(prefix)(boundaryCtx))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there are way both isAbsent and isAccessibleFrom can be true? Should there be?

@smarter smarter force-pushed the fix-complete-scala branch from 8aa02c0 to 07fa44e Compare July 11, 2017 11:32
smarter added 3 commits July 11, 2017 13:41
This is similar to scala/scala#5952, we do not
need to parse artifact classfiles (that is, classfiles produced by
scalac or dotty that do not contain pickling information), so we discard
them as soon as possible.
This fixes various IDE crashes when trying to complete packages such as
"scala."
@smarter smarter force-pushed the fix-complete-scala branch from 07fa44e to 77b247d Compare July 11, 2017 11:42
@smarter smarter mentioned this pull request Jul 11, 2017
@smarter smarter merged commit c6fb9cf into scala:master Jul 11, 2017
@allanrenucci allanrenucci deleted the fix-complete-scala branch December 14, 2017 19:19
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.

2 participants