Skip to content

Fix incremental compilation not working after restarting sbt #2134

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

Merged

Conversation

smarter
Copy link
Member

@smarter smarter commented Mar 21, 2017

Previously, every time sbt was restarted, compile would do a full
recompilation. This happened because sbt uses Java serialization to
persist the incremental compilation analysis, deserialization was always
silently failing because we used to serialize a class from the
dotty-compiler jar which is not on the classpath at deserialization
time. See the added comments for more details.

@smarter smarter requested a review from felixmulder March 21, 2017 21:47
Previously, every time sbt was restarted, `compile` would do a full
recompilation. This happened because sbt uses Java serialization to
persist the incremental compilation analysis, deserialization was always
silently failing because we used to serialize a class from the
dotty-compiler jar which is not on the classpath at deserialization
time. See the added comments for more details.
@smarter smarter force-pushed the fix/incremental-compilation-restart branch from ff57450 to 16ce4f7 Compare March 21, 2017 22:56
Copy link
Contributor

@felixmulder felixmulder left a comment

Choose a reason for hiding this comment

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

Changes look good to me. It is an interesting solution, and it obviously works. But I still feel like we shouldn't be integrating sbt into Dotty, it should be the other way around.

This being said - to get incremental compilation to work without spending loads of time by contributing to sbt - this is the most pragmatic solution.

@felixmulder felixmulder merged commit 3af0ebb into scala:master Mar 22, 2017
@felixmulder felixmulder deleted the fix/incremental-compilation-restart branch March 22, 2017 08:21
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