Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
don't keep tcEnvAtEnd for background states unless keepAllBackgroundR…
Browse files Browse the repository at this point in the history
…esolutions=true (#2388)
  • Loading branch information
dsyme authored and KevinRansom committed Feb 8, 2017
1 parent 8e66eca commit ab0d7a7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/fsharp/vs/IncrementalBuild.fs
Expand Up @@ -1427,8 +1427,8 @@ type IncrementalBuilder(frameworkTcImportsCache: FrameworkImportsCache, tcConfig
errorLogger.Warning(e)
frameworkTcImports

let tcEnvAtEndOfFile = GetInitialTcEnv (assemblyName, rangeStartup, tcConfig, tcImports, tcGlobals)
let tcState = GetInitialTcState (rangeStartup, assemblyName, tcConfig, tcGlobals, tcImports, niceNameGen, tcEnvAtEndOfFile)
let tcInitial = GetInitialTcEnv (assemblyName, rangeStartup, tcConfig, tcImports, tcGlobals)
let tcState = GetInitialTcState (rangeStartup, assemblyName, tcConfig, tcGlobals, tcImports, niceNameGen, tcInitial)
let loadClosureErrors =
[ match loadClosureOpt with
| None -> ()
Expand All @@ -1442,7 +1442,7 @@ type IncrementalBuilder(frameworkTcImportsCache: FrameworkImportsCache, tcConfig
tcImports=tcImports
tcState=tcState
tcConfig=tcConfig
tcEnvAtEndOfFile=tcEnvAtEndOfFile
tcEnvAtEndOfFile=tcInitial
tcResolutions=[]
tcSymbolUses=[]
topAttribs=None
Expand Down Expand Up @@ -1479,6 +1479,7 @@ type IncrementalBuilder(frameworkTcImportsCache: FrameworkImportsCache, tcConfig
/// Only keep the typed interface files when doing a "full" build for fsc.exe, otherwise just throw them away
let typedImplFiles = if keepAssemblyContents then typedImplFiles else []
let tcResolutions = if keepAllBackgroundResolutions then sink.GetResolutions() else TcResolutions.Empty
let tcEnvAtEndOfFile = (if keepAllBackgroundResolutions then tcEnvAtEndOfFile else tcState.TcEnvFromImpls)
let tcSymbolUses = sink.GetSymbolUses()
fileChecked.Trigger (filename)
return {tcAcc with tcState=tcState
Expand Down

0 comments on commit ab0d7a7

Please sign in to comment.