-
Notifications
You must be signed in to change notification settings - Fork 847
[WIP] Added cache invalidation policy when a solution changes #6791
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
Conversation
dsyme
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one minor change requested
I'd be interested to know if this can be unit tested?
vsintegration/src/FSharp.Editor/LanguageService/FSharpProjectOptionsManager.fs
Outdated
Show resolved
Hide resolved
|
Good question on the testing part. I think it's possible if I only split out the functions. I'll see if it can be done. |
cartermp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestions and a question
vsintegration/src/FSharp.Editor/LanguageService/FSharpProjectOptionsManager.fs
Show resolved
Hide resolved
|
Marking this as WIP as we first need to fix the reference counting problem with IB (IncrementalBuilder) by pushing disposing of type providers and ilbinary readers down the TcImports' Finalizer. |
|
I still would like to finish the solution cache invalidation strategy; but it's a little tricky. My fear is that it may make behavior worse. It seems everytime I want to remove something from the |
We had a bug where we didn't clear out FCS's caches when a solution was changed. This means, for example, switching configurations between Debug to Release, and vice versa, would cause a new solution to be created with completely different project ids; it would not clear the old projects from FCS out of its cache, effectively keeping them around.
This PR addresses the issue. It also adds a new API,
InvalidateProject, to the compiler service that allows you to clear out a specific project from the incrementalbuilder cache. The API is used in FSharp.Editor when a solution has removed projects from itself.This also does various cleanup; unified handling of single files with normal projects which means one cache in FSharpProjectOptionsManager.