From b8f28795db52292d4f132747dd70ba5268603083 Mon Sep 17 00:00:00 2001 From: Konstantin Krukhmalev Date: Thu, 16 Jan 2025 10:51:08 +0200 Subject: [PATCH 01/12] [rider] Use com.jetbrains.rider.test.framework.executeWithGold instead of com.jetbrains.rdclient.testFramework.executeWithGold in Rider tests GitOrigin-RevId: 81da24ac60924261baca02f8f8a39cfdee67c271 --- .../rider/plugins/fsharp/test/cases/fantomas/FantomasTest.kt | 2 +- .../fsharp/test/cases/projectModel/FcsModuleReaderTest.kt | 2 +- .../test/cases/typeProviders/TypeProvidersFeaturesTest.kt | 2 +- .../fsharp/test/cases/typeProviders/TypeProvidersTest.kt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/fantomas/FantomasTest.kt b/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/fantomas/FantomasTest.kt index 09871c0732..da4aa38edd 100644 --- a/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/fantomas/FantomasTest.kt +++ b/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/fantomas/FantomasTest.kt @@ -1,6 +1,6 @@ package com.jetbrains.rider.plugins.fsharp.test.cases.fantomas -import com.jetbrains.rdclient.testFramework.executeWithGold +import com.jetbrains.rider.test.framework.executeWithGold import com.jetbrains.rider.test.scriptingApi.waitForDaemon import com.jetbrains.rider.plugins.fsharp.test.withEditorConfig import com.jetbrains.rider.test.annotations.Mute diff --git a/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/projectModel/FcsModuleReaderTest.kt b/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/projectModel/FcsModuleReaderTest.kt index e82076e7f3..7d8048c2d8 100644 --- a/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/projectModel/FcsModuleReaderTest.kt +++ b/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/projectModel/FcsModuleReaderTest.kt @@ -5,7 +5,7 @@ import com.intellij.openapi.editor.impl.EditorImpl import com.intellij.openapi.fileEditor.ex.FileEditorManagerEx import com.intellij.openapi.project.Project import com.intellij.platform.backend.workspace.WorkspaceModel -import com.jetbrains.rdclient.testFramework.executeWithGold +import com.jetbrains.rider.test.framework.executeWithGold import com.jetbrains.rdclient.util.idea.pumpMessages import com.jetbrains.rider.daemon.util.hasErrors import com.jetbrains.rider.editors.getProjectModelId diff --git a/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/typeProviders/TypeProvidersFeaturesTest.kt b/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/typeProviders/TypeProvidersFeaturesTest.kt index db71d079a5..503dffe385 100644 --- a/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/typeProviders/TypeProvidersFeaturesTest.kt +++ b/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/typeProviders/TypeProvidersFeaturesTest.kt @@ -3,7 +3,7 @@ package com.jetbrains.rider.plugins.fsharp.test.cases.typeProviders import com.intellij.openapi.actionSystem.ActionPlaces import com.intellij.openapi.actionSystem.IdeActions import com.jetbrains.rd.platform.diagnostics.LogTraceScenario -import com.jetbrains.rdclient.testFramework.executeWithGold +import com.jetbrains.rider.test.framework.executeWithGold import com.jetbrains.rider.test.scriptingApi.waitForDaemon import com.jetbrains.rider.plugins.fsharp.logs.FSharpLogTraceScenarios import com.jetbrains.rider.test.annotations.TestEnvironment diff --git a/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/typeProviders/TypeProvidersTest.kt b/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/typeProviders/TypeProvidersTest.kt index 79edb7f465..19ef24e242 100644 --- a/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/typeProviders/TypeProvidersTest.kt +++ b/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/typeProviders/TypeProvidersTest.kt @@ -1,6 +1,6 @@ package com.jetbrains.rider.plugins.fsharp.test.cases.typeProviders -import com.jetbrains.rdclient.testFramework.executeWithGold +import com.jetbrains.rider.test.framework.executeWithGold import com.jetbrains.rider.test.scriptingApi.waitForDaemon import com.jetbrains.rider.test.annotations.Mute import com.jetbrains.rider.test.annotations.Solution From e08ce0788b698171d489e3718fb9569abbd54442 Mon Sep 17 00:00:00 2001 From: Andrii Rublov Date: Wed, 15 Jan 2025 22:04:41 +0100 Subject: [PATCH 02/12] [nuget]: Fix RIDER-90775: Restoring nuget packages bypasses NU1008 error GitOrigin-RevId: 623dc305508c9bb942095db4f4b582b2df580d7b --- .../src/FSharp.Fantomas.Host/PackagesLock.targets | 2 +- ReSharper.FSharp/src/FSharp/PackagesLock.targets | 4 ++-- ReSharper.FSharp/test/src/PackagesLock.targets | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ReSharper.FSharp/src/FSharp.Fantomas.Host/PackagesLock.targets b/ReSharper.FSharp/src/FSharp.Fantomas.Host/PackagesLock.targets index 51d4315142..f78e3c7c04 100644 --- a/ReSharper.FSharp/src/FSharp.Fantomas.Host/PackagesLock.targets +++ b/ReSharper.FSharp/src/FSharp.Fantomas.Host/PackagesLock.targets @@ -5,7 +5,7 @@ - + diff --git a/ReSharper.FSharp/src/FSharp/PackagesLock.targets b/ReSharper.FSharp/src/FSharp/PackagesLock.targets index 7a892c2cc2..e976ffe37a 100644 --- a/ReSharper.FSharp/src/FSharp/PackagesLock.targets +++ b/ReSharper.FSharp/src/FSharp/PackagesLock.targets @@ -9,8 +9,8 @@ - - + + diff --git a/ReSharper.FSharp/test/src/PackagesLock.targets b/ReSharper.FSharp/test/src/PackagesLock.targets index 7d8c7fe9e2..57ffbb5e52 100644 --- a/ReSharper.FSharp/test/src/PackagesLock.targets +++ b/ReSharper.FSharp/test/src/PackagesLock.targets @@ -5,9 +5,9 @@ - - - + + + From b31696b3a21e87784873b7141bf577a9839393cc Mon Sep 17 00:00:00 2001 From: baltic Date: Fri, 17 Jan 2025 03:23:42 -0800 Subject: [PATCH 03/12] afix branch "h.distro.cache.with.cleanup" GitOrigin-RevId: 1b3c84cdaa3da731a153853ffaebb1c0b1d6f18c --- ReSharper.FSharp/src/FSharp/PackagesLock.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReSharper.FSharp/src/FSharp/PackagesLock.targets b/ReSharper.FSharp/src/FSharp/PackagesLock.targets index e976ffe37a..afc803e66f 100644 --- a/ReSharper.FSharp/src/FSharp/PackagesLock.targets +++ b/ReSharper.FSharp/src/FSharp/PackagesLock.targets @@ -5,7 +5,7 @@ - + @@ -17,4 +17,4 @@ - + \ No newline at end of file From 810fff0f56a07cb5efa31e295f435f3a9ae6a3dc Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 13 Jan 2025 16:35:21 +0100 Subject: [PATCH 04/12] [dotnet] fix DeadlockSafety for some fsharp components GitOrigin-RevId: 002a712244dab9d37f01dc7eb945c31aaff141c4 --- .../FSharp/FSharp.Common/src/Checker/FcsCheckerService.fs | 5 +++-- .../FSharp.Common/src/ProjectModel/FSharpFileService.fs | 3 ++- .../test/src/FSharp.Common.Tests/SciptPsiModulesTest.fs | 2 +- ReSharper.FSharp/test/src/FSharp.Tests.Common/src/Stubs.fs | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ReSharper.FSharp/src/FSharp/FSharp.Common/src/Checker/FcsCheckerService.fs b/ReSharper.FSharp/src/FSharp/FSharp.Common/src/Checker/FcsCheckerService.fs index 0ddba90a5d..224e58e6d5 100644 --- a/ReSharper.FSharp/src/FSharp/FSharp.Common/src/Checker/FcsCheckerService.fs +++ b/ReSharper.FSharp/src/FSharp/FSharp.Common/src/Checker/FcsCheckerService.fs @@ -9,6 +9,7 @@ open FSharp.Compiler.Text open JetBrains open JetBrains.Annotations open JetBrains.Application +open JetBrains.Application.Parts open JetBrains.Application.Settings open JetBrains.Application.Threading open JetBrains.DataFlow @@ -82,7 +83,7 @@ type FcsProjectInvalidationType = | Remove -[] +[] type FcsCheckerService(lifetime: Lifetime, logger: ILogger, onSolutionCloseNotifier: OnSolutionCloseNotifier, settingsStore: ISettingsStore, locks: IShellLocks) = @@ -93,7 +94,7 @@ type FcsCheckerService(lifetime: Lifetime, logger: ILogger, onSolutionCloseNotif let getSettingProperty name = let setting = SettingsUtil.getEntry settingsStore name - settingsStoreLive.GetValueProperty(lifetime, setting, null) + settingsStoreLive.GetValueProperty2(lifetime, setting, null, ApartmentForNotifications.Primary(locks)) let skipImpl = getSettingProperty "SkipImplementationAnalysis" let analyzerProjectReferencesInParallel = getSettingProperty "ParallelProjectReferencesAnalysis" diff --git a/ReSharper.FSharp/src/FSharp/FSharp.Common/src/ProjectModel/FSharpFileService.fs b/ReSharper.FSharp/src/FSharp/FSharp.Common/src/ProjectModel/FSharpFileService.fs index db54233f17..567cb9f193 100644 --- a/ReSharper.FSharp/src/FSharp/FSharp.Common/src/ProjectModel/FSharpFileService.fs +++ b/ReSharper.FSharp/src/FSharp/FSharp.Common/src/ProjectModel/FSharpFileService.fs @@ -3,6 +3,7 @@ namespace JetBrains.ReSharper.Plugins.FSharp.ProjectModel open JetBrains.Application open JetBrains.Application.BuildScript open JetBrains.Application.BuildScript.Application.Zones +open JetBrains.Application.Parts open JetBrains.ProjectModel open JetBrains.RdBackend.Common.Env open JetBrains.ReSharper.Plugins.FSharp @@ -10,7 +11,7 @@ open JetBrains.ReSharper.Plugins.FSharp.ProjectModel.Scripts open JetBrains.ReSharper.Psi open JetBrains.Rider.Backend.Env -[] +[] [, typeof, typeof)>] type FSharpFileService(settingsLocation: RiderAnyProductSettingsLocation, fileExtensions: IProjectFileExtensions) = let scratchesDir = diff --git a/ReSharper.FSharp/test/src/FSharp.Common.Tests/SciptPsiModulesTest.fs b/ReSharper.FSharp/test/src/FSharp.Common.Tests/SciptPsiModulesTest.fs index e5cd194e33..e2854114c9 100644 --- a/ReSharper.FSharp/test/src/FSharp.Common.Tests/SciptPsiModulesTest.fs +++ b/ReSharper.FSharp/test/src/FSharp.Common.Tests/SciptPsiModulesTest.fs @@ -100,7 +100,7 @@ type MyTestSolutionToolset(lifetime: Lifetime, dotNetCoreInstallationsDetector: -[] +[] [)>] type FSharpFileServiceStub() = interface IFSharpFileService with diff --git a/ReSharper.FSharp/test/src/FSharp.Tests.Common/src/Stubs.fs b/ReSharper.FSharp/test/src/FSharp.Tests.Common/src/Stubs.fs index 047a87f1e5..aba5e2b7b7 100644 --- a/ReSharper.FSharp/test/src/FSharp.Tests.Common/src/Stubs.fs +++ b/ReSharper.FSharp/test/src/FSharp.Tests.Common/src/Stubs.fs @@ -10,7 +10,7 @@ open JetBrains.ReSharper.Plugins.FSharp.ProjectModel.Host.ProjectItems.ItemsCont open JetBrains.ReSharper.Plugins.FSharp.ProjectModel.Scripts open JetBrains.ReSharper.Plugins.FSharp.Tests -[] +[] [)>] type FSharpFileServiceStub() = From 86de55af2923e3aeb1a1ff41102685fe571fe705 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 16 Jan 2025 17:23:12 +0100 Subject: [PATCH 05/12] [dotnet] apply DeadlockSafetyAttributesUpdateAction GitOrigin-RevId: d0f62f29cdc8df0916fe16274194b80f0a737080 --- .../FSharp/FSharp.Psi.Daemon/src/Stages/FSharpErrorsStage.fs | 3 ++- .../src/Stages/FSharpVcsCodeVisionRangesProviderStage.fs | 3 ++- .../FSharp.Psi.Daemon/src/Stages/FormatSpecifiersStage.fs | 3 ++- .../src/Stages/InferredTypeCodeVisionProvider.fs | 2 +- .../FSharp.Psi.Daemon/src/Stages/PatternTypeHintsStage.fs | 3 ++- .../FSharp.Psi.Daemon/src/Stages/PipeChainTypeHintStage.fs | 3 ++- .../FSharp.Psi.Daemon/src/Stages/ScriptLoadPathsStage.fs | 3 ++- .../FSharp/FSharp.Psi.Daemon/src/Stages/SyntaxErrorsStage.fs | 4 +++- .../FSharp/FSharp.Psi.Daemon/src/Stages/UnusedOpensStage.fs | 3 ++- 9 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/FSharpErrorsStage.fs b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/FSharpErrorsStage.fs index 384453735f..a68705040d 100644 --- a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/FSharpErrorsStage.fs +++ b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/FSharpErrorsStage.fs @@ -2,6 +2,7 @@ namespace JetBrains.ReSharper.Plugins.FSharp.Psi.Daemon.Stages open System open System.Collections.Generic +open JetBrains.Application.Parts open JetBrains.ProjectModel open JetBrains.ReSharper.Daemon.VisualElements open JetBrains.ReSharper.Feature.Services.Daemon @@ -23,7 +24,7 @@ module FSharpErrorsStage = let parseAndCheckResultsKey = Key("ParseAndCheckResultsKey") -[ |])>] +[ |])>] type FSharpErrorsStage(elementProblemAnalyzerRegistrar) = inherit FSharpDaemonStageBase() diff --git a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/FSharpVcsCodeVisionRangesProviderStage.fs b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/FSharpVcsCodeVisionRangesProviderStage.fs index 34b88490d2..5895343634 100644 --- a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/FSharpVcsCodeVisionRangesProviderStage.fs +++ b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/FSharpVcsCodeVisionRangesProviderStage.fs @@ -1,6 +1,7 @@ namespace JetBrains.ReSharper.Plugins.FSharp.Psi.Daemon.Stages open JetBrains.Application.BuildScript.Application.Zones +open JetBrains.Application.Parts open JetBrains.RdBackend.Common.Features.CodeInsights.Stages.Vcs open JetBrains.ReSharper.Feature.Services.Daemon open JetBrains.ReSharper.Plugins.FSharp.Psi @@ -8,7 +9,7 @@ open JetBrains.ReSharper.Plugins.FSharp.Psi.Tree open JetBrains.ReSharper.Psi.Tree open JetBrains.RdBackend.Common.Env -[] +[] [)>] type FSharpVcsCodeVisionRangesProviderStage() = inherit CodeInsightsVcsRangesStageBase() diff --git a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/FormatSpecifiersStage.fs b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/FormatSpecifiersStage.fs index 485ef52e43..c760ab2ee3 100644 --- a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/FormatSpecifiersStage.fs +++ b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/FormatSpecifiersStage.fs @@ -1,5 +1,6 @@ namespace JetBrains.ReSharper.Plugins.FSharp.Psi.Daemon.Stages +open JetBrains.Application.Parts open System.Collections.Generic open JetBrains.ReSharper.Daemon.Impl open JetBrains.ReSharper.Feature.Services.Daemon @@ -26,7 +27,7 @@ type FormatSpecifiersStageProcess(fsFile: IFSharpFile, daemonProcess) = committer.Invoke(DaemonStageResult(highlightings)) -[ |], StagesAfter = [| typeof |])>] +[ |], StagesAfter = [| typeof |])>] type FormatSpecifiersStage() = inherit FSharpDaemonStageBase(true) diff --git a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/InferredTypeCodeVisionProvider.fs b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/InferredTypeCodeVisionProvider.fs index 0b73c3f91d..abbe626ade 100644 --- a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/InferredTypeCodeVisionProvider.fs +++ b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/InferredTypeCodeVisionProvider.fs @@ -77,7 +77,7 @@ type InferredTypeCodeVisionProvider() = member x.OnExtraActionClick(_, _, _) = () -[ |])>] +[ |])>] type InferredTypeCodeVisionStage(provider: InferredTypeCodeVisionProvider) = inherit FSharpDaemonStageBase(true, false) diff --git a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/PatternTypeHintsStage.fs b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/PatternTypeHintsStage.fs index 770b3e1e77..9cd8313f2c 100644 --- a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/PatternTypeHintsStage.fs +++ b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/PatternTypeHintsStage.fs @@ -3,6 +3,7 @@ namespace JetBrains.ReSharper.Plugins.FSharp.Psi.Daemon.Stages open System open System.Collections.Generic open FSharp.Compiler.Symbols +open JetBrains.Application.Parts open JetBrains.Application.Settings open JetBrains.DocumentModel open JetBrains.ReSharper.Feature.Services.Daemon @@ -233,7 +234,7 @@ type private PatternsHighlightingProcess(fsFile, settingsStore: IContextBoundSet committer.Invoke(DaemonStageResult remainingHighlightings) -[ |])>] +[ |])>] type PatternTypeHintsStage() = inherit FSharpDaemonStageBase(true, false) diff --git a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/PipeChainTypeHintStage.fs b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/PipeChainTypeHintStage.fs index c769e213b8..9b9c1d5ade 100644 --- a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/PipeChainTypeHintStage.fs +++ b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/PipeChainTypeHintStage.fs @@ -3,6 +3,7 @@ open System open System.Collections.Generic open FSharp.Compiler.Symbols +open JetBrains.Application.Parts open JetBrains.Application.Settings open JetBrains.DocumentModel open JetBrains.ReSharper.Feature.Services.Daemon @@ -165,7 +166,7 @@ type PipeChainHighlightingProcess(fsFile, settings: IContextBoundSettingsStore, committer.Invoke(DaemonStageResult remainingHighlightings) -[ |])>] +[ |])>] type PipeChainTypeHintStage() = inherit FSharpDaemonStageBase(true, false) diff --git a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/ScriptLoadPathsStage.fs b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/ScriptLoadPathsStage.fs index 986fc36096..62ce3dbc72 100644 --- a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/ScriptLoadPathsStage.fs +++ b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/ScriptLoadPathsStage.fs @@ -2,6 +2,7 @@ namespace rec JetBrains.ReSharper.Plugins.FSharp.Psi.Daemon.Stages open System.Collections.Generic open JetBrains.Application +open JetBrains.Application.Parts open JetBrains.ReSharper.Feature.Services.Daemon open JetBrains.ReSharper.Plugins.FSharp.Psi.Features.Daemon.Highlightings open JetBrains.ReSharper.Plugins.FSharp.Psi.Features.Daemon.Stages @@ -11,7 +12,7 @@ open JetBrains.ReSharper.Psi open JetBrains.ReSharper.Psi.Tree open JetBrains.Util -[ |], StagesAfter = [| typeof |])>] +[ |], StagesAfter = [| typeof |])>] type ScriptLoadPathsStage() = inherit FSharpDaemonStageBase(true) // todo: should report for closed files diff --git a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/SyntaxErrorsStage.fs b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/SyntaxErrorsStage.fs index 5cdfb2c0bf..9501f51406 100644 --- a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/SyntaxErrorsStage.fs +++ b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/SyntaxErrorsStage.fs @@ -1,10 +1,12 @@ namespace JetBrains.ReSharper.Plugins.FSharp.Psi.Daemon.Stages +open JetBrains.Application.Parts open JetBrains.ReSharper.Feature.Services.Daemon open JetBrains.ReSharper.Plugins.FSharp.Psi.Features.Daemon.Stages open JetBrains.ReSharper.Plugins.FSharp.Psi.Tree -[ |], +[ |], StagesAfter = [| typeof |])>] type SyntaxErrorsStage() = inherit FSharpDaemonStageBase() diff --git a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/UnusedOpensStage.fs b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/UnusedOpensStage.fs index 65ca9cf950..5cc0cf1cae 100644 --- a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/UnusedOpensStage.fs +++ b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Stages/UnusedOpensStage.fs @@ -1,6 +1,7 @@ namespace JetBrains.ReSharper.Plugins.FSharp.Psi.Daemon.Stages open JetBrains.Application +open JetBrains.Application.Parts open JetBrains.ReSharper.Daemon.UsageChecking open JetBrains.ReSharper.Feature.Services.Daemon open JetBrains.ReSharper.Plugins.FSharp.Psi.Features.Daemon @@ -9,7 +10,7 @@ open JetBrains.ReSharper.Plugins.FSharp.Psi.Features.Daemon.Stages open JetBrains.ReSharper.Plugins.FSharp.Psi.Services.Util open JetBrains.ReSharper.Plugins.FSharp.Psi.Tree -[ |], StagesAfter = [| typeof |])>] +[ |], StagesAfter = [| typeof |])>] type UnusedOpensStage() = inherit FSharpDaemonStageBase() From e87f099fad5b34167dacc6742801ef9b722eb83a Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Wed, 15 Jan 2025 23:07:53 +0100 Subject: [PATCH 06/12] [platform] retiring the routing FS security manager hack GitOrigin-RevId: c33d1dfe6d449e4200e0424b4695be97f3a050af --- rider-fsharp/build.gradle.kts | 1 - 1 file changed, 1 deletion(-) diff --git a/rider-fsharp/build.gradle.kts b/rider-fsharp/build.gradle.kts index 4a8866184a..e26796f9c3 100644 --- a/rider-fsharp/build.gradle.kts +++ b/rider-fsharp/build.gradle.kts @@ -291,7 +291,6 @@ tasks { } buildSearchableOptions { - jvmArgs("-Djava.security.manager=com.intellij.platform.core.nio.fs.CoreBootstrapSecurityManager") enabled = buildConfiguration == "Release" } } From 570cb4d8b92d75fa99268534e147ca9bc6fb1cdd Mon Sep 17 00:00:00 2001 From: Ivan Migalev Date: Tue, 21 Jan 2025 17:47:12 +0100 Subject: [PATCH 07/12] Rider plugins: disable searchable options for now GitOrigin-RevId: 2b4bdb41adf0606d47fcf1c506977e304b1fa58f --- rider-fsharp/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rider-fsharp/build.gradle.kts b/rider-fsharp/build.gradle.kts index e26796f9c3..dad69fa716 100644 --- a/rider-fsharp/build.gradle.kts +++ b/rider-fsharp/build.gradle.kts @@ -291,7 +291,7 @@ tasks { } buildSearchableOptions { - enabled = buildConfiguration == "Release" + enabled = false // TODO: buildConfiguration == "Release" } } From 18b472a30e12026dc1f3f1cbba026a315520e81b Mon Sep 17 00:00:00 2001 From: Ivan Migalev Date: Tue, 21 Jan 2025 18:42:54 +0100 Subject: [PATCH 08/12] Revert "Rider plugins: disable searchable options for now" This reverts commit 5c1d1999c2d53e83f71fdb310907144d3d2dbc61. GitOrigin-RevId: a9551f95bcabde1fab7bd0db64410545471edff5 --- rider-fsharp/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rider-fsharp/build.gradle.kts b/rider-fsharp/build.gradle.kts index dad69fa716..e26796f9c3 100644 --- a/rider-fsharp/build.gradle.kts +++ b/rider-fsharp/build.gradle.kts @@ -291,7 +291,7 @@ tasks { } buildSearchableOptions { - enabled = false // TODO: buildConfiguration == "Release" + enabled = buildConfiguration == "Release" } } From 7b7732a164b77d6118f7763899beb1e6ff1df1ae Mon Sep 17 00:00:00 2001 From: Ivan Migalev Date: Tue, 21 Jan 2025 18:48:14 +0100 Subject: [PATCH 09/12] rider-fsharp: migrate to IntelliJ Platform Gradle Plugin v2.2.1 GitOrigin-RevId: 5c24909d3cf6b798d6f11cb12e6ca97d7f369a23 --- rider-fsharp/build.gradle.kts | 7 +++++-- rider-fsharp/gradle.properties | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/rider-fsharp/build.gradle.kts b/rider-fsharp/build.gradle.kts index e26796f9c3..2b78130a4f 100644 --- a/rider-fsharp/build.gradle.kts +++ b/rider-fsharp/build.gradle.kts @@ -1,12 +1,12 @@ import com.jetbrains.plugin.structure.base.utils.isFile import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.jetbrains.intellij.platform.gradle.Constants -import org.jetbrains.intellij.platform.gradle.TestFrameworkType import org.jetbrains.intellij.platform.gradle.tasks.PrepareSandboxTask import org.jetbrains.intellij.platform.gradle.tasks.RunIdeTask import org.jetbrains.kotlin.daemon.common.toHexString import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import kotlin.io.path.absolutePathString +import kotlin.io.path.pathString plugins { // Version is configured in gradle.properties @@ -57,7 +57,10 @@ dependencies { bundledPlugin("org.jetbrains.plugins.textmate") bundledPlugin("rider.intellij.plugin.appender") instrumentationTools() - testFramework(TestFrameworkType.Bundled) + // TODO: Temporary I hope hope hope + bundledLibrary(provider { + project.intellijPlatform.platformPath.resolve("lib/testFramework.jar").pathString + }) } testImplementation("org.opentest4j:opentest4j:1.3.0") diff --git a/rider-fsharp/gradle.properties b/rider-fsharp/gradle.properties index 9f57f311d2..198123879d 100644 --- a/rider-fsharp/gradle.properties +++ b/rider-fsharp/gradle.properties @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx2000m kotlin.stdlib.default.dependency=false rdVersion=2024.3-pre2 rdKotlinVersion=2.1.0 -intellijPlatformGradlePluginVersion=2.1.0 +intellijPlatformGradlePluginVersion=2.2.1 grammarKitVersion=2022.3.2.1 gradleJvmWrapperVersion=0.14.0 riderBaseVersion=2025.1 From b502b9ebe94ab5f2fd30e7532efc42c7e42c7fab Mon Sep 17 00:00:00 2001 From: Ivan Serdiuk Date: Sun, 19 Jan 2025 15:31:01 +0200 Subject: [PATCH 10/12] Fix F# compilation GitOrigin-RevId: 2abc0554bc9a0753f5b92b168999ba7522096a75 --- .../FSharp.Psi.Services/src/Util/FSharpExtensionMemberUtil.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Services/src/Util/FSharpExtensionMemberUtil.fs b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Services/src/Util/FSharpExtensionMemberUtil.fs index 9a0e249f78..ffcd2c9a09 100644 --- a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Services/src/Util/FSharpExtensionMemberUtil.fs +++ b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Services/src/Util/FSharpExtensionMemberUtil.fs @@ -33,7 +33,7 @@ type FSharpRequest(psiModule, exprType: IType, name: string option) = interface IRequest with member this.Name = name - member this.BaseExpressionTypes = baseTypes + member this.EligibleExtensionArgumentTypes = baseTypes member this.ExpressionType = exprType member this.ForModule = psiModule member this.Kinds = memberKinds From 91db904e697938a94341ab7ea84f1a33f9e0123f Mon Sep 17 00:00:00 2001 From: "Alexander.Shvedov" Date: Sun, 5 Jan 2025 01:42:26 +0100 Subject: [PATCH 11/12] [dotnet] Rename .Tokens()/.ReverseTokens() API to clarify it's weird semantics GitOrigin-RevId: cc348f43c082a63e4b4feb6ac98c04c717a05b89 --- .../src/FSharp/FSharp.Psi.Services/src/Util/PsiUtil.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Services/src/Util/PsiUtil.fs b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Services/src/Util/PsiUtil.fs index 03ad0b45c0..f3348d7f6c 100644 --- a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Services/src/Util/PsiUtil.fs +++ b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Services/src/Util/PsiUtil.fs @@ -484,7 +484,7 @@ let shiftWhitespaceBefore shift (whitespace: Whitespace) = let shiftNode shift (expr: #ITreeNode) = if shift = 0 || isNull expr then () else - for child in List.ofSeq (expr.Tokens()) do + for child in List.ofSeq (expr.EnumerateAllTokensFromFirstIn()) do if not (child :? NewLine) then () else let nextSibling = child.NextSibling From e962a3c8566882d7eccd57b0af8ea49bad0adcf1 Mon Sep 17 00:00:00 2001 From: "Ivan.Yarkov" Date: Mon, 20 Jan 2025 16:23:16 +0200 Subject: [PATCH 12/12] RIDER-118460 force editor actions go to backend, so a speculative patch can be applied when backend action can't execute Also adds test for startNewLineBeforeCurrent action in razor test and removes redundant "RearrangeCode" to RiderActions.REARRANGE_CODE from RiderDefaultBackend editor name map since they are the same values (cherry picked from commit 6d8e42eb1f597597326435dc8a262ae6c215940b) IJ-MR-153423 GitOrigin-RevId: 9b859f3ad7ba935020a1e541ce38695fef07c7bb --- .../cases/typingAssist/FSharpPatchEngineTypingAssists.kt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/typingAssist/FSharpPatchEngineTypingAssists.kt b/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/typingAssist/FSharpPatchEngineTypingAssists.kt index 8af0a4d62d..a988215a15 100644 --- a/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/typingAssist/FSharpPatchEngineTypingAssists.kt +++ b/rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/typingAssist/FSharpPatchEngineTypingAssists.kt @@ -42,13 +42,6 @@ abstract class FSharpTypingAssistPatchEngineTest(mode: PatchEngineEditorTestMode } } -@Test -@Subsystem(SubsystemConstants.TYPING_ASSIST) -@Feature("Typing Assist") -@TestEnvironment(sdkVersion = SdkVersion.LATEST_STABLE) -class FSharpTypingAssistPatchEngineSpeculativeRebaseProhibitedTest : - FSharpTypingAssistPatchEngineTest(PatchEngineEditorTestMode.SpeculativeRebaseProhibited) - @Test @Subsystem(SubsystemConstants.TYPING_ASSIST) @Feature("Typing Assist")