Skip to content

Commit

Permalink
fix problems
Browse files Browse the repository at this point in the history
  • Loading branch information
dsyme committed Jul 20, 2016
1 parent 0d92803 commit b7bb99d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/fsharp/CompileOps.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4948,7 +4948,10 @@ module private ScriptPreprocessClosure =

let loadedSources = (!tcConfig).GetAvailableLoadedSources() |> List.map AddFileIfNotSeen |> List.concat
(loadedSources |> List.map FindClosure |> List.concat)
@ [ClosedSourceFile(filename,m,Some(input),!errors,!warnings,!noWarns)]
@
(if observedSources.HaveSeen(filename) then []
else [ClosedSourceFile(filename,m,Some(input),!errors,!warnings,!noWarns)])

| None -> [ClosedSourceFile(filename,m,None,!errors,!warnings,[])]

closureDirectives |> List.map FindClosure |> List.concat, !tcConfig
Expand Down Expand Up @@ -5042,7 +5045,7 @@ module private ScriptPreprocessClosure =
/// Used from fsi.fs and fsc.fs, for #load and command line
let GetFullClosureOfScriptFiles(tcConfig:TcConfig,files:(string*range) list,codeContext,_useDefaultScriptingReferences:bool,lexResourceManager:Lexhelp.LexResourceManager) =
let mainFile = fst (List.head files)
let protoClosure = files |> List.map (fun (filename,m)->SourceFileOfFilename(filename,m,tcConfig.inputCodePage)) |> List.concat |> List.rev // Reverse to put them in the order they will be extracted later
let protoClosure = files |> List.map (fun (filename,m)->SourceFileOfFilename(filename,m,tcConfig.inputCodePage)) |> List.concat // Reverse to put them in the order they will be extracted later
let finalClosure,tcConfig = FindClosureDirectives(protoClosure,tcConfig,codeContext,lexResourceManager)
GetLoadClosure(mainFile,finalClosure,tcConfig,codeContext)

Expand Down

0 comments on commit b7bb99d

Please sign in to comment.