diff --git a/src/fsharp/FSharp.Build/Fsc.fs b/src/fsharp/FSharp.Build/Fsc.fs index a6e262089b5..2b491c73837 100644 --- a/src/fsharp/FSharp.Build/Fsc.fs +++ b/src/fsharp/FSharp.Build/Fsc.fs @@ -589,7 +589,7 @@ type public Fsc () as this = override fsc.GenerateResponseFileCommands() = let builder = generateCommandLineBuilder () - builder.GetCapturedArguments() |> Seq.fold(fun acc f -> acc + f + Environment.NewLine) "" + builder.GetCapturedArguments() |> String.concat Environment.NewLine // expose this to internal components (for nunit testing) member internal fsc.InternalGenerateCommandLineCommands() = diff --git a/src/fsharp/FSharp.Build/Fsi.fs b/src/fsharp/FSharp.Build/Fsi.fs index ed1aae5e132..1b893cbac60 100644 --- a/src/fsharp/FSharp.Build/Fsi.fs +++ b/src/fsharp/FSharp.Build/Fsi.fs @@ -322,7 +322,7 @@ type public Fsi () as this = override fsi.GenerateResponseFileCommands() = let builder = generateCommandLineBuilder () - builder.GetCapturedArguments() |> Seq.fold(fun acc f -> acc + f + Environment.NewLine) "" + builder.GetCapturedArguments() |> String.concat Environment.NewLine // expose this to internal components (for nunit testing) member internal fsi.InternalGenerateCommandLineCommands() = diff --git a/vsintegration/tests/UnitTests/Tests.Build.fs b/vsintegration/tests/UnitTests/Tests.Build.fs index 7d4bd4f5160..5a164806352 100644 --- a/vsintegration/tests/UnitTests/Tests.Build.fs +++ b/vsintegration/tests/UnitTests/Tests.Build.fs @@ -93,7 +93,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -109,7 +109,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -125,7 +125,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -143,7 +143,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -159,7 +159,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -174,7 +174,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -190,7 +190,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -206,7 +206,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -222,7 +222,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -238,7 +238,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -254,7 +254,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -270,7 +270,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -285,7 +285,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -301,7 +301,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -318,7 +318,7 @@ type Build() = "--highentropyva-" + Environment.NewLine + "--nocopyfsharpcore" + Environment.NewLine + "--yadda" + Environment.NewLine + - "yadda" + Environment.NewLine) + "yadda") cmd [] @@ -334,7 +334,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -350,7 +350,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -366,7 +366,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -382,7 +382,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -399,7 +399,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -416,7 +416,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -433,7 +433,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -449,7 +449,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -468,7 +468,7 @@ type Build() = "--highentropyva-" + Environment.NewLine + "--nocopyfsharpcore" + Environment.NewLine + src + Environment.NewLine + - src + Environment.NewLine) + src) cmd () @@ -485,7 +485,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -501,7 +501,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -517,7 +517,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -532,7 +532,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -547,7 +547,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -562,7 +562,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -576,7 +576,7 @@ type Build() = "--fullpaths" + Environment.NewLine + "--flaterrors" + Environment.NewLine + "--highentropyva+" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -591,7 +591,7 @@ type Build() = "--flaterrors" + Environment.NewLine + "--subsystemversion:6.02" + Environment.NewLine + "--highentropyva-" + Environment.NewLine + - "--nocopyfsharpcore" + Environment.NewLine) + "--nocopyfsharpcore") cmd [] @@ -665,7 +665,7 @@ type Build() = "--other:internal quote" + Environment.NewLine + "blah" + Environment.NewLine + "foo.fs" + Environment.NewLine + - @"C:\Program Files\spaces.fs" + Environment.NewLine + @"C:\Program Files\spaces.fs" AssertEqual expected cmd @@ -710,4 +710,4 @@ type Build() = "blah" |] AssertEqual expectedFlags hostObject.Flags let expectedSources = [| "foo.fs"; "C:\\Program Files\\spaces.fs" |] - AssertEqual expectedSources hostObject.Sources \ No newline at end of file + AssertEqual expectedSources hostObject.Sources