Skip to content
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

Remove unused useSyntaxTreeCache option #17768

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions docs/builder-caches.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/release-notes/.FSharp.Compiler.Service/9.0.200.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
### Changed

* Make ILTypeDef interface impls calculation lazy. ([PR #17392](https://github.com/dotnet/fsharp/pull/17392))
* Remove non-functional useSyntaxTreeCache option. ([PR #17768](https://github.com/dotnet/fsharp/pull/17768))

### Breaking Changes
1 change: 1 addition & 0 deletions docs/release-notes/.VisualStudio/17.12.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

### Changed
* Fix unwanted navigation on hover [PR #17592](https://github.com/dotnet/fsharp/pull/17592))
* Remove non-functional useSyntaxTreeCache option. ([PR #17768](https://github.com/dotnet/fsharp/pull/17768))


### Breaking Changes
Expand Down
6 changes: 2 additions & 4 deletions src/Compiler/Service/BackgroundCompiler.fs
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@ type internal BackgroundCompiler
parallelReferenceResolution,
captureIdentifiersWhenParsing,
getSource: (string -> Async<ISourceText option>) option,
useChangeNotifications,
useSyntaxTreeCache
useChangeNotifications
) as self =

let beforeFileChecked = Event<string * FSharpProjectOptions>()
Expand Down Expand Up @@ -403,8 +402,7 @@ type internal BackgroundCompiler
parallelReferenceResolution,
captureIdentifiersWhenParsing,
getSource,
useChangeNotifications,
useSyntaxTreeCache
useChangeNotifications
)

match builderOpt with
Expand Down
3 changes: 1 addition & 2 deletions src/Compiler/Service/BackgroundCompiler.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,7 @@ type internal BackgroundCompiler =
parallelReferenceResolution: ParallelReferenceResolution *
captureIdentifiersWhenParsing: bool *
getSource: (string -> Async<ISourceText option>) option *
useChangeNotifications: bool *
useSyntaxTreeCache: bool ->
useChangeNotifications: bool ->
BackgroundCompiler

static member ActualCheckFileCount: int
Expand Down
11 changes: 3 additions & 8 deletions src/Compiler/Service/IncrementalBuild.fs
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@ type IncrementalBuilderInitialState =
defaultTimeStamp: DateTime
mutable isImportsInvalidated: bool
useChangeNotifications: bool
useSyntaxTreeCache: bool
}

static member Create
Expand All @@ -908,8 +907,7 @@ type IncrementalBuilderInitialState =
#endif
allDependencies,
defaultTimeStamp: DateTime,
useChangeNotifications: bool,
useSyntaxTreeCache
useChangeNotifications: bool
) =

let initialState =
Expand All @@ -935,7 +933,6 @@ type IncrementalBuilderInitialState =
defaultTimeStamp = defaultTimeStamp
isImportsInvalidated = false
useChangeNotifications = useChangeNotifications
useSyntaxTreeCache = useSyntaxTreeCache
}
#if !NO_TYPEPROVIDERS
importsInvalidatedByTypeProvider.Publish.Add(fun () -> initialState.isImportsInvalidated <- true)
Expand Down Expand Up @@ -1407,8 +1404,7 @@ type IncrementalBuilder(initialState: IncrementalBuilderInitialState, state: Inc
parallelReferenceResolution,
captureIdentifiersWhenParsing,
getSource,
useChangeNotifications,
useSyntaxTreeCache
useChangeNotifications
) =

let useSimpleResolutionSwitch = "--simpleresolution"
Expand Down Expand Up @@ -1650,8 +1646,7 @@ type IncrementalBuilder(initialState: IncrementalBuilderInitialState, state: Inc
#endif
allDependencies,
defaultTimeStamp,
useChangeNotifications,
useSyntaxTreeCache
useChangeNotifications
)

let builder = IncrementalBuilder(initialState, IncrementalBuilderState.Create(initialState))
Expand Down
3 changes: 1 addition & 2 deletions src/Compiler/Service/IncrementalBuild.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,7 @@ type internal IncrementalBuilder =
parallelReferenceResolution: ParallelReferenceResolution *
captureIdentifiersWhenParsing: bool *
getSource: (string -> Async<ISourceText option>) option *
useChangeNotifications: bool *
useSyntaxTreeCache: bool ->
useChangeNotifications: bool ->
Async<IncrementalBuilder option * FSharpDiagnostic[]>

/// Generalized Incremental Builder. This is exposed only for unit testing purposes.
Expand Down
6 changes: 2 additions & 4 deletions src/Compiler/Service/TransparentCompiler.fs
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,7 @@ type internal TransparentCompiler
parallelReferenceResolution,
captureIdentifiersWhenParsing,
getSource: (string -> Async<ISourceText option>) option,
useChangeNotifications,
useSyntaxTreeCache
useChangeNotifications
) as self =

let documentSource =
Expand Down Expand Up @@ -374,8 +373,7 @@ type internal TransparentCompiler
parallelReferenceResolution,
captureIdentifiersWhenParsing,
getSource,
useChangeNotifications,
useSyntaxTreeCache
useChangeNotifications
)
:> IBackgroundCompiler

