Skip to content

Commit

Permalink
Add flag for enabling transparent compiler support (#2003)
Browse files Browse the repository at this point in the history
Co-authored-by: Chet Husk <baronfel@users.noreply.github.com>
  • Loading branch information
TheAngryByrd and baronfel authored May 15, 2024
1 parent 0e0284e commit 62c23dc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion release/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -1804,4 +1809,4 @@
"url": "https://github.com/ionide/ionide-vscode-fsharp.git"
},
"version": "7.19.1"
}
}
5 changes: 5 additions & 0 deletions src/Core/LanguageService.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -917,6 +920,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
Expand Down

0 comments on commit 62c23dc

Please sign in to comment.