Skip to content

Commit d0d4c0f

Browse files
authored
Remove unused useSyntaxTreeCache option (#17768)
1 parent 86b7584 commit d0d4c0f

47 files changed

Lines changed: 45 additions & 180 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/builder-caches.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/release-notes/.FSharp.Compiler.Service/9.0.200.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
### Changed
1212

1313
* Make ILTypeDef interface impls calculation lazy. ([PR #17392](https://github.com/dotnet/fsharp/pull/17392))
14+
* Remove non-functional useSyntaxTreeCache option. ([PR #17768](https://github.com/dotnet/fsharp/pull/17768))
1415
* Better ranges for CE `let!` and `use!` error reporting. ([PR #17712](https://github.com/dotnet/fsharp/pull/17712))
1516
* Better ranges for CE `do!` error reporting. ([PR #17779](https://github.com/dotnet/fsharp/pull/17779))
1617
* Better ranges for CE `match!`. ([PR #17789](https://github.com/dotnet/fsharp/pull/17789))

docs/release-notes/.VisualStudio/17.12.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

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

1011

1112
### Breaking Changes

src/Compiler/Service/BackgroundCompiler.fs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,7 @@ type internal BackgroundCompiler
266266
parallelReferenceResolution,
267267
captureIdentifiersWhenParsing,
268268
getSource: (string -> Async<ISourceText option>) option,
269-
useChangeNotifications,
270-
useSyntaxTreeCache
269+
useChangeNotifications
271270
) as self =
272271

273272
let beforeFileChecked = Event<string * FSharpProjectOptions>()
@@ -403,8 +402,7 @@ type internal BackgroundCompiler
403402
parallelReferenceResolution,
404403
captureIdentifiersWhenParsing,
405404
getSource,
406-
useChangeNotifications,
407-
useSyntaxTreeCache
405+
useChangeNotifications
408406
)
409407

410408
match builderOpt with

src/Compiler/Service/BackgroundCompiler.fsi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,7 @@ type internal BackgroundCompiler =
235235
parallelReferenceResolution: ParallelReferenceResolution *
236236
captureIdentifiersWhenParsing: bool *
237237
getSource: (string -> Async<ISourceText option>) option *
238-
useChangeNotifications: bool *
239-
useSyntaxTreeCache: bool ->
238+
useChangeNotifications: bool ->
240239
BackgroundCompiler
241240

242241
static member ActualCheckFileCount: int

src/Compiler/Service/IncrementalBuild.fs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,6 @@ type IncrementalBuilderInitialState =
888888
defaultTimeStamp: DateTime
889889
mutable isImportsInvalidated: bool
890890
useChangeNotifications: bool
891-
useSyntaxTreeCache: bool
892891
}
893892

894893
static member Create
@@ -910,8 +909,7 @@ type IncrementalBuilderInitialState =
910909
#endif
911910
allDependencies,
912911
defaultTimeStamp: DateTime,
913-
useChangeNotifications: bool,
914-
useSyntaxTreeCache
912+
useChangeNotifications: bool
915913
) =
916914

917915
let initialState =
@@ -937,7 +935,6 @@ type IncrementalBuilderInitialState =
937935
defaultTimeStamp = defaultTimeStamp
938936
isImportsInvalidated = false
939937
useChangeNotifications = useChangeNotifications
940-
useSyntaxTreeCache = useSyntaxTreeCache
941938
}
942939
#if !NO_TYPEPROVIDERS
943940
importsInvalidatedByTypeProvider.Publish.Add(fun () -> initialState.isImportsInvalidated <- true)
@@ -1409,8 +1406,7 @@ type IncrementalBuilder(initialState: IncrementalBuilderInitialState, state: Inc
14091406
parallelReferenceResolution,
14101407
captureIdentifiersWhenParsing,
14111408
getSource,
1412-
useChangeNotifications,
1413-
useSyntaxTreeCache
1409+
useChangeNotifications
14141410
) =
14151411

14161412
let useSimpleResolutionSwitch = "--simpleresolution"
@@ -1652,8 +1648,7 @@ type IncrementalBuilder(initialState: IncrementalBuilderInitialState, state: Inc
16521648
#endif
16531649
allDependencies,
16541650
defaultTimeStamp,
1655-
useChangeNotifications,
1656-
useSyntaxTreeCache
1651+
useChangeNotifications
16571652
)
16581653

16591654
let builder = IncrementalBuilder(initialState, IncrementalBuilderState.Create(initialState))

src/Compiler/Service/IncrementalBuild.fsi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,7 @@ type internal IncrementalBuilder =
296296
parallelReferenceResolution: ParallelReferenceResolution *
297297
captureIdentifiersWhenParsing: bool *
298298
getSource: (string -> Async<ISourceText option>) option *
299-
useChangeNotifications: bool *
300-
useSyntaxTreeCache: bool ->
299+
useChangeNotifications: bool ->
301300
Async<IncrementalBuilder option * FSharpDiagnostic[]>
302301

303302
/// Generalized Incremental Builder. This is exposed only for unit testing purposes.

src/Compiler/Service/TransparentCompiler.fs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,7 @@ type internal TransparentCompiler
326326
parallelReferenceResolution,
327327
captureIdentifiersWhenParsing,
328328
getSource: (string -> Async<ISourceText option>) option,
329-
useChangeNotifications,
330-
useSyntaxTreeCache
329+
useChangeNotifications
331330
) as self =
332331

333332
let documentSource =
@@ -374,8 +373,7 @@ type internal TransparentCompiler
374373
parallelReferenceResolution,
375374
captureIdentifiersWhenParsing,
376375
getSource,
377-
useChangeNotifications,
378-
useSyntaxTreeCache
376+
useChangeNotifications
379377
)
380378
:> IBackgroundCompiler
381379

src/Compiler/Service/TransparentCompiler.fsi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ type internal TransparentCompiler =
155155
parallelReferenceResolution: ParallelReferenceResolution *
156156
captureIdentifiersWhenParsing: bool *
157157
getSource: (string -> Async<ISourceText option>) option *
158-
useChangeNotifications: bool *
159-
useSyntaxTreeCache: bool ->
158+
useChangeNotifications: bool ->
160159
TransparentCompiler
161160

162161
member FindReferencesInFile:

src/Compiler/Service/service.fs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ type FSharpChecker
125125
captureIdentifiersWhenParsing,
126126
getSource,
127127
useChangeNotifications,
128-
useSyntaxTreeCache,
129128
useTransparentCompiler
130129
) =
131130

@@ -144,8 +143,7 @@ type FSharpChecker
144143
parallelReferenceResolution,
145144
captureIdentifiersWhenParsing,
146145
getSource,
147-
useChangeNotifications,
148-
useSyntaxTreeCache
146+
useChangeNotifications
149147
)
150148
:> IBackgroundCompiler
151149
else
@@ -162,8 +160,7 @@ type FSharpChecker
162160
parallelReferenceResolution,
163161
captureIdentifiersWhenParsing,
164162
getSource,
165-
useChangeNotifications,
166-
useSyntaxTreeCache
163+
useChangeNotifications
167164
)
168165
:> IBackgroundCompiler
169166

@@ -209,7 +206,6 @@ type FSharpChecker
209206
?parallelReferenceResolution: bool,
210207
?captureIdentifiersWhenParsing: bool,
211208
?documentSource: DocumentSource,
212-
?useSyntaxTreeCache: bool,
213209
?useTransparentCompiler: bool
214210
) =
215211

@@ -238,8 +234,6 @@ type FSharpChecker
238234
| Some(DocumentSource.Custom _) -> true
239235
| _ -> false
240236

241-
let useSyntaxTreeCache = defaultArg useSyntaxTreeCache true
242-
243237
if keepAssemblyContents && enablePartialTypeChecking then
244238
invalidArg "enablePartialTypeChecking" "'keepAssemblyContents' and 'enablePartialTypeChecking' cannot be both enabled."
245239

@@ -261,7 +255,6 @@ type FSharpChecker
261255
| Some(DocumentSource.Custom f) -> Some f
262256
| _ -> None),
263257
useChangeNotifications,
264-
useSyntaxTreeCache,
265258
useTransparentCompiler
266259
)
267260

0 commit comments

Comments
 (0)