From f221cea3894538fd3fc20c7a26af78ee11a2a6bf Mon Sep 17 00:00:00 2001 From: Matthias Dittrich Date: Mon, 21 May 2018 12:12:29 +0200 Subject: [PATCH] Add tests and fix https://github.com/fsharp/FAKE/issues/1947 --- src/app/Fake.Runtime/CoreCache.fs | 2 +- src/app/Fake.Runtime/HashGeneration.fs | 74 +++++++++++----- src/test/Fake.Core.UnitTests/Fake.Runtime.fs | 92 ++++++++++++++++++++ 3 files changed, 143 insertions(+), 25 deletions(-) diff --git a/src/app/Fake.Runtime/CoreCache.fs b/src/app/Fake.Runtime/CoreCache.fs index e4f0d03a8c2..eef032929cc 100644 --- a/src/app/Fake.Runtime/CoreCache.fs +++ b/src/app/Fake.Runtime/CoreCache.fs @@ -307,7 +307,7 @@ let prepareContext (config:FakeConfig) (cache:ICachingProvider) = let getHashUncached () = //TODO this is only calculating the hash for the input file, not anything #load-ed - let allScriptContents = getAllScripts config.CompileOptions.FsiOptions.Defines config.ScriptTokens config.ScriptFilePath + let allScriptContents = getAllScripts config.CompileOptions.FsiOptions.Defines config.ScriptTokens.Value config.ScriptFilePath let getOpts (c:CompileOptions) = c.FsiOptions.AsArgs // @ c.CompileReferences allScriptContents, getScriptHash allScriptContents (getOpts config.CompileOptions) diff --git a/src/app/Fake.Runtime/HashGeneration.fs b/src/app/Fake.Runtime/HashGeneration.fs index 706aace504e..51e8236eb74 100644 --- a/src/app/Fake.Runtime/HashGeneration.fs +++ b/src/app/Fake.Runtime/HashGeneration.fs @@ -17,31 +17,32 @@ type Script = { let getAllScriptContents (pathsAndContents : seq