-
Notifications
You must be signed in to change notification settings - Fork 847
[VS] Scripting fixes #11643
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
[VS] Scripting fixes #11643
Conversation
| lock gate (fun () -> | ||
| match files.TryRemove(document.FilePath) with | ||
| | true, (projectContext, _) -> | ||
| projectContext.Dispose() |
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.
We should not dispose of a projectContext if it's being used as a dependency for another project.
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.
Note this TODO
|
It would be preferred we finish #11588 first as it will tie into how scripts will be updated. |
|
So how do we get this under test? :) |
|
@TIHan Can we get this in now the refactoring PR is done? |
|
I'll see if we can now. I need to think about this as it might change because of the in-memory-documents PR. |
|
|
||
| let _miscFileService = FSharpMiscellaneousFileService(workspace, miscFilesWorkspace, projectContextFactory) | ||
|
|
||
| let filePath1 = |
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.
Can be done later - but best to create an IDisposable thingy for these
|
It would be good to get further tests added where we check that re-analysis happens when
I'm particularly concerned about the last one as I don't currently understand how Roslyn could know that it needs to do a re-analysis in this case. |
|
I will merge this, as the fixes are important and the core testing added, and start using it myself. @TIHan Can you look at the above testing cases? |
|
Yes I will look at the test cases and get them in today. |
We have a few issues with F# scripts getting re-analyzed when their dependencies have been updated.
The idea here is to create a VS project that tracks the dependencies of the script so Roslyn can accurately re-analyze it.