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: Cleanup trees after typechecking them in IDE #2986

Merged
merged 4 commits into from
Aug 16, 2017

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Aug 16, 2017

I decided in the end it is simpler and more modular to sanitize trees in the IDE, after type checking them. That way we can separate concerns and need not burden the general tree handling.

Sanitization involves removing all attachments and symbol completers.

@odersky odersky requested a review from smarter August 16, 2017 09:28
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

@@ -179,6 +179,16 @@ class InteractiveDriver(settings: List[String]) extends Driver {

private val compiler: Compiler = new InteractiveCompiler

private def cleanup(tree: tpd.Tree)(implicit ctx: Context): Unit = tree.foreachSubTree { t =>
Copy link
Member

Choose a reason for hiding this comment

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

Add a documentation comment explaining why cleanup is necessary?

@odersky odersky merged commit 79ce6c0 into scala:master Aug 16, 2017
@allanrenucci allanrenucci deleted the harden-ide-5 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.

2 participants