diff --git a/.fake/build.fsx/loadDependencies.fsx b/.fake/build.fsx/intellisense.fsx similarity index 100% rename from .fake/build.fsx/loadDependencies.fsx rename to .fake/build.fsx/intellisense.fsx diff --git a/build.fsx b/build.fsx index d4cad0c958b..1df35655bc4 100644 --- a/build.fsx +++ b/build.fsx @@ -1,7 +1,7 @@ #if DOTNETCORE -// We need to use this for now as "regular" Fake breaks when its caching logic cannot find "loadDependencies.fsx". -// This is the reason why we need to checkin the "loadDependencies.fsx" file for now... -#load ".fake/build.fsx/loadDependencies.fsx" +// We need to use this for now as "regular" Fake breaks when its caching logic cannot find "intellisense.fsx". +// This is the reason why we need to checkin the "intellisense.fsx" file for now... +#load ".fake/build.fsx/intellisense.fsx" open System open System.IO diff --git a/help/markdown/fake-fake5-custom-modules.md b/help/markdown/fake-fake5-custom-modules.md index b66ad6ba659..073973b2bd7 100644 --- a/help/markdown/fake-fake5-custom-modules.md +++ b/help/markdown/fake-fake5-custom-modules.md @@ -45,11 +45,11 @@ One example would be: [lang=fsharp] (* -- Fake Dependencies paket-inline source https://nuget.org/api/v2 - + nuget Fake.Core.Targets prerelease nuget MyTaskNuGetPackage -- Fake Dependencies -- *) - #load "./.fake/build.fsx/loadDependencies.fsx" + #load "./.fake/build.fsx/intellisense.fsx" open Fake.Core open MyCustomTask diff --git a/help/markdown/fake-fake5-modules.md b/help/markdown/fake-fake5-modules.md index 2109d6d7ed0..13eec200f76 100644 --- a/help/markdown/fake-fake5-modules.md +++ b/help/markdown/fake-fake5-modules.md @@ -24,7 +24,7 @@ For example create a new file `build.fsx` with ```fsharp // Use this for IDE support. Not required by FAKE 5. Change "build.fsx" to the name of your script. -#load ".fake/build.fsx/loadDependencies.fsx" +#load ".fake/build.fsx/intellisense.fsx" open Fake.Core.Targets @@ -55,12 +55,13 @@ To tell Fake which dependencies are needed a script can start with a header as w (* -- Fake Dependencies ***header*** *** Dependencies *** -- Fake Dependencies -- *) -#load "./.fake/build.fsx/loadDependencies.fsx" +#load "./.fake/build.fsx/intellisense.fsx" ``` The last line `#load` is not requiredby FAKE 5, however this way the file can still be edited in editors (after restoring packages initially). -Fake will write a `loadDependencies.fsx` file for you importing all required references. +Fake will write an `intellisense.fsx` file for you importing all required references. +Please note that as of right now, Fake doesn't write anything useful into this file, yet. There are two headers known by Fake: @@ -73,7 +74,7 @@ To reference a FAKE group explicitely you can put the following at the top of yo file ./paket.dependencies group netcorebuild -- Fake Dependencies -- *) - #load "./.fake/build.fsx/loadDependencies.fsx" + #load "./.fake/build.fsx/intellisense.fsx" This header will reference a `paket.dependencies` file and a group within. @@ -87,7 +88,7 @@ To write your build dependencies in-line you can put the following at the top of nuget Fake.Core.Targets prerelease -- Fake Dependencies -- *) - #load "./.fake/build.fsx/loadDependencies.fsx" + #load "./.fake/build.fsx/intellisense.fsx" This has the advantage that your build-script is now "standalone" and no separate `paket.dependencies` is required. We still recommend to add (`git add -f`, because usually you have `.fake` folder gitignored) the generated `paket.lock` (in `.fake//`) to your repository to have reproducable script runs. diff --git a/integrationtests/core-context-exists/before/context-exists.fsx b/integrationtests/core-context-exists/before/context-exists.fsx index 6212a0d0480..b5ba93d4866 100644 --- a/integrationtests/core-context-exists/before/context-exists.fsx +++ b/integrationtests/core-context-exists/before/context-exists.fsx @@ -5,7 +5,7 @@ source ../../../nuget/dotnetcore nuget Fake.Core.Context prerelease -- Fake Dependencies -- *) -#load ".fake/context-exists.fsx/loadDependencies.fsx" +#load ".fake/context-exists.fsx/intellisense.fsx" printfn "loading context" let context = Fake.Core.Context.forceFakeContext() diff --git a/integrationtests/core-reference-fake-core-targets/before/reference_fake-targets.fsx b/integrationtests/core-reference-fake-core-targets/before/reference_fake-targets.fsx index 2d360c6948e..5d842dc4083 100644 --- a/integrationtests/core-reference-fake-core-targets/before/reference_fake-targets.fsx +++ b/integrationtests/core-reference-fake-core-targets/before/reference_fake-targets.fsx @@ -8,7 +8,7 @@ nuget FSharp.Core prerelease printfn "before load" -#load ".fake/reference_fake-targets.fsx/loadDependencies.fsx" +#load ".fake/reference_fake-targets.fsx/intellisense.fsx" printfn "test_before open" diff --git a/integrationtests/core-reference-fake-runtime/before/reference_fake-runtime.fsx b/integrationtests/core-reference-fake-runtime/before/reference_fake-runtime.fsx index 37b75795a0f..14085929d9c 100644 --- a/integrationtests/core-reference-fake-runtime/before/reference_fake-runtime.fsx +++ b/integrationtests/core-reference-fake-runtime/before/reference_fake-runtime.fsx @@ -6,10 +6,10 @@ source ../../../nuget/dotnetcore nuget Fake.Runtime prerelease nuget FSharp.Core prerelease -- Fake Dependencies -- *) -#load ".fake/reference_fake-runtime.fsx/loadDependencies.fsx" +#load ".fake/reference_fake-runtime.fsx/intellisense.fsx" open Fake.Runtime printfn "Starting Build." Trace.traceFAKE "Some Info from FAKE" -printfn "Ending Build." \ No newline at end of file +printfn "Ending Build." diff --git a/integrationtests/core-use-external-paket-dependencies/before/use_external_dependencies.fsx b/integrationtests/core-use-external-paket-dependencies/before/use_external_dependencies.fsx index 7261c7e4f25..2ba4bca455e 100644 --- a/integrationtests/core-use-external-paket-dependencies/before/use_external_dependencies.fsx +++ b/integrationtests/core-use-external-paket-dependencies/before/use_external_dependencies.fsx @@ -2,10 +2,10 @@ file paket.dependencies group Main -- Fake Dependencies -- *) -#load ".fake/use_external_dependencies.fsx/loadDependencies.fsx" +#load ".fake/use_external_dependencies.fsx/intellisense.fsx" open Fake.Runtime printfn "Starting Build." Trace.traceFAKE "Some Info from FAKE" -printfn "Ending Build." \ No newline at end of file +printfn "Ending Build." diff --git a/src/app/Fake.Runtime/FakeRuntime.fs b/src/app/Fake.Runtime/FakeRuntime.fs index 36cbd66914b..3c87eb62925 100644 --- a/src/app/Fake.Runtime/FakeRuntime.fs +++ b/src/app/Fake.Runtime/FakeRuntime.fs @@ -115,10 +115,13 @@ let paketCachingProvider printDetails cacheDir (paketDependencies:Paket.Dependen let lockGroup = lockFile.GetGroup groupName // Write loadDependencies file (basically only for editor support) - let loadFile = Path.Combine (cacheDir, "loadDependencies.fsx") - if printDetails then Trace.log <| sprintf "Writing '%s'" loadFile + let intellisenseFile = Path.Combine (cacheDir, "intellisense.fsx") + if printDetails then Trace.log <| sprintf "Writing '%s'" intellisenseFile // TODO: Make sure to create #if !FAKE block, because we don't actually need it. - File.WriteAllText (loadFile, """printfn "loading dependencies... " """) + let intellisenseContents = + [| "// This file is needed for IDE support" + "printfn \"loading dependencies ...\"" |] + File.WriteAllLines (intellisenseFile, intellisenseContents) let rid = #if DOTNETCORE @@ -299,4 +302,4 @@ let prepareAndRunScriptRedirect printDetails fsiOptions scriptPath envVars onErr let prepareAndRunScript printDetails fsiOptions scriptPath envVars useCache = prepareAndRunScriptRedirect printDetails fsiOptions scriptPath envVars (printf "%s") (printf "%s") useCache -//#endif \ No newline at end of file +//#endif