@@ -39,6 +39,7 @@ module FcsCheckerService =
39
39
type FcsProject =
40
40
{ OutputPath: VirtualFileSystemPath
41
41
ProjectOptions: FSharpProjectOptions
42
+ ProjectSnapshot: FSharpProjectSnapshot option
42
43
ParsingOptions: FSharpParsingOptions
43
44
FileIndices: IDictionary < VirtualFileSystemPath , int >
44
45
ImplementationFilesWithSignatures: ISet < VirtualFileSystemPath >
@@ -88,25 +89,27 @@ type FcsProjectInvalidationType =
88
89
type FcsCheckerService ( lifetime : Lifetime , logger : ILogger , onSolutionCloseNotifier : OnSolutionCloseNotifier ,
89
90
settingsStore: ISettingsStore, locks: IShellLocks, configurations: RunsProducts.ProductConfigurations) =
90
91
91
- let checker =
92
- Environment.SetEnvironmentVariable( " FCS_CheckFileInProjectCacheSize" , " 20" )
93
-
94
- let settingsStoreLive = settingsStore.BindToContextLive( lifetime, ContextRange.ApplicationWide)
92
+ let settingsStoreLive = settingsStore.BindToContextLive( lifetime, ContextRange.ApplicationWide)
95
93
96
- let getSettingProperty name =
97
- let setting = SettingsUtil.getEntry< FSharpOptions> settingsStore name
98
- settingsStoreLive.GetValueProperty( lifetime, setting, null )
94
+ let getSettingProperty name =
95
+ let setting = SettingsUtil.getEntry< FSharpOptions> settingsStore name
96
+ settingsStoreLive.GetValueProperty( lifetime, setting, null )
99
97
98
+ let useTransparentCompiler = ( getSettingProperty " UseTransparentCompiler" ) .Value
99
+
100
+ let checker =
101
+ Environment.SetEnvironmentVariable( " FCS_CheckFileInProjectCacheSize" , " 20" )
100
102
let skipImpl = getSettingProperty " SkipImplementationAnalysis"
101
103
let analyzerProjectReferencesInParallel = getSettingProperty " ParallelProjectReferencesAnalysis"
102
-
104
+
103
105
lazy
104
106
let checker =
105
107
FSharpChecker.Create( projectCacheSize = 200 ,
106
108
keepAllBackgroundResolutions = false ,
107
109
keepAllBackgroundSymbolUses = false ,
108
110
enablePartialTypeChecking = skipImpl.Value,
109
- parallelReferenceResolution = analyzerProjectReferencesInParallel.Value)
111
+ parallelReferenceResolution = analyzerProjectReferencesInParallel.Value,
112
+ useTransparentCompiler = useTransparentCompiler)
110
113
111
114
checker
112
115
@@ -156,11 +159,15 @@ type FcsCheckerService(lifetime: Lifetime, logger: ILogger, onSolutionCloseNotif
156
159
| Some( parseResults, checkResults) -> Some({ ParseResults = parseResults; CheckResults = checkResults })
157
160
| _ ->
158
161
162
+
163
+
159
164
ProhibitTypeCheckCookie.AssertTypeCheckIsAllowed()
160
165
locks.AssertReadAccessAllowed()
161
166
x.AssertFcsAccessThread()
162
167
163
168
let psiModule = sourceFile.PsiModule
169
+ // check if is active ...
170
+ if useTransparentCompiler then ()
164
171
match x.FcsProjectProvider.GetFcsProject( psiModule) with
165
172
| None -> None
166
173
| Some fcsProject ->
0 commit comments