Skip to content

Commit 8e14d4a

Browse files
committed
Update SDK to 2021.3
1 parent 3728819 commit 8e14d4a

File tree

2 files changed

+15
-21
lines changed

2 files changed

+15
-21
lines changed

ReSharper.FSharp/src/FSharp.Common/src/ProjectModel/ProjectLoadDiagnostics.fs

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ namespace JetBrains.ReSharper.Plugins.FSharp.ProjectModel.Diagnostic
33
open System
44
open System.Collections.Generic
55
open JetBrains.Application
6+
open JetBrains.ProjectModel.ProjectsHost
67
open JetBrains.ProjectModel.ProjectsHost.Diagnostic
78
open JetBrains.ProjectModel.ProjectsHost.Impl
89
open JetBrains.ProjectModel.ProjectsHost.MsBuild.Diagnostic
@@ -13,33 +14,28 @@ open JetBrains.Util
1314
[<ShellComponent>]
1415
type FSharpProjectLoadTargetsAnalyzer() =
1516
interface IMsBuildProjectLoadDiagnosticProvider with
16-
member x.CollectDiagnostic(_, _, result) =
17+
member x.CollectDiagnostic(projectMark, _, result) =
1718
match result.FatalError with
1819
| error when isNotNull error && error.PresentableText.Contains("Microsoft.FSharp.Targets") ->
19-
FSharpTargetsDiagnosticMessage.InstanceCollection
20+
[| FSharpTargetsDiagnosticMessage(projectMark) :> ProjectLoadDiagnostic |] :> _
2021
| _ -> EmptyArray.Instance :> _
2122

22-
and FSharpTargetsDiagnosticMessage private (title, message) =
23-
inherit LoadDiagnosticMessage(title, message)
24-
25-
static let [<Literal>] messageTitle = "Could not open F# project"
23+
and FSharpTargetsDiagnosticMessage(projectMark, message) =
24+
inherit ProjectLoadError(projectMark, message)
2625

2726
static let platformName platform =
2827
match platform with
2928
| PlatformUtil.Platform.MacOsX -> "mac"
3029
| PlatformUtil.Platform.Linux -> "linux"
3130
| _ -> "windows"
3231

33-
private new() =
32+
new (projectMark: IProjectMark) =
3433
let osName = platformName PlatformUtil.RuntimePlatform
35-
let url = sprintf "https://fsharp.org/use/%s/" osName
34+
let url = $"https://fsharp.org/use/%s{osName}/"
3635
let link = RiderContextNotificationHelper.MakeLink(url, "install F# SDK")
3736
let message = "F# SDK or project dependencies are missing. " +
38-
sprintf "Try restoring NuGet packages; if the problem persists, please %s." link
39-
FSharpTargetsDiagnosticMessage(messageTitle, message)
40-
41-
static member val InstanceCollection =
42-
[| FSharpTargetsDiagnosticMessage() :> ILoadDiagnostic |] :> ICollection<_>
37+
$"Try restoring NuGet packages; if the problem persists, please %s{link}."
38+
FSharpTargetsDiagnosticMessage(projectMark, message)
4339

4440

4541
[<ShellComponent>]
@@ -52,15 +48,13 @@ type FSharpProjectTypeGuidAnalyzer() =
5248
if projectMark.Location.ExtensionNoDot <> FsprojExtension then EmptyArray.Instance :> _ else
5349
if isFSharpGuid projectMark.TypeGuid || projectMark.Guid = Guid.Empty then EmptyArray.Instance :> _ else
5450

55-
FSharpWrongProjectTypeGuid.InstanceCollection
51+
[| FSharpWrongProjectTypeGuid(projectMark) :> ProjectLoadDiagnostic |] :> ICollection<_>
5652

57-
and FSharpWrongProjectTypeGuid private (title, message) =
58-
inherit LoadDiagnosticMessage(title, message)
53+
and FSharpWrongProjectTypeGuid(projectMark, message) =
54+
inherit ProjectLoadWarning(projectMark, message) // todo: allow passing custom title?
5955

6056
static let [<Literal>] messageTitle = "F# project has incorrect guid"
6157
static let [<Literal>] message = "Solution file specifies wrong project type guid."
6258

63-
private new() = FSharpWrongProjectTypeGuid(messageTitle, message)
64-
65-
static member val InstanceCollection =
66-
[| FSharpWrongProjectTypeGuid() :> ILoadDiagnostic |] :> ICollection<_>
59+
new (projectMark: IProjectMark) =
60+
FSharpWrongProjectTypeGuid(projectMark, message)

rider-fsharp/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ java {
4545
}
4646

4747

48-
val baseVersion = "2021.2"
48+
val baseVersion = "2021.3"
4949
val buildCounter = ext.properties["build.number"] ?: "9999"
5050
version = "$baseVersion.$buildCounter"
5151

0 commit comments

Comments
 (0)