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

Delay renaming in closed files until the first save is run #1094

Merged
merged 1 commit into from Dec 1, 2019

Conversation

@tgodzik
Copy link
Collaborator

tgodzik commented Dec 1, 2019

Previously, all closed files would be updated just during the rename, which could produce false positive compiler errors while the opened files are not saved. Now, we delay changing the close files until the first save is hit.

@tgodzik tgodzik requested a review from olafurpg Dec 1, 2019
Copy link
Member

olafurpg left a comment

This looks like a nice improvement over the current behavior! Thank you @tgodzik

I think the rename behavior for unopened files still needs a bit further refinement that we can address separately. It would be nice if we can for example limit the "write to disk for unopened files" fallback only in cases when renaming a large number of files and maybe even warn the user that this operation cannot be undone.

…aving false positive compiler errors.
@tgodzik tgodzik force-pushed the tgodzik:fix-renames branch from 997900a to 7a0329b Dec 1, 2019
@tgodzik tgodzik merged commit 54a52bb into scalameta:master Dec 1, 2019
9 checks passed
9 checks passed
Windows unit tests
Details
Linux unit tests
Details
Sbt integration
Details
Maven integration
Details
Gradle integration
Details
Mill integration
Details
Slow tests
Details
Scala cross tests
Details
Scalafmt/Scalacheck/Docs
Details
@tgodzik tgodzik deleted the tgodzik:fix-renames branch Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.