Skip to content

Commit

Permalink
Adds arbitrary additinal arguments to be passed to fsac
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAngryByrd committed Apr 24, 2024
1 parent ddb6b80 commit 16df5b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 9 additions & 1 deletion 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 Expand Up @@ -1791,4 +1799,4 @@
"url": "https://github.com/ionide/ionide-vscode-fsharp.git"
},
"version": "7.18.2"
}
}
6 changes: 5 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,9 @@ 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 16df5b8

Please sign in to comment.