File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
ReSharper.FSharp/src/FSharp/FSharp.Common/src/Checker Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -80,17 +80,19 @@ type FcsProject =
80
80
type FcsSnapshotCache ( fcsProjectProvider : IFcsProjectProvider , locks : IShellLocks ) =
81
81
let snapshots = Dictionary< FcsProjectKey, FSharpProjectSnapshot>()
82
82
83
- let remove ( psiModule : IPsiModule ) =
84
- let projectKey = FcsProjectKey.Create( psiModule)
85
- snapshots.Remove( projectKey) |> ignore
86
-
83
+ let rec removeReferences ( projectKey : FcsProjectKey ) =
87
84
match fcsProjectProvider.GetReferencedModule( projectKey) with
88
85
| None -> ()
89
86
| Some referencedModule ->
90
87
91
- // todo: recursive update?
92
88
for referencingProject in referencedModule.ReferencingProjects do
89
+ removeReferences referencingProject
93
90
snapshots.Remove( referencingProject) |> ignore
91
+
92
+ let remove ( psiModule : IPsiModule ) =
93
+ let projectKey = FcsProjectKey.Create( psiModule)
94
+ snapshots.Remove( projectKey) |> ignore
95
+ removeReferences projectKey
94
96
95
97
member this.GetProjectSnapshot ( projectKey : FcsProjectKey , options : FSharpProjectOptions ) =
96
98
// todo: use source files in file snapshots?
You can’t perform that action at this time.
0 commit comments