Skip to content

Commit

Permalink
Add flag for enabling transparent compiler support
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAngryByrd committed Apr 21, 2024
1 parent ddb6b80 commit 1062bbe
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 @@ -1791,4 +1796,4 @@
"url": "https://github.com/ionide/ionide-vscode-fsharp.git"
},
"version": "7.18.2"
}
}
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 @@ -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
Expand Down

0 comments on commit 1062bbe

Please sign in to comment.