From 4462a6f64b9e6efbe2b33d7b88edc680d0b89378 Mon Sep 17 00:00:00 2001 From: rb Date: Wed, 28 Feb 2024 09:04:14 +0100 Subject: [PATCH] Update DEVGUIDE with using custom FSharp.Core --- DEVGUIDE.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/DEVGUIDE.md b/DEVGUIDE.md index f8029b45466..5110e331095 100644 --- a/DEVGUIDE.md +++ b/DEVGUIDE.md @@ -130,7 +130,7 @@ Once the "proto" compiler is built, it won't be built again, so you may want to ## Using your custom compiler to build other projects -Building the compiler using `build.cmd` or `build.sh` will output artifacts in `artifacts\bin`. +Building the compiler using `build.cmd` or `build.sh` will output artifacts in `artifacts\bin`. To use your custom build of `Fsc`, add the `DotnetFscCompilerPath` property to your project's `.fsproj` file, adjusted to point at your local build directory, build configuration, and target framework as appropriate: @@ -140,6 +140,25 @@ To use your custom build of `Fsc`, add the `DotnetFscCompilerPath` property to y ``` +### Changes in FSharp.Core + +The FSharp compiler uses an implicit FSharp.Core. This means that if you introduce changes to FSharp.Core and want to use it in a project, you need to disable the implicit version used by the compiler, and add a reference to your custom FSharp.Core dll. Both are done in the `.fsproj` file of your project. + +Disabling the implicit FSharp.Core is done with +``` + + true + +``` +and referencing your custom FSharp.Core, available after you build the compiler, is done with +``` + + + D:\Git\fsharp\artifacts\bin\FSharp.Core\Debug\netstandard2.1\FSharp.Core.dll<\HintPath> + + +``` + ## Updating FSComp.fs, FSComp.resx and XLF If your changes involve modifying the list of language keywords in any way, (e.g. when implementing a new keyword), the XLF localization files need to be synced with the corresponding resx files. This can be done automatically by running