Expand Down
3 changes: 1 addition & 2 deletions src/Compiler/Service/TransparentCompiler.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ type internal TransparentCompiler =
parallelReferenceResolution: ParallelReferenceResolution *
captureIdentifiersWhenParsing: bool *
getSource: (string -> Async<ISourceText option>) option *
useChangeNotifications: bool *
useSyntaxTreeCache: bool ->
useChangeNotifications: bool ->
TransparentCompiler

member FindReferencesInFile:
Expand Down
11 changes: 2 additions & 9 deletions src/Compiler/Service/service.fs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ type FSharpChecker
captureIdentifiersWhenParsing,
getSource,
useChangeNotifications,
useSyntaxTreeCache,
useTransparentCompiler
) =

Expand All @@ -144,8 +143,7 @@ type FSharpChecker
parallelReferenceResolution,
captureIdentifiersWhenParsing,
getSource,
useChangeNotifications,
useSyntaxTreeCache
useChangeNotifications
)
:> IBackgroundCompiler
else
Expand All @@ -162,8 +160,7 @@ type FSharpChecker
parallelReferenceResolution,
captureIdentifiersWhenParsing,
getSource,
useChangeNotifications,
useSyntaxTreeCache
useChangeNotifications
)
:> IBackgroundCompiler

Expand Down Expand Up @@ -209,7 +206,6 @@ type FSharpChecker
?parallelReferenceResolution: bool,
?captureIdentifiersWhenParsing: bool,
?documentSource: DocumentSource,
?useSyntaxTreeCache: bool,
?useTransparentCompiler: bool
) =

Expand Down Expand Up @@ -238,8 +234,6 @@ type FSharpChecker
| Some(DocumentSource.Custom _) -> true
| _ -> false

let useSyntaxTreeCache = defaultArg useSyntaxTreeCache true

if keepAssemblyContents && enablePartialTypeChecking then
invalidArg "enablePartialTypeChecking" "'keepAssemblyContents' and 'enablePartialTypeChecking' cannot be both enabled."

Expand All @@ -261,7 +255,6 @@ type FSharpChecker
| Some(DocumentSource.Custom f) -> Some f
| _ -> None),
useChangeNotifications,
useSyntaxTreeCache,
useTransparentCompiler
)

