Skip to content

Commit

Permalink
Fix file ordering when getting script options
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonsogarciacaro committed Jun 27, 2016
1 parent 8706db0 commit f40d819
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/fsharp/CompileOps.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4947,7 +4947,8 @@ module private ScriptPreprocessClosure =
[ClosedSourceFile(filename,m,None,[],[],[])] // Don't traverse into .fs leafs.

let loadedSources = (!tcConfig).GetAvailableLoadedSources() |> List.rev |> List.map AddFileIfNotSeen |> List.concat
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.
(loadedSources |> List.map FindClosure |> List.concat)
@ [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 @@ -5009,7 +5010,7 @@ module private ScriptPreprocessClosure =
let rootWarnings = rootWarnings |> List.filter isRootRange

let result : LoadClosure =
{ SourceFiles = List.groupByFirst !sourceFiles
{ SourceFiles = List.groupByFirst !sourceFiles |> List.rev
References = List.groupByFirst references
UnresolvedReferences = unresolvedReferences
Inputs = !sourceInputs
Expand Down

0 comments on commit f40d819

Please sign in to comment.