From f1cbbac47dd70c3deee72e9f6710f71a2ca55657 Mon Sep 17 00:00:00 2001 From: Colin Gravill Date: Wed, 19 Apr 2017 18:53:52 +0100 Subject: [PATCH 1/3] Safer check for source code option Current test fails on for example, --ws:"Bundle" (a WebSharper 4.x setting) --- .../FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs b/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs index 93adc72d28..baf8102279 100644 --- a/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs +++ b/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs @@ -20,7 +20,7 @@ type ProjectCracker = let referencedProjects = Array.map (fun (a, b) -> a, convert b) opts.ReferencedProjectOptions let sourceFiles, otherOptions = - opts.Options |> Array.partition (fun x -> Path.GetExtension(x).ToLower() = ".fs") + opts.Options |> Array.partition (fun x -> x.IndexOfAny(Path.GetInvalidPathChars()) = -1 && Path.GetExtension(x).ToLower() = ".fs") let sepChar = Path.DirectorySeparatorChar From a910704f717e1a06fe57deb17df7f23991836fee Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 20 Apr 2017 00:09:27 +0100 Subject: [PATCH 2/3] Update ProjectCracker.fs --- .../FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs b/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs index baf8102279..8abfe52e91 100644 --- a/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs +++ b/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs @@ -20,7 +20,7 @@ type ProjectCracker = let referencedProjects = Array.map (fun (a, b) -> a, convert b) opts.ReferencedProjectOptions let sourceFiles, otherOptions = - opts.Options |> Array.partition (fun x -> x.IndexOfAny(Path.GetInvalidPathChars()) = -1 && Path.GetExtension(x).ToLower() = ".fs") + opts.Options |> Array.partition (fun x -> not (FileSystem.IsInvalidPathShim(x)) && Path.GetExtension(x).ToLower() = ".fs") let sepChar = Path.DirectorySeparatorChar From 66baa58fb5818e13ed4bd29db2e0377a30885649 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 20 Apr 2017 00:25:04 +0100 Subject: [PATCH 3/3] Update ProjectCracker.fs --- .../FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs b/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs index 8abfe52e91..baf8102279 100644 --- a/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs +++ b/src/fsharp/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs @@ -20,7 +20,7 @@ type ProjectCracker = let referencedProjects = Array.map (fun (a, b) -> a, convert b) opts.ReferencedProjectOptions let sourceFiles, otherOptions = - opts.Options |> Array.partition (fun x -> not (FileSystem.IsInvalidPathShim(x)) && Path.GetExtension(x).ToLower() = ".fs") + opts.Options |> Array.partition (fun x -> x.IndexOfAny(Path.GetInvalidPathChars()) = -1 && Path.GetExtension(x).ToLower() = ".fs") let sepChar = Path.DirectorySeparatorChar