Skip to content

Revert "GitHub Actions: bump to .NET 8.0.2 (#853)" #859

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

Merged
merged 1 commit into from
May 9, 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
2 changes: 1 addition & 1 deletion ReSharper.FSharp/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.200",
"version": "8.0.100",
"rollForward": "latestMinor",
"allowPrerelease": false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ type FcsProjectProvider(lifetime: Lifetime, solution: ISolution, changeManager:
if isScriptLike sourceFile then false else

tryGetFcsProject sourceFile.PsiModule
|> Option.map _.ImplementationFilesWithSignatures.Contains(sourceFile.GetLocation())
|> Option.map (fun project -> project.ImplementationFilesWithSignatures.Contains(sourceFile.GetLocation()))
|> Option.defaultValue false

member x.GetParsingOptions(sourceFile) =
Expand All @@ -546,7 +546,7 @@ type FcsProjectProvider(lifetime: Lifetime, solution: ISolution, changeManager:
if isScriptLike sourceFile then 0 else

tryGetFcsProject sourceFile.PsiModule
|> Option.map _.GetIndex(sourceFile)
|> Option.map (fun project -> project.GetIndex(sourceFile))
|> Option.defaultValue -1

member x.ProjectRemoved = fcsProjectInvalidated :> _
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ type ScriptFcsProjectProvider(lifetime: Lifetime, logger: ILogger, checkerServic
getDefaultOptions path |> createFcsProject path

let getOptions path source : FSharpProjectOptions option =
getFcsProject path source true |> Option.map _.ProjectOptions
getFcsProject path source true |> Option.map (fun fcsProject -> fcsProject.ProjectOptions)

interface IScriptFcsProjectProvider with
member x.GetScriptOptions(path: VirtualFileSystemPath, source) =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ module FSharpLanguageLevel =
let levelProvider =
psiModule.GetPsiServices()
.GetComponent<SolutionFeaturePartsContainer>()
.GetFeatureParts<ILanguageLevelProvider<FSharpLanguageLevel, FSharpLanguageVersion>>(_.IsApplicable(psiModule))
.GetFeatureParts<ILanguageLevelProvider<FSharpLanguageLevel, FSharpLanguageVersion>>(fun p ->
p.IsApplicable(psiModule))
.SingleItem()

levelProvider.GetLanguageLevel(psiModule)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ let getReferencedModules (psiModule: IPsiModule) =
match reference.Module with
| :? IProjectPsiModule as projectPsiModule -> projectPsiModule != containingModule
| _ -> true)
|> Seq.map _.Module
|> Seq.map (fun reference -> reference.Module)

module ModulePathProvider =
let outputPathKey = Key<VirtualFileSystemPath>("AssemblyReaderTest.outputPath")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ type FSharpScriptPsiModulesProvider(lifetime: Lifetime, solution: ISolution, cha
let platformInfos = platformManager.GetAllCompilePlatforms().AsList()
if platformInfos.IsEmpty() then TargetFrameworkId.Default else

let platformInfo = platformInfos |> Seq.maxBy _.TargetFrameworkId.Version
let platformInfo = platformInfos |> Seq.maxBy (fun info -> info.TargetFrameworkId.Version)
platformInfo.TargetFrameworkId
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ type FSharpItemsContainer(lifetime: Lifetime, logger: ILogger, containerLoader:
let tryGetProjectItem (viewItem: FSharpViewItem) =
tryGetProjectMark viewItem.ProjectItem
|> Option.bind tryGetProjectMapping
|> Option.bind _.TryGetProjectItem(viewItem)
|> Option.bind (fun mapping -> mapping.TryGetProjectItem(viewItem))

let getItems (toolsetVersion: NuGetVersion) (msBuildProject: MsBuildProject) projectDescriptor
(itemTypeFilter: MsBuildProjectItem -> bool) (itemsByName: HashSet<_>) allowNonDefaultItemType =
Expand Down Expand Up @@ -375,12 +375,12 @@ type FSharpItemsContainer(lifetime: Lifetime, logger: ILogger, containerLoader:

member x.TryGetSortKey(viewItem: FSharpViewItem) =
use lock = locker.UsingReadLock()
tryGetProjectItem viewItem |> Option.map _.SortKey
tryGetProjectItem viewItem |> Option.map (fun item -> item.SortKey)

member x.GetProjectItemsPaths(projectMark, targetFrameworkId) =
use lock = locker.UsingReadLock()
tryGetProjectMapping projectMark
|> Option.map _.GetProjectItemsPaths(targetFrameworkId)
|> Option.map (fun mapping -> mapping.GetProjectItemsPaths(targetFrameworkId))
|> Option.defaultValue [| |]

member this.RemoveProject(project) =
Expand Down Expand Up @@ -443,7 +443,7 @@ type ProjectMapping(projectDirectory, projectUniqueName, targetFrameworkIds: ISe

let getChildrenSorted (parent: FSharpProjectModelElement) =
children[parent]
|> Seq.sortBy _.SortKey
|> Seq.sortBy (fun x -> x.SortKey)

let getNewSortKey parent =
children[parent].Count + 1
Expand All @@ -468,7 +468,7 @@ type ProjectMapping(projectDirectory, projectUniqueName, targetFrameworkIds: ISe

let getOrCreateFolder folderRefresher parent path =
folders[path]
|> Seq.sortBy _.SortKey
|> Seq.sortBy (fun item -> item.SortKey)
|> Seq.tryLast
|> Option.defaultWith (fun _ ->
folderRefresher parent
Expand Down Expand Up @@ -1005,7 +1005,7 @@ type ProjectMapping(projectDirectory, projectUniqueName, targetFrameworkIds: ISe

let modifiedItemLocation =
modifiedViewItem
|> Option.map _.ProjectItem.Location
|> Option.map (fun item -> item.ProjectItem.Location)
|> Option.defaultValue null

match getRelativeChildPathImpl relativeItem modifiedItemCompilerOrder relativeToType with
Expand Down Expand Up @@ -1234,7 +1234,7 @@ type FSharpItemsContainerRefresher(lifetime: Lifetime, solution: ISolution, view

// todo: single identity
member x.RefreshFolder(projectMark, folder, _) =
refresh projectMark _.FindProjectItemsByLocation(folder).OfType<IProjectFolder>()
refresh projectMark (fun project -> project.FindProjectItemsByLocation(folder).OfType<IProjectFolder>())

member x.UpdateFile(projectMark, path) =
update projectMark path (function
Expand All @@ -1257,7 +1257,7 @@ type FSharpItemsContainerRefresher(lifetime: Lifetime, solution: ISolution, view
tryGetProject projectMark
|> Option.bind (fun project ->
project.FindProjectItemsByLocation(filePath).OfType<IProjectFile>() |> Seq.tryHead)
|> Option.filter _.IsValid()
|> Option.filter (fun projectFile -> projectFile.IsValid())
|> Option.iter (fun projectFile ->

let navigationManager = NavigationManager.GetInstance(solution)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,32 +206,32 @@ type FSharpOptionsPage(lifetime: Lifetime, optionsPageContext, settings,

do
this.AddHeader("Imports")
this.AddBoolOption(_.TopLevelOpenCompletion, RichText(topLevelOpenCompletion), null) |> ignore
this.AddBoolOption((fun key -> key.TopLevelOpenCompletion), RichText(topLevelOpenCompletion), null) |> ignore

this.AddHeader("Script editing")
this.AddComboEnum(_.LanguageVersion, FSharpScriptOptions.languageVersion, FSharpLanguageVersion.toString) |> ignore
this.AddComboEnum((fun key -> key.LanguageVersion), FSharpScriptOptions.languageVersion, FSharpLanguageVersion.toString) |> ignore
if PlatformUtil.IsRunningUnderWindows then
this.AddBoolOption(_.TargetNetFramework, RichText(FSharpScriptOptions.targetNetFramework)) |> ignore
this.AddBoolOptionWithComment(_.FsiInteractiveEditor, FSharpExperimentalFeatures.fsiInteractiveEditor, "Experimental") |> ignore
this.AddBoolOption((fun key -> key.TargetNetFramework), RichText(FSharpScriptOptions.targetNetFramework)) |> ignore
this.AddBoolOptionWithComment((fun key -> key.FsiInteractiveEditor), FSharpExperimentalFeatures.fsiInteractiveEditor, "Experimental") |> ignore

this.AddHeader("F# Compiler Service")
this.AddBoolOptionWithComment(_.SkipImplementationAnalysis, skipImplementationAnalysis, "Requires restart") |> ignore
this.AddBoolOptionWithComment(_.ParallelProjectReferencesAnalysis, parallelProjectReferencesAnalysis, "Requires restart") |> ignore
this.AddBoolOptionWithComment(_.OutOfProcessTypeProviders, FSharpExperimentalFeatures.outOfProcessTypeProviders, "Requires restart") |> ignore
this.AddBoolOptionWithComment((fun key -> key.SkipImplementationAnalysis), skipImplementationAnalysis, "Requires restart") |> ignore
this.AddBoolOptionWithComment((fun key -> key.ParallelProjectReferencesAnalysis), parallelProjectReferencesAnalysis, "Requires restart") |> ignore
this.AddBoolOptionWithComment((fun key -> key.OutOfProcessTypeProviders), FSharpExperimentalFeatures.outOfProcessTypeProviders, "Requires restart") |> ignore

do
use indent = this.Indent()
[ this.AddBoolOptionWithComment(_.GenerativeTypeProvidersInMemoryAnalysis, FSharpExperimentalFeatures.generativeTypeProvidersInMemoryAnalysis, "Requires restart") ]
[ this.AddBoolOptionWithComment((fun key -> key.GenerativeTypeProvidersInMemoryAnalysis), FSharpExperimentalFeatures.generativeTypeProvidersInMemoryAnalysis, "Requires restart") ]
|> Seq.iter (fun checkbox ->
this.AddBinding(checkbox, BindingStyle.IsEnabledProperty, _.OutOfProcessTypeProviders, fun t -> t :> obj))
this.AddBinding(checkbox, BindingStyle.IsEnabledProperty, (fun key -> key.OutOfProcessTypeProviders), fun t -> t :> obj))

this.AddBoolOptionWithComment(_.NonFSharpProjectInMemoryReferences, nonFSharpProjectInMemoryReferences, "Requires restart") |> ignore
this.AddBoolOptionWithComment((fun key -> key.NonFSharpProjectInMemoryReferences), nonFSharpProjectInMemoryReferences, "Requires restart") |> ignore

if configurations.IsInternalMode() then
this.AddHeader("Experimental features")
this.AddBoolOption(_.PostfixTemplates, RichText(FSharpExperimentalFeatures.postfixTemplates), null) |> ignore
this.AddBoolOption(_.RedundantParensAnalysis, RichText(FSharpExperimentalFeatures.redundantParenAnalysis), null) |> ignore
this.AddBoolOption(_.Formatter, RichText(FSharpExperimentalFeatures.formatter), null) |> ignore
this.AddBoolOption((fun key -> key.PostfixTemplates), RichText(FSharpExperimentalFeatures.postfixTemplates), null) |> ignore
this.AddBoolOption((fun key -> key.RedundantParensAnalysis), RichText(FSharpExperimentalFeatures.redundantParenAnalysis), null) |> ignore
this.AddBoolOption((fun key -> key.Formatter), RichText(FSharpExperimentalFeatures.formatter), null) |> ignore


[<ShellComponent>]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ type AssemblyReaderShim(lifetime: Lifetime, changeManager: ChangeManager, psiMod
for KeyValue(dependency, referencedModule) in referencedModules do
builder.AppendLine($" {dependency.Project.Name}, IsValid: {dependency.Project.IsValid()}") |> ignore
let referencingModules = referencedModule.ReferencingProjects
for referencing in referencingModules |> Seq.sortBy _.Project.Name do
for referencing in referencingModules |> Seq.sortBy (fun projectKey -> projectKey.Project.Name) do
builder.AppendLine($" {referencing.Project.Name}") |> ignore

if dirtyModules.Count > 0 then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ type ProjectFcsModuleReader(psiModule: IPsiModule, cache: FcsModuleReaderCommonC

let typeNames =
clrTypeName.TypeNames
|> Seq.map _.TypeName
|> Seq.map (fun n -> n.TypeName)
|> String.concat "."

let name =
Expand Down Expand Up @@ -1041,16 +1041,16 @@ type ProjectFcsModuleReader(psiModule: IPsiModule, cache: FcsModuleReaderCommonC


let getOrCreateMethods (table: FcsTypeDefMembers) (typeName: IClrTypeName) =
getOrCreateMembers table typeName EmptyArray.Instance _.Methods
getOrCreateMembers table typeName EmptyArray.Instance (fun members -> members.Methods)

let getOrCreateFields (table: FcsTypeDefMembers) (typeName: IClrTypeName) =
getOrCreateMembers table typeName [] _.Fields
getOrCreateMembers table typeName [] (fun members -> members.Fields)

let getOrCreateProperties (table: FcsTypeDefMembers) (typeName: IClrTypeName) =
getOrCreateMembers table typeName [] _.Properties
getOrCreateMembers table typeName [] (fun members -> members.Properties)

let getOrCreateEvents (table: FcsTypeDefMembers) (typeName: IClrTypeName) =
getOrCreateMembers table typeName [] _.Events
getOrCreateMembers table typeName [] (fun members -> members.Events)

let getOrCreateNestedTypes (table: FcsTypeDefMembers) reader (typeName: IClrTypeName) =
getOrCreateNestedTypes table typeName [||] reader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type ElementProblemAnalyzerData with
match psiModule with
| :? FSharpScriptPsiModule ->
let psiModules = psiModule.GetPsiServices().Modules
psiModules.GetModuleReferences(psiModule) |> Seq.map _.Module
psiModules.GetModuleReferences(psiModule) |> Seq.map (fun reference -> reference.Module)
| _ ->
let project = psiModule.ContainingProjectModule.As<IProject>()
if isNull project || not project.IsFSharp then Seq.empty else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ type LambdaAnalyzer() =
let hasOptionalArg =
x.CurriedParameterGroups
|> Seq.concat
|> Seq.exists _.IsOptionalArg
|> Seq.exists (fun x -> x.IsOptionalArg)
if hasOptionalArg then null else ctor arg

| _ -> ctor arg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type XmlDocBlockAnalyzer(xmlAnalysisManager: XmlAnalysisManager) =

let analyses =
xmlAnalysisManager.Providers
|> Seq.collect _.GetAnalyses(xmlFile, daemonProcess, data.SettingsStore)
|> Seq.collect (fun provider -> provider.GetAnalyses(xmlFile, daemonProcess, data.SettingsStore))

let xmlConsumer = DefaultHighlightingConsumer(data.SourceFile)
let xmlAnalysisProcess = XmlAnalysisStageProcess(xmlFile, analyses, daemonProcess, xmlConsumer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ type FSharpTypeHintBulbActionsProvider(setting: Expression<Func<FSharpTypeHintOp
member _.GetOptionsPageId() = nameof(FSharpTypeHintsOptionsPage)

type FSharpTopLevelMembersTypeHintBulbActionsProvider private () =
inherit FSharpTypeHintBulbActionsProvider(_.ShowTypeHintsForTopLevelMembers, Strings.FSharpTypeHints_TopLevelMembersSettings_Header)
inherit FSharpTypeHintBulbActionsProvider((fun x -> x.ShowTypeHintsForTopLevelMembers), Strings.FSharpTypeHints_TopLevelMembersSettings_Header)
static member val Instance = FSharpTopLevelMembersTypeHintBulbActionsProvider()

type FSharpLocalBindingTypeHintBulbActionsProvider private () =
inherit FSharpTypeHintBulbActionsProvider(_.ShowTypeHintsForLocalBindings, Strings.FSharpTypeHints_LocalBindingsSettings_Header)
inherit FSharpTypeHintBulbActionsProvider((fun x -> x.ShowTypeHintsForLocalBindings), Strings.FSharpTypeHints_LocalBindingsSettings_Header)
static member val Instance = FSharpLocalBindingTypeHintBulbActionsProvider()

type FSharpOtherPatternsTypeHintBulbActionsProvider private () =
inherit FSharpTypeHintBulbActionsProvider(_.ShowForOtherPatterns, Strings.FSharpTypeHints_OtherPatternsSettings_Header)
inherit FSharpTypeHintBulbActionsProvider((fun x -> x.ShowForOtherPatterns), Strings.FSharpTypeHints_OtherPatternsSettings_Header)
static member val Instance = FSharpOtherPatternsTypeHintBulbActionsProvider()
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ type FSharpTypeHintsOptionsPage(lifetime: Lifetime, optionsPageContext: OptionsP
let checkbox =
this.AddBoolOption((fun (s: FSharpTypeHintOptions) -> s.HideSameLine),
Strings.FSharpTypeHints_HideSameLinePipe_Description)
this.AddBinding(checkbox, BindingStyle.IsEnabledProperty, _.ShowPipeReturnTypes, fun t -> t :> obj)
this.AddBinding(checkbox, BindingStyle.IsEnabledProperty, (fun key -> key.ShowPipeReturnTypes), fun t -> t :> obj)
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ type FSharpReformatCode(textControlManager: ITextControlManager) =
else
let textControl = textControlManager.VisibleTextControls
|> Seq.tryFind (fun c -> c.Document == document && c.Window.IsFocused.Value)
let cursorPosition = textControl |> Option.map _.Caret.Position.Value.ToDocLineColumn()
let cursorPosition = textControl |> Option.map (fun c -> c.Caret.Position.Value.ToDocLineColumn())
let formatResult = fantomasHost.FormatDocument(filePath, text, settings, parsingOptions, newLineText, cursorPosition, settingsStore)
let newCursorPosition = formatResult.CursorPosition

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ type FantomasHost(solution: ISolution, fantomasFactory: FantomasProcessFactory,
member x.DumpRunOptions() =
let versionToRun = fantomasDetector.VersionToRun.Value
fantomasDetector.GetSettings()
|> Seq.sortBy _.Key
|> Seq.sortBy (fun x -> x.Key)
|> Seq.map (fun x -> $"{x.Key}: Version = ({x.Value.Location}, {x.Value.Version}), Status = {x.Value.Status}")
|> String.concat "\n"
|> (+) $"Version to run: ({versionToRun.Location}, {versionToRun.Version})\n\n"
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ type FSharpCodeCompletionContext(context: CodeCompletionContext, fcsCompletionCo
completionType = CodeCompletionType.SmartCompletion || completionType = CodeCompletionType.BasicCompletion

member this.GetCheckResults() =
this.ParseAndCheckResults.Value |> Option.map _.CheckResults
this.ParseAndCheckResults.Value |> Option.map (fun results -> results.CheckResults)

[<IntellisensePart(Instantiation.DemandAnyThreadUnsafe)>]
type FSharpCodeCompletionContextProvider(fsXmlDocService: FSharpXmlDocService) =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type FSharpRelevanceRule() =

| :? FSharpField as field when
field.DeclaringEntity
|> Option.map _.IsEnum
|> Option.map (fun e -> e.IsEnum)
|> Option.defaultValue false ->
markRelevance item CLRLookupItemRelevance.EnumMembers

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ type GenerateLambdaRule() =
if not expectedType.IsFunctionType then false else

let fcsArgTypes = FcsTypeUtil.getFunctionTypeArgs false expectedType
let lambdaParamTypes = fcsArgTypes |> List.map _.MapType(referenceOwner)
let lambdaParamTypes = fcsArgTypes |> List.map (fun f -> f.MapType(referenceOwner))

let paramNames =
lambdaParamTypes
Expand All @@ -125,7 +125,7 @@ type GenerateLambdaRule() =

let text =
fcsArgTypes
|> List.map _.Format(displayContext)
|> List.map (fun arg -> arg.Format(displayContext))
|> String.concat " -> "

let presentationText = $"fun {text} ->"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type NamedUnionCaseFieldsPatRule() =
if isNull namedUnionCaseFieldsPat then Set.empty else

namedUnionCaseFieldsPat.FieldPatterns
|> Seq.map _.ShortName
|> Seq.map (fun fieldPat -> fieldPat.ShortName)
|> Seq.filter (fun name -> name <> SharedImplUtil.MISSING_DECLARATION_NAME)
|> Set.ofSeq

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ type OverrideMemberRule() =
mfvInstance.Mfv.CurriedParameterGroups
|> Seq.map (fun group ->
group
|> Seq.map _.Type.Instantiate(substitution).Format(displayContext)
|> Seq.map (fun p -> p.Type.Instantiate(substitution).Format(displayContext))
|> String.concat ", "
|> sprintf "(%s)"
)
Expand Down
Loading
Loading