Skip to content

Commit f0e9d5a

Browse files
committed
Bump version to 7.8.5
1 parent 20f6d8f commit f0e9d5a

File tree

5 files changed

+44
-31
lines changed

5 files changed

+44
-31
lines changed

release/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### 7.8.5 - 26.07.2023
2+
* [Disable GCHeapCount and GCNoAffinitize for net6.0](https://github.com/ionide/ionide-vscode-fsharp/pull/1900) (Thanks @TheAngryByrd!)
3+
14
### 7.8.4 - 22.07.2023
25
* [Adds GCNoAffinitize setting](https://github.com/ionide/ionide-vscode-fsharp/pull/1898) (Thanks @TheAngryByrd!)
36

release/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -557,9 +557,9 @@
557557
"FSharp.fsac.gc.server"
558558
]
559559
},
560-
"Fsharp.fsac.gc.noAffinitize" : {
561-
"default" : true,
562-
"type" : "boolean",
560+
"Fsharp.fsac.gc.noAffinitize": {
561+
"default": true,
562+
"type": "boolean",
563563
"markdownDescription": "Specifies whether to [affinitize](https://learn.microsoft.com/en-us/dotnet/core/runtime-config/garbage-collector#affinitize) garbage collection threads with processors. To affinitize a GC thread means that it can only run on its specific CPU.. Applies to server garbage collection only. See [GCNoAffinitize](https://learn.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/runtime/gcnoaffinitize-element#remarks) for more details. [Only available on .NET 7 or higher](https://github.com/ionide/ionide-vscode-fsharp/issues/1899#issuecomment-1649009462). Requires restart.",
564564
"required": [
565565
"FSharp.fsac.gc.server"
@@ -1747,5 +1747,5 @@
17471747
"type": "git",
17481748
"url": "https://github.com/ionide/ionide-vscode-fsharp.git"
17491749
},
1750-
"version": "7.8.4"
1751-
}
1750+
"version": "7.8.5"
1751+
}

src/Core/LanguageService.fs

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ module LanguageService =
4141

4242
let private logger =
4343
ConsoleAndOutputChannelLogger(Some "LanguageService", Level.DEBUG, Some defaultOutputChannel, Some Level.DEBUG)
44+
4445
module Types =
4546
open Fable.Import.VSCode.Vscode
4647
type PlainNotification = { content: string }
@@ -605,7 +606,7 @@ Consider:
605606

606607
let mutable initFails = 0
607608

608-
let initializationFailureHandler (error: U3<ResponseError,Exception,obj option>) =
609+
let initializationFailureHandler (error: U3<ResponseError, Exception, obj option>) =
609610
if initFails < 5 then
610611
logger.Error($"Initialization failed: %%", error)
611612
initFails <- initFails + 1
@@ -615,25 +616,30 @@ Consider:
615616

616617

617618
let restarts = new ResizeArray<_>()
618-
let errorHandling = {
619619

620-
new ErrorHandler with
621-
member this.closed(): CloseAction =
622-
restarts.Add(1)
623-
if restarts |> Seq.length < 5 then
624-
CloseAction.Restart
625-
else
620+
let errorHandling =
621+
{
626622

627-
logger.Error("Server closed")
628-
CloseAction.DoNotRestart
629-
member this.error(error: Exception, message: Message, count: float): ErrorAction =
630-
logger.Error($"Error from server: {error} {message} {count}")
631-
if count < 3.0 then
632-
ErrorAction.Continue
633-
else
634-
ErrorAction.Shutdown
623+
new ErrorHandler with
624+
member this.closed() : CloseAction =
625+
restarts.Add(1)
635626

636-
}
627+
if restarts |> Seq.length < 5 then
628+
CloseAction.Restart
629+
else
630+
631+
logger.Error("Server closed")
632+
CloseAction.DoNotRestart
633+
634+
member this.error(error: Exception, message: Message, count: float) : ErrorAction =
635+
logger.Error($"Error from server: {error} {message} {count}")
636+
637+
if count < 3.0 then
638+
ErrorAction.Continue
639+
else
640+
ErrorAction.Shutdown
641+
642+
}
637643

638644
let initOpts = createObj [ "AutomaticWorkspaceInit" ==> false ]
639645