Expand Down
3 changes: 0 additions & 3 deletions src/Compiler/Service/service.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ type public FSharpChecker =
/// <param name="parallelReferenceResolution">Indicates whether to resolve references in parallel.</param>
/// <param name="captureIdentifiersWhenParsing">When set to true we create a set of all identifiers for each parsed file which can be used to speed up finding references.</param>
/// <param name="documentSource">Default: FileSystem. You can use Custom source to provide a function that will return the source for a given file path instead of reading it from the file system. Note that with this option the FSharpChecker will also not monitor the file system for file changes. It will expect to be notified of changes via the NotifyFileChanged method.</param>
/// <param name="useSyntaxTreeCache">Default: true. Indicates whether to keep parsing results in a cache.</param>
/// <param name="useTransparentCompiler">Default: false. Indicates whether we use a new experimental background compiler. This does not yet support all features</param>
static member Create:
?projectCacheSize: int *
Expand All @@ -54,8 +53,6 @@ type public FSharpChecker =
?captureIdentifiersWhenParsing: bool *
[<Experimental "This parameter is experimental and likely to be removed in the future.">] ?documentSource:
DocumentSource *
[<Experimental "This parameter is experimental and likely to be removed in the future.">] ?useSyntaxTreeCache:
bool *
[<Experimental "This parameter is experimental and likely to be removed in the future.">] ?useTransparentCompiler:
bool ->
FSharpChecker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2138,7 +2138,7 @@ FSharp.Compiler.CodeAnalysis.FSharpCheckProjectResults: System.String[] Dependen
FSharp.Compiler.CodeAnalysis.FSharpCheckProjectResults: System.String[] get_DependencyFiles()
FSharp.Compiler.CodeAnalysis.FSharpChecker: Boolean UsesTransparentCompiler
FSharp.Compiler.CodeAnalysis.FSharpChecker: Boolean get_UsesTransparentCompiler()
FSharp.Compiler.CodeAnalysis.FSharpChecker: FSharp.Compiler.CodeAnalysis.FSharpChecker Create(Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.FSharpFunc`2[System.Tuple`2[System.String,System.DateTime],Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[System.Object,System.IntPtr,System.Int32]]]], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.CodeAnalysis.DocumentSource], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean])
FSharp.Compiler.CodeAnalysis.FSharpChecker: FSharp.Compiler.CodeAnalysis.FSharpChecker Create(Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.FSharpFunc`2[System.Tuple`2[System.String,System.DateTime],Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[System.Object,System.IntPtr,System.Int32]]]], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.CodeAnalysis.DocumentSource], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean])
FSharp.Compiler.CodeAnalysis.FSharpChecker: FSharp.Compiler.CodeAnalysis.FSharpChecker Instance
FSharp.Compiler.CodeAnalysis.FSharpChecker: FSharp.Compiler.CodeAnalysis.FSharpChecker get_Instance()
FSharp.Compiler.CodeAnalysis.FSharpChecker: FSharp.Compiler.CodeAnalysis.FSharpProjectOptions GetProjectOptionsFromCommandLineArgs(System.String, System.String[], Microsoft.FSharp.Core.FSharpOption`1[System.DateTime], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2138,7 +2138,7 @@ FSharp.Compiler.CodeAnalysis.FSharpCheckProjectResults: System.String[] Dependen
FSharp.Compiler.CodeAnalysis.FSharpCheckProjectResults: System.String[] get_DependencyFiles()
FSharp.Compiler.CodeAnalysis.FSharpChecker: Boolean UsesTransparentCompiler
FSharp.Compiler.CodeAnalysis.FSharpChecker: Boolean get_UsesTransparentCompiler()
FSharp.Compiler.CodeAnalysis.FSharpChecker: FSharp.Compiler.CodeAnalysis.FSharpChecker Create(Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.FSharpFunc`2[System.Tuple`2[System.String,System.DateTime],Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[System.Object,System.IntPtr,System.Int32]]]], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.CodeAnalysis.DocumentSource], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean])
FSharp.Compiler.CodeAnalysis.FSharpChecker: FSharp.Compiler.CodeAnalysis.FSharpChecker Create(Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.FSharpFunc`2[System.Tuple`2[System.String,System.DateTime],Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[System.Object,System.IntPtr,System.Int32]]]], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.CodeAnalysis.DocumentSource], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean])
FSharp.Compiler.CodeAnalysis.FSharpChecker: FSharp.Compiler.CodeAnalysis.FSharpChecker Instance
FSharp.Compiler.CodeAnalysis.FSharpChecker: FSharp.Compiler.CodeAnalysis.FSharpChecker get_Instance()
FSharp.Compiler.CodeAnalysis.FSharpChecker: FSharp.Compiler.CodeAnalysis.FSharpProjectOptions GetProjectOptionsFromCommandLineArgs(System.String, System.String[], Microsoft.FSharp.Core.FSharpOption`1[System.DateTime], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean])
Expand Down
2 changes: 0 additions & 2 deletions tests/FSharp.Test.Utilities/ProjectGeneration.fs
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,6 @@ type ProjectWorkflowBuilder
?checker: FSharpChecker,
?useGetSource,
?useChangeNotifications,
?useSyntaxTreeCache,
?useTransparentCompiler,
?runTimeout,
?autoStart,
Expand Down Expand Up @@ -973,7 +972,6 @@ type ProjectWorkflowBuilder
enablePartialTypeChecking = defaultArg enablePartialTypeChecking true,
captureIdentifiersWhenParsing = true,
documentSource = (if useGetSource then DocumentSource.Custom getSource else DocumentSource.FileSystem),
useSyntaxTreeCache = defaultArg useSyntaxTreeCache false,
useTransparentCompiler = useTransparentCompiler
))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ type internal FSharpWorkspaceServiceFactory [<Composition.ImportingConstructor>]

