Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with the ultimate master #802

Merged
merged 12 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PackageLock Include="Fantomas.FCS" Version="6.3.15" />
<PackageLock Include="FSharp.Core" Version="9.0.100-beta.24466.6" />
<PackageLock Include="JetBrains.Lifetimes" Version="2024.3.0" />
<PackageLock Include="JetBrains.NuGet.Versioning" Version="6.12.20241210.146" />
<PackageLock Include="JetBrains.NuGet.Versioning" Version="6.12.20250115.147" />
<PackageLock Include="JetBrains.RdFramework" Version="2024.3.0" />
<PackageLock Include="Microsoft.NETCore.Platforms" Version="1.1.1" />
<PackageLock Include="Microsoft.NETCore.Targets" Version="1.1.3" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -82,7 +83,7 @@ type FcsProjectInvalidationType =
| Remove


[<ShellComponent; AllowNullLiteral>]
[<ShellComponent(Instantiation.DemandAnyThreadSafe); AllowNullLiteral>]
type FcsCheckerService(lifetime: Lifetime, logger: ILogger, onSolutionCloseNotifier: OnSolutionCloseNotifier,
settingsStore: ISettingsStore, locks: IShellLocks) =

Expand All @@ -93,7 +94,7 @@ type FcsCheckerService(lifetime: Lifetime, logger: ILogger, onSolutionCloseNotif

let getSettingProperty name =
let setting = SettingsUtil.getEntry<FSharpOptions> settingsStore name
settingsStoreLive.GetValueProperty(lifetime, setting, null)
settingsStoreLive.GetValueProperty2(lifetime, setting, null, ApartmentForNotifications.Primary(locks))

let skipImpl = getSettingProperty "SkipImplementationAnalysis"
let analyzerProjectReferencesInParallel = getSettingProperty "ParallelProjectReferencesAnalysis"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ 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
open JetBrains.ReSharper.Plugins.FSharp.ProjectModel.Scripts
open JetBrains.ReSharper.Psi
open JetBrains.Rider.Backend.Env

[<ShellComponent>]
[<ShellComponent(Instantiation.DemandAnyThreadSafe)>]
[<ZoneMarker(typeof<IReSharperHostNetFeatureZone>, typeof<IRiderBackendFeatureEnvironmentZone>, typeof<IRiderFeatureZone>)>]
type FSharpFileService(settingsLocation: RiderAnyProductSettingsLocation, fileExtensions: IProjectFileExtensions) =
let scratchesDir =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -23,7 +24,7 @@ module FSharpErrorsStage =
let parseAndCheckResultsKey = Key<FSharpParseAndCheckResults option>("ParseAndCheckResultsKey")


[<DaemonStage(StagesBefore = [| typeof<HighlightIdentifiersStage> |])>]
[<DaemonStage(Instantiation.DemandAnyThreadUnsafe, StagesBefore = [| typeof<HighlightIdentifiersStage> |])>]
type FSharpErrorsStage(elementProblemAnalyzerRegistrar) =
inherit FSharpDaemonStageBase()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
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
open JetBrains.ReSharper.Plugins.FSharp.Psi.Tree
open JetBrains.ReSharper.Psi.Tree
open JetBrains.RdBackend.Common.Env

[<DaemonStage>]
[<DaemonStage(Instantiation.DemandAnyThreadSafe)>]
[<ZoneMarker(typeof<IReSharperHostNetFeatureZone>)>]
type FSharpVcsCodeVisionRangesProviderStage() =
inherit CodeInsightsVcsRangesStageBase<FSharpLanguage>()
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -26,7 +27,7 @@ type FormatSpecifiersStageProcess(fsFile: IFSharpFile, daemonProcess) =

committer.Invoke(DaemonStageResult(highlightings))

[<DaemonStage(StagesBefore = [| typeof<HighlightIdentifiersStage> |], StagesAfter = [| typeof<UnusedOpensStage> |])>]
[<DaemonStage(Instantiation.DemandAnyThreadSafe, StagesBefore = [| typeof<HighlightIdentifiersStage> |], StagesAfter = [| typeof<UnusedOpensStage> |])>]
type FormatSpecifiersStage() =
inherit FSharpDaemonStageBase(true)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ type InferredTypeCodeVisionProvider() =
member x.OnExtraActionClick(_, _, _) = ()


[<DaemonStage(StagesBefore = [| typeof<GlobalFileStructureCollectorStage> |])>]
[<DaemonStage(Instantiation.DemandAnyThreadSafe, StagesBefore = [| typeof<GlobalFileStructureCollectorStage> |])>]
type InferredTypeCodeVisionStage(provider: InferredTypeCodeVisionProvider) =
inherit FSharpDaemonStageBase(true, false)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -233,7 +234,7 @@ type private PatternsHighlightingProcess(fsFile, settingsStore: IContextBoundSet

committer.Invoke(DaemonStageResult remainingHighlightings)

[<DaemonStage(StagesBefore = [| typeof<GlobalFileStructureCollectorStage> |])>]
[<DaemonStage(Instantiation.DemandAnyThreadSafe, StagesBefore = [| typeof<GlobalFileStructureCollectorStage> |])>]
type PatternTypeHintsStage() =
inherit FSharpDaemonStageBase(true, false)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -165,7 +166,7 @@ type PipeChainHighlightingProcess(fsFile, settings: IContextBoundSettingsStore,

committer.Invoke(DaemonStageResult remainingHighlightings)

[<DaemonStage(StagesBefore = [| typeof<GlobalFileStructureCollectorStage> |])>]
[<DaemonStage(Instantiation.DemandAnyThreadSafe, StagesBefore = [| typeof<GlobalFileStructureCollectorStage> |])>]
type PipeChainTypeHintStage() =
inherit FSharpDaemonStageBase(true, false)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -11,7 +12,7 @@ open JetBrains.ReSharper.Psi
open JetBrains.ReSharper.Psi.Tree
open JetBrains.Util

[<DaemonStage(StagesBefore = [| typeof<GlobalFileStructureCollectorStage> |], StagesAfter = [| typeof<HighlightIdentifiersStage> |])>]
[<DaemonStage(Instantiation.DemandAnyThreadSafe, StagesBefore = [| typeof<GlobalFileStructureCollectorStage> |], StagesAfter = [| typeof<HighlightIdentifiersStage> |])>]
type ScriptLoadPathsStage() =
inherit FSharpDaemonStageBase(true) // todo: should report for closed files

Expand Down
Original file line number Diff line number Diff line change
@@ -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

[<DaemonStage(StagesBefore = [| typeof<GlobalFileStructureCollectorStage> |],
[<DaemonStage(Instantiation.DemandAnyThreadSafe,
StagesBefore = [| typeof<GlobalFileStructureCollectorStage> |],
StagesAfter = [| typeof<HighlightIdentifiersStage> |])>]
type SyntaxErrorsStage() =
inherit FSharpDaemonStageBase()
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

[<DaemonStage(StagesBefore = [| typeof<HighlightIdentifiersStage> |], StagesAfter = [| typeof<CollectUsagesStage> |])>]
[<DaemonStage(Instantiation.DemandAnyThreadSafe, StagesBefore = [| typeof<HighlightIdentifiersStage> |], StagesAfter = [| typeof<CollectUsagesStage> |])>]
type UnusedOpensStage() =
inherit FSharpDaemonStageBase()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions ReSharper.FSharp/src/FSharp/PackagesLock.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
<PackageLock Include="Fantomas.Core" Version="6.3.15" />
<PackageLock Include="FSharp.Core" Version="9.0.100-beta.24466.6" />
<PackageLock Include="JetBrains.Annotations" Version="2024.3.0" />
<PackageLock Include="JetBrains.Build.Platform.DistributedCache" Version="1.1.20241202.225" />
<PackageLock Include="JetBrains.Build.Platform.DistributedCache" Version="1.1.20250116.227" />
<PackageLock Include="JetBrains.FSharp.Compiler.Service" Version="2025.1.0" />
<PackageLock Include="JetBrains.HabitatDetector" Version="1.4.3" />
<PackageLock Include="JetBrains.Lifetimes" Version="2024.3.0" />
<PackageLock Include="JetBrains.NuGet.Packaging" Version="6.12.20241210.146" />
<PackageLock Include="JetBrains.NuGet.Versioning" Version="6.12.20241210.146" />
<PackageLock Include="JetBrains.NuGet.Packaging" Version="6.12.20250115.147" />
<PackageLock Include="JetBrains.NuGet.Versioning" Version="6.12.20250115.147" />
<PackageLock Include="JetBrains.RdFramework" Version="2024.3.0" />
<PackageLock Include="JetBrains.ReSharper.TestRunner.Abstractions" Version="2.16.1" />
<PackageLock Include="NVelocity" Version="1.0.3" />
<PackageLock Include="System.Collections.Immutable" Version="8.0.0" />
<PackageLock Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ type MyTestSolutionToolset(lifetime: Lifetime, dotNetCoreInstallationsDetector:



[<ShellComponent>]
[<ShellComponent(Instantiation.DemandAnyThreadSafe)>]
[<ZoneMarker(typeof<ICommonTestFSharpPluginZone>)>]
type FSharpFileServiceStub() =
interface IFSharpFileService with
Expand Down
2 changes: 1 addition & 1 deletion ReSharper.FSharp/test/src/FSharp.Tests.Common/src/Stubs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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

[<ShellComponent>]
[<ShellComponent(Instantiation.DemandAnyThreadSafe)>]
[<ZoneMarker(typeof<ITestFSharpPluginZone>)>]
type FSharpFileServiceStub() =

Expand Down
6 changes: 3 additions & 3 deletions ReSharper.FSharp/test/src/PackagesLock.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<PackageLock Include="FSharp.Core" Version="9.0.100-beta.24466.6" />
<PackageLock Include="JetBrains.FSharp.Compiler.Service" Version="2025.1.0" />
<PackageLock Include="JetBrains.Lifetimes" Version="2024.3.0" />
<PackageLock Include="JetBrains.NuGet.Frameworks" Version="6.12.20241210.146" />
<PackageLock Include="JetBrains.NuGet.Packaging" Version="6.12.20241210.146" />
<PackageLock Include="JetBrains.NuGet.Versioning" Version="6.12.20241210.146" />
<PackageLock Include="JetBrains.NuGet.Frameworks" Version="6.12.20250115.147" />
<PackageLock Include="JetBrains.NuGet.Packaging" Version="6.12.20250115.147" />
<PackageLock Include="JetBrains.NuGet.Versioning" Version="6.12.20250115.147" />
<PackageLock Include="JetBrains.RdFramework" Version="2024.3.0" />
<PackageLock Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageLock Include="Microsoft.NETCore.Platforms" Version="1.1.1" />
Expand Down
8 changes: 5 additions & 3 deletions rider-fsharp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -291,7 +294,6 @@ tasks {
}

buildSearchableOptions {
jvmArgs("-Djava.security.manager=com.intellij.platform.core.nio.fs.CoreBootstrapSecurityManager")
enabled = buildConfiguration == "Release"
}
}
Expand Down
2 changes: 1 addition & 1 deletion rider-fsharp/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading