Skip to content

Commit ed40f59

Browse files
committed
fix api
1 parent 57a5ba3 commit ed40f59

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

ReSharper.FSharp/src/FSharp.Common/src/Checker/FcsCheckerService.fs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,18 +148,22 @@ type FcsCheckerService(lifetime: Lifetime, logger: ILogger, onSolutionCloseNotif
148148
if checker.IsValueCreated then
149149
checker.Value.InvalidateConfiguration(fcsProjectOptions, false)
150150

151+
member private x.InvalidateFcsProjectInternal(project: IProject) =
152+
project.GetPsiModules()
153+
|> Seq.choose x.FcsProjectProvider.GetProjectOptions
154+
|> Seq.iter x.InvalidateFcsProject
155+
151156
member x.InvalidateFcsProject(project: IProject) =
152157
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)
156160

157161
member x.InvalidateFcsProjects(solution: ISolution, isApplicable: IProject -> bool) =
158-
use lock = ReadLockCookie.Create()
159162
if checker.IsValueCreated then
163+
use lock = ReadLockCookie.Create()
160164
solution.GetAllProjects()
161165
|> Seq.filter isApplicable
162-
|> Seq.iter x.InvalidateFcsProject
166+
|> Seq.iter x.InvalidateFcsProjectInternal
163167

164168
/// Use with care: returns wrong symbol inside its non-recursive declaration, see dotnet/fsharp#7694.
165169
member x.ResolveNameAtLocation(sourceFile: IPsiSourceFile, names, coords, opName) =

0 commit comments

Comments
 (0)