Skip to content

Commit 438790d

Browse files
authored
FSharpLanguageVersion: invalidate on toolset change (#858)
1 parent b787990 commit 438790d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

ReSharper.FSharp/src/FSharp/FSharp.Common/src/ProjectModel/FSharpLanguageLevelProvider.fs

+5
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ type FSharpLanguageLevelProjectProperty(lifetime, locks, projectPropertiesListen
183183

184184
override this.LanguageLevelComparer = FSharpLanguageLevelComparer.Instance :> _
185185

186+
interface ISolutionToolsetListener with
187+
member this.Changed _ =
188+
compilerPathToLanguageLevels.Clear()
189+
190+
186191
[<SolutionFeaturePart(InstantiationEx.LegacyDefault)>]
187192
type FSharpLanguageLevelProvider(projectProperty: FSharpLanguageLevelProjectProperty) =
188193
let (|PsiModule|) (psiModule: IPsiModule) =

ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/FSharpFileStructureExplorer.fs

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ open JetBrains.ReSharper.Feature.Services.Daemon
55
open JetBrains.ReSharper.Plugins.FSharp.Psi.Impl.Tree
66
open JetBrains.ReSharper.Plugins.FSharp.Psi.Tree
77
open JetBrains.ReSharper.Psi.Tree
8+
open JetBrains.ReSharper.Psi.Util
89

910
type DisableByNowarnCodeInspectionSection(warningId, range) =
1011
interface IDisableCodeInspectionSection with
@@ -49,4 +50,5 @@ type FSharpFileStructureExplorer() =
4950
let fsFile = file.As<IFSharpFile>()
5051
if isNull fsFile then null else
5152

53+
PsiFileCachedDataUtil.InvalidateAllData(fsFile)
5254
FSharpFileStructure(fsFile)

0 commit comments

Comments
 (0)