From 2dfa90ae7ac7a06819db4ae1191a058658c81f37 Mon Sep 17 00:00:00 2001 From: Alfonso Garcia-Caro Date: Tue, 28 Jun 2016 00:03:44 +0200 Subject: [PATCH] Replace previous commit with new fix --- src/fsharp/CompileOps.fs | 5 ++--- src/fsharp/vs/service.fs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/fsharp/CompileOps.fs b/src/fsharp/CompileOps.fs index b32174f885..49c11ad003 100755 --- a/src/fsharp/CompileOps.fs +++ b/src/fsharp/CompileOps.fs @@ -4947,8 +4947,7 @@ module private ScriptPreprocessClosure = [ClosedSourceFile(filename,m,None,[],[],[])] // Don't traverse into .fs leafs. let loadedSources = (!tcConfig).GetAvailableLoadedSources() |> List.rev |> List.map AddFileIfNotSeen |> List.concat - (loadedSources |> List.map FindClosure |> List.concat) - @ [ClosedSourceFile(filename,m,Some(input),!errors,!warnings,!noWarns)] + ClosedSourceFile(filename,m,Some(input),!errors,!warnings,!noWarns) :: loadedSources |> List.map FindClosure |> List.concat // Final closure is in reverse order. Keep the closed source at the top. | None -> [ClosedSourceFile(filename,m,None,!errors,!warnings,[])] closureDirectives |> List.map FindClosure |> List.concat, !tcConfig @@ -5010,7 +5009,7 @@ module private ScriptPreprocessClosure = let rootWarnings = rootWarnings |> List.filter isRootRange let result : LoadClosure = - { SourceFiles = List.groupByFirst !sourceFiles |> List.rev + { SourceFiles = List.groupByFirst !sourceFiles References = List.groupByFirst references UnresolvedReferences = unresolvedReferences Inputs = !sourceInputs diff --git a/src/fsharp/vs/service.fs b/src/fsharp/vs/service.fs index 397ea0eef2..d8bee77aae 100644 --- a/src/fsharp/vs/service.fs +++ b/src/fsharp/vs/service.fs @@ -2549,7 +2549,7 @@ type BackgroundCompiler(projectCacheSize, keepAssemblyContents, keepAllBackgroun let co = { ProjectFileName = filename + ".fsproj" // Make a name that is unique in this directory. - ProjectFileNames = fas.SourceFiles |> List.map fst |> List.toArray + ProjectFileNames = fas.Inputs |> List.map fst |> List.toArray OtherOptions = otherFlags ReferencedProjects= [| |] IsIncompleteTypeCheckEnvironment = false