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

Harden IDE some more #2932

Merged
merged 4 commits into from Jul 29, 2017
Merged

Harden IDE some more #2932

merged 4 commits into from Jul 29, 2017

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jul 29, 2017

More fixes that prevent crashes and infinite loops observed in the IDE.

Also, some more fundamental changes that I added here to test them out in isolation of the other work on applied types I am doing.

We get sometimes stake symbol error because a completer
is run in its creation context, which comes from a previous run.
This should not happen. Adding an assert to flag the erronenous
completion when it happens.
val effectiveOwner =
if (curOwner.isTerm && defDenot.symbol.isType)
// Don't mix NoPrefix and thisType prefixes, since type comparer
// would not detect types to be compatible. Note: If we replace the
Copy link
Member

Choose a reason for hiding this comment

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

What kind of issue did you see before this change? Could this be boiled down to a test case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's only in the applied type branch that this became an issue. We saw the same type parameter TypeRef once with a NoPrefix prefix, the other with a ThisType. They should be the same but subtype checking failed. We could make subtype checking more lenient, but I think it's better not to have variations how we construct these things. I believe the current scheme hides the difference because we follow an alias from TypeParamAccessor to TypeParam, that's why we did not see it so far.

@odersky
Copy link
Contributor Author

odersky commented Jul 29, 2017

Rebased to master.

Parser could get into an infinite loop because `acceptStatSepUnlessAtEnd`
did not make progress. I believe the concrete example was a string interpolator
where we encounter a `{ ... )`.
@odersky
Copy link
Contributor Author

odersky commented Jul 29, 2017

I collected all IDE improvements here. Will submit the other improvements separately.

@smarter smarter merged commit df4b3dd into scala:master Jul 29, 2017
@allanrenucci allanrenucci deleted the harden-ide-4 branch December 14, 2017 19:23
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.

None yet

2 participants