Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/fsharp/FSharp.Build/WriteCodeFragment.fs
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,19 @@ open System.Reflection"
let sb = StringBuilder().AppendLine(boilerplate).AppendLine()
let code = Array.fold (fun (sb:StringBuilder) (item:ITaskItem) -> sb.AppendLine(WriteCodeFragment.GenerateAttribute item)) sb _assemblyAttributes
code.AppendLine().AppendLine("do()") |> ignore
let fileName = _outputFile.ItemSpec
let outputFileItem =
if not (isNull _outputFile) && not (isNull _outputDirectory) && not (Path.IsPathRooted(_outputFile.ItemSpec)) then
TaskItem(Path.Combine(_outputDirectory.ItemSpec, _outputFile.ItemSpec)) :> ITaskItem
if not (isNull _outputFile) && not (isNull _outputDirectory) && not (Path.IsPathRooted(fileName)) then
TaskItem(Path.Combine(_outputDirectory.ItemSpec, fileName)) :> ITaskItem
elif isNull _outputFile then
let tempFile = Path.Combine(Path.GetTempPath(), sprintf "tmp%s.fs" (Guid.NewGuid().ToString("N")))
TaskItem(tempFile) :> ITaskItem
else
_outputFile
File.WriteAllText(_outputFile.ItemSpec, code.ToString())
let codeText = code.ToString()
let alreadyExists = (try File.Exists fileName && File.ReadAllText(fileName) = codeText with _ -> false)
if not alreadyExists then
File.WriteAllText(fileName, codeText)
_outputFile <- outputFileItem
true
with e ->
Expand Down
1 change: 0 additions & 1 deletion tests/scripts/compiler-perf-results.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,3 @@ https://github.com/manofstick/visualfsharp.git all-your-collections-are-belong-t
https://github.com/manofstick/visualfsharp.git all-your-collections-are-belong-to-us 87dafbc17b494c438b6db9e59e064736bd8a44e2 ba63403cb5898596c5e875a14ce22b33ef618c01 221.58 11.19 31.91 48.23 66.05 52.99
https://github.com/manofstick/visualfsharp.git all-your-collections-are-belong-to-us 87dafbc17b494c438b6db9e59e064736bd8a44e2 458e6c29d7e059a5a8a7b4cd7858c7d633fb5906 224.75 11.20 31.09 46.96 63.08 53.08
https://github.com/manofstick/visualfsharp.git all-your-collections-are-belong-to-us 87dafbc17b494c438b6db9e59e064736bd8a44e2 7e1fd6ac330f86597f3167e8067cfd805a89eec9 235.48 10.83 33.47 47.17 65.56 52.50