@@ -148,18 +148,22 @@ type FcsCheckerService(lifetime: Lifetime, logger: ILogger, onSolutionCloseNotif
148
148
if checker.IsValueCreated then
149
149
checker.Value.InvalidateConfiguration( fcsProjectOptions, false )
150
150
151
+ member private x.InvalidateFcsProjectInternal ( project : IProject ) =
152
+ project.GetPsiModules()
153
+ |> Seq.choose x.FcsProjectProvider.GetProjectOptions
154
+ |> Seq.iter x.InvalidateFcsProject
155
+
151
156
member x.InvalidateFcsProject ( project : IProject ) =
152
157
if checker.IsValueCreated then
153
- project.GetPsiModules()
154
- |> Seq.choose x.FcsProjectProvider.GetProjectOptions
155
- |> Seq.iter x.InvalidateFcsProject
158
+ use lock = ReadLockCookie.Create()
159
+ x.InvalidateFcsProjectInternal( project)
156
160
157
161
member x.InvalidateFcsProjects ( solution : ISolution , isApplicable : IProject -> bool ) =
158
- use lock = ReadLockCookie.Create()
159
162
if checker.IsValueCreated then
163
+ use lock = ReadLockCookie.Create()
160
164
solution.GetAllProjects()
161
165
|> Seq.filter isApplicable
162
- |> Seq.iter x.InvalidateFcsProject
166
+ |> Seq.iter x.InvalidateFcsProjectInternal
163
167
164
168
/// Use with care: returns wrong symbol inside its non-recursive declaration, see dotnet/fsharp#7694.
165
169
member x.ResolveNameAtLocation ( sourceFile : IPsiSourceFile , names , coords , opName ) =
0 commit comments