let enableLiveBuffers = editorOptions.Advanced.IsUseLiveBuffersEnabled

let useSyntaxTreeCache = editorOptions.LanguageServicePerformance.UseSyntaxTreeCache

let enableInMemoryCrossProjectReferences =
editorOptions.LanguageServicePerformance.EnableInMemoryCrossProjectReferences

Expand Down Expand Up @@ -158,7 +156,6 @@ type internal FSharpWorkspaceServiceFactory [<Composition.ImportingConstructor>]
TelemetryEvents.LanguageServiceStarted,
[|
nameof enableLiveBuffers, enableLiveBuffers
nameof useSyntaxTreeCache, useSyntaxTreeCache
nameof enableParallelReferenceResolution, enableParallelReferenceResolution
nameof enableInMemoryCrossProjectReferences, enableInMemoryCrossProjectReferences
nameof enableFastFindReferences, enableFastFindReferences
Expand Down Expand Up @@ -199,7 +196,6 @@ type internal FSharpWorkspaceServiceFactory [<Composition.ImportingConstructor>]
}))
else
DocumentSource.FileSystem),
useSyntaxTreeCache = useSyntaxTreeCache,
useTransparentCompiler = useTransparentCompiler
)

Expand Down
2 changes: 0 additions & 2 deletions vsintegration/src/FSharp.Editor/Options/EditorOptions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ type LanguageServicePerformanceOptions =
EnableParallelReferenceResolution: bool
EnableFastFindReferencesAndRename: bool
EnablePartialTypeChecking: bool
UseSyntaxTreeCache: bool
KeepAllBackgroundResolutions: bool
KeepAllBackgroundSymbolUses: bool
EnableBackgroundItemKeyStoreAndSemanticClassification: bool
Expand All @@ -104,7 +103,6 @@ type LanguageServicePerformanceOptions =
EnableParallelReferenceResolution = false
EnableFastFindReferencesAndRename = true
EnablePartialTypeChecking = true
UseSyntaxTreeCache = FSharpExperimentalFeaturesEnabledAutomatically
KeepAllBackgroundResolutions = false
KeepAllBackgroundSymbolUses = false
EnableBackgroundItemKeyStoreAndSemanticClassification = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Microsoft.VisualStudio.FSharp.UIResources"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
d:DesignHeight="600" d:DesignWidth="400">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Microsoft.VisualStudio.FSharp.UIResources"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
d:DesignHeight="600" d:DesignWidth="400">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
Expand Down Expand Up @@ -48,9 +48,6 @@
<CheckBox x:Name="enablePartialTypeChecking"
IsChecked="{Binding EnablePartialTypeChecking}"
Content="{x:Static local:Strings.Enable_partial_type_checking}" />
<CheckBox x:Name="enableSyntaxTreeCache"
IsChecked="{Binding UseSyntaxTreeCache}"
Content="{x:Static local:Strings.Use_syntax_tree_cache}" />
</StackPanel>
</GroupBox>
<GroupBox Header="{x:Static local:Strings.IntelliSense_Performance}">
Expand Down
Loading
Loading