Skip to content

Commit

Permalink
Adds arbitrary additinal arguments to be passed to fsac (#2004)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAngryByrd authored Apr 25, 2024
1 parent 85646a2 commit f8f3a17
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions release/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,14 @@
},
"type": "array"
},
"FSharp.fsac.fsacArgs": {
"default": [],
"description": "additional CLI arguments to be provided to FSAC itself. Useful for flags that aren't exposed in the settings or CLI arguments that only exist in custom built versions of FSAC. Requires restart.",
"items": {
"type": "string"
},
"type": "array"
},
"FSharp.fsac.gc.conserveMemory": {
"markdownDescription": "Configures the garbage collector to [conserve memory](https://learn.microsoft.com/en-us/dotnet/core/runtime-config/garbage-collector#conserve-memory) at the expense of more frequent garbage collections and possibly longer pause times. Acceptable values are 0-9. Any non-zero value will allow the [Large Object Heap](https://learn.microsoft.com/en-us/dotnet/standard/garbage-collection/large-object-heap) to be compacted automatically if it has too much fragmentation. Requires restart.",
"type": "integer",
Expand Down
5 changes: 4 additions & 1 deletion src/Core/LanguageService.fs
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,8 @@ Consider:

exeOpts.env <- exeEnv

let additionalFSACArgs = "FSharp.fsac.fsacArgs" |> Configuration.get [||]

let args =
[ yield! fsacDotnetArgs
yield fsacPath
Expand All @@ -920,7 +922,8 @@ Consider:
let storageDir = uri.fsPath
yield "--state-directory"
yield storageDir
| None -> () ]
| None -> ()
yield! additionalFSACArgs ]
|> ResizeArray

let executable = createEmpty<Executable>
Expand Down

0 comments on commit f8f3a17

Please sign in to comment.