@@ -650,7 +656,7 @@ Consider:
650656
// Worth keeping around for debug purposes
651657
// opts.traceOutputChannel <- Some defaultOutputChannel
652658
// opts.outputChannel <- Some defaultOutputChannel
653-
opts.initializationFailedHandler <- Some (!! initializationFailureHandler)
659+
opts.initializationFailedHandler <- Some(!!initializationFailureHandler)
654660

655661
opts.initializationOptions <- Some !^(Some initOpts)
656662
opts?markdown <- createObj [ "isTrusted" ==> true; "supportHtml" ==> true ]
@@ -862,14 +868,17 @@ Consider:
862868
// Only set DOTNET_GCHeapCount if we're on .NET 7 or higher
863869
// .NET 6 has some issues with this env var on linux
864870
// https://github.com/ionide/ionide-vscode-fsharp/issues/1899
865-
let versionSupportingEnvVars = (semver.parse (Some (U2.Case1 "7.0.0"))).Value
866-
let isNet7orHigher = semver.cmp(U2.Case2 sdkVersion, Operator.GTE, U2.Case2 versionSupportingEnvVars)
871+
let versionSupportingEnvVars = (semver.parse (Some(U2.Case1 "7.0.0"))).Value
872+
873+
let isNet7orHigher =
874+
semver.cmp (U2.Case2 sdkVersion, Operator.GTE, U2.Case2 versionSupportingEnvVars)
875+
867876
let fsacEnvVars =
868877
[ yield! fsacEnvVars
869878
if isNet7orHigher then
870-
// it doesn't really make sense to set GCNoAffinitize without setting GCHeapCount
871-
yield "DOTNET_GCNoAffinitize", box (boolToInt gcNoAffinitize) // https://learn.microsoft.com/en-us/dotnet/core/runtime-config/garbage-collector#affinitize
872-
yield "DOTNET_GCHeapCount", box (gcHeapCount.ToString("X")) // Requires hexadecimal value https://learn.microsoft.com/en-us/dotnet/core/runtime-config/garbage-collector#heap-count
879+
// it doesn't really make sense to set GCNoAffinitize without setting GCHeapCount
880+
yield "DOTNET_GCNoAffinitize", box (boolToInt gcNoAffinitize) // https://learn.microsoft.com/en-us/dotnet/core/runtime-config/garbage-collector#affinitize
881+
yield "DOTNET_GCHeapCount", box (gcHeapCount.ToString("X")) // Requires hexadecimal value https://learn.microsoft.com/en-us/dotnet/core/runtime-config/garbage-collector#heap-count
873882

874883
yield "DOTNET_GCConserveMemory", box gcConserveMemory //https://learn.microsoft.com/en-us/dotnet/core/runtime-config/garbage-collector#conserve-memory
875884
yield "DOTNET_GCServer", box (boolToInt gcServer) // https://learn.microsoft.com/en-us/dotnet/core/runtime-config/garbage-collector#workstation-vs-server
@@ -978,7 +987,7 @@ Consider:
978987
promise {
979988
try
980989
let! startOpts = getOptions c
981-
logger.Debug ("F# language server options: %%",startOpts)
990+
logger.Debug("F# language server options: %%", startOpts)
982991
let cl = createClient startOpts
983992
registerCustomNotifications cl
984993
let started = cl.start ()

src/Core/Logging.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ module Logging =
6868

6969
out.appendLine (formattedLogLine)
7070

71-
let private writeToFile level source template args =
71+
let private writeToFile level source template args =
7272
let formattedMessage = Util.format (template, args)
7373

7474
let formattedLogLine =
@@ -94,7 +94,7 @@ module Logging =
9494
if source = Some "IONIDE-FSAC" then
9595
try
9696
if string args.[0] <> "parse" then
97-
writeToFile level source template args
97+
writeToFile level source template args
9898
with _ ->
9999
() // Do nothing
100100

src/fsharp.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ let activate (context: ExtensionContext) : JS.Promise<Api> =
3939
let progressOpts = createEmpty<ProgressOptions>
4040
progressOpts.location <- U2.Case1 ProgressLocation.Window
4141
logger.Debug "Activating features"
42+
4243
window.withProgress (
4344
progressOpts,
4445
(fun p ctok ->

0 commit comments

Comments
 (0)