From 1062bbe65c0c0c1849f8858998b960f4b7059b63 Mon Sep 17 00:00:00 2001 From: Jimmy Byrd Date: Sun, 21 Apr 2024 18:34:21 -0400 Subject: [PATCH] Add flag for enabling transparent compiler support --- release/package.json | 7 ++++++- src/Core/LanguageService.fs | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/release/package.json b/release/package.json index de0706a7..f6da7d33 100644 --- a/release/package.json +++ b/release/package.json @@ -545,6 +545,11 @@ "description": "When selecting an external symbols in autocomplete, insert the full name to the editor rather than open its module/namespace. Also allow filtering suggestions by typing its full name. \n\n Requires \u0060FSharp.externalAutocomplete\u0060 enabled.", "type": "boolean" }, + "FSharp.fcs.transparentCompiler.enabled": { + "default": false, + "description": "EXPERIMENTAL: Enables the FSharp Cpmpiler Service's [transparent compiler](https://github.com/dotnet/fsharp/pull/15179) feature. Requires restart.", + "type": "boolean" + }, "FSharp.fsac.attachDebugger": { "default": false, "description": "Appends the \u0027--attachdebugger\u0027 argument to fsac, this will allow you to attach a debugger.", @@ -1791,4 +1796,4 @@ "url": "https://github.com/ionide/ionide-vscode-fsharp.git" }, "version": "7.18.2" -} \ No newline at end of file +} diff --git a/src/Core/LanguageService.fs b/src/Core/LanguageService.fs index ab5d84a8..77f5570e 100644 --- a/src/Core/LanguageService.fs +++ b/src/Core/LanguageService.fs @@ -675,6 +675,9 @@ Consider: let enableProjectGraph = "FSharp.enableMSBuildProjectGraph" |> Configuration.get false + let useTransparentCompiler = + "FSharp.fcs.transparentCompiler.enabled" |> Configuration.get false + let tryBool x = // Boolean.TryParse generates: TypeError: e.match is not a function if we don't call toString first match Boolean.TryParse(x.ToString()) with @@ -915,6 +918,8 @@ Consider: if fsacSilencedLogs <> null && fsacSilencedLogs.Length > 0 then yield "--filter" yield! fsacSilencedLogs + if useTransparentCompiler then + yield "--use-fcs-transparent-compiler" match c.storageUri with | Some uri -> let storageDir = uri.fsPath