-
Notifications
You must be signed in to change notification settings - Fork 156
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
Fix renames and reference counts by using the compiler-generated memory-mapped indexes #945
Conversation
0049591
to
2814e4d
Compare
I was able to turn on some rename tests that cover same-project renames and they green'd up nicely. I should be able to expand those tests to show cross-project renames as well. After that, I can dig into the dependent-file checking part of this PR. |
88b5f42
to
2c1b495
Compare
Cross-project renames are working great now 👍 . Next steps are the validation of dependent-file checking. @Krzysztof-Cieslak mentioned today that one of the purposes of the background services was to make sure that on subsequent edits to a file A.fs in A.fsproj, that B.fs in B.fsproj was re-checked. We should have some set of tests/scenarios verifying this behavior as a baseline. |
In the first pass let's make sure that single project dependent files are working correctly since this is thing that was broken for me last time I've tried to disable background service The cross project is kinda stretch goal - the feature exist in background service, but is disabled due to performance considerations |
75151b0
to
c8ee1f4
Compare
Current state is
|
Alright, the only tests failing are the newly-added dependent-file ones. I'm....waffling on fixing those immediately - if manual testing shows that features seem to be working, then I'm less inclined to invest the effort right now, when the rest of this PR represents a large reduction in CPU/memory usage rates. |
I figured out a way to fix the bad renames that the FCS APIs give us, I'll add some tests to cover it. Dependent typechecking does work within a project, but not across projects. |
723f190
to
fa4480f
Compare
After chatting with @Krzysztof-Cieslak we don't have cross-file checking at the moment anyway, so that will become a stretch goal, for a later PR. Here's what it looks like now: I'm super happy with this, I want to add a test around the qualified-useage-rename scenario to cover my bases, and fix the hang in the tests introduced by the last commit, but then this is good to go. |
we use the compiler's item key stores for this.
be7b765
to
6497537
Compare
b88724b
to
61f6aea
Compare
Green! And the failures on windows are a race condition on restoring the underlying test project. We should be able to fix that by using temp dirs. |
0da1901
to
7e15fb2
Compare
7e15fb2
to
95a1a0d
Compare
This reverts commit 95a1a0d.
Alright, going with this now :) |
We use the compiler's item key stores to power reference identification, when in turn powers rename replacement. This seems to work incredibly fast.
This is implemented by mimicking the VS integration:
As a result of these changes, the background services were no longer used, so I removed them. This should result in fairly large memory/CPU savings for users that had them enabled (since you basically pay the price for loading projects/assemblies twice with them on).
Fixes ionide/ionide-vscode-fsharp#1690 and ionide/ionide-vscode-fsharp#1265
TODO:
C
, which is bad)