From c5d74abd279358f7a812718ceb8938c7e5022ac6 Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 30 Nov 2022 14:49:02 +0100 Subject: [PATCH 01/26] Fixing parameter name hints for indexes --- .../src/FSharp.Editor/Hints/HintService.fs | 12 ++- .../Hints/InlineParameterNameHints.fs | 78 ++++++++++++++++--- .../src/FSharp.Editor/Hints/RoslynAdapter.fs | 1 + .../Hints/HintTestFramework.fs | 19 ++++- .../Hints/InlineParameterNameHintTests.fs | 25 ++++++ 5 files changed, 116 insertions(+), 19 deletions(-) diff --git a/vsintegration/src/FSharp.Editor/Hints/HintService.fs b/vsintegration/src/FSharp.Editor/Hints/HintService.fs index 6b23fe78506..8f0199eae41 100644 --- a/vsintegration/src/FSharp.Editor/Hints/HintService.fs +++ b/vsintegration/src/FSharp.Editor/Hints/HintService.fs @@ -9,7 +9,7 @@ open FSharp.Compiler.Symbols open Hints module HintService = - let private getHintsForSymbol parseResults hintKinds (symbolUse: FSharpSymbolUse) = + let private getHintsForSymbol source parseResults hintKinds (symbolUse: FSharpSymbolUse) = match symbolUse.Symbol with | :? FSharpMemberOrFunctionOrValue as symbol when hintKinds |> Set.contains HintKind.TypeHint @@ -21,7 +21,11 @@ module HintService = when hintKinds |> Set.contains HintKind.ParameterNameHint && InlineParameterNameHints.isMemberOrFunctionOrValueValidForHint symbol symbolUse -> - InlineParameterNameHints.getHintsForMemberOrFunctionOrValue parseResults symbol symbolUse + InlineParameterNameHints.getHintsForMemberOrFunctionOrValue + parseResults + source + symbol + symbolUse | :? FSharpUnionCase as symbol when hintKinds |> Set.contains HintKind.ParameterNameHint @@ -33,7 +37,7 @@ module HintService = | _ -> [] - let getHintsForDocument (document: Document) hintKinds userOpName cancellationToken = + let getHintsForDocument (document: Document) source hintKinds userOpName cancellationToken = async { if isSignatureFile document.FilePath then @@ -45,5 +49,5 @@ module HintService = return checkResults.GetAllUsesOfAllSymbolsInFile cancellationToken |> Seq.toList - |> List.collect (getHintsForSymbol parseResults hintKinds) + |> List.collect (getHintsForSymbol source parseResults hintKinds) } diff --git a/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs b/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs index 8fb16d16d04..c4e3131ed09 100644 --- a/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs +++ b/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs @@ -30,6 +30,61 @@ module InlineParameterNameHints = let private doesFieldNameExist (field: FSharpField) = not field.IsNameGenerated + // copypaste: https://stackoverflow.com/a/15993446/3232646 + let private allIndexesOf (value: string) (s: string) = + seq { + let mutable minIndex = s.IndexOf(value); + while (minIndex <> -1) do + yield minIndex; + minIndex <- s.IndexOf(value, minIndex + value.Length); + } + + // Fragile Roslyn arithmetics, don't try this at home. + // + // Why the hell is this so complicated? + // There can be (rarely) cases like there can be cases like + // .SymbolUse1().SymbolUse2() + // and we need to locate the last one + let getSymbolPosition + (symbolUse: FSharpSymbolUse) + (source: Microsoft.CodeAnalysis.Text.SourceText) = + + let symbolName = symbolUse.Symbol.DisplayNameCore + let symbolLine = symbolUse.Range.End.Line - 1 + let symbolRow = source.Lines.[symbolLine] + let symbolColumns = $"{symbolRow}" |> allIndexesOf symbolName + + if symbolColumns |> Seq.isEmpty + then None + else + let symbolColumn = + symbolColumns + |> Seq.where (fun column -> column < symbolUse.Range.EndColumn) + |> Seq.last + + let positionLine = symbolLine + 1 + let positionColumn = symbolColumn + symbolName.Length + 1 + Some (Position.mkPos positionLine positionColumn) + + let private getTupleRanges + (symbolUse: FSharpSymbolUse) + (source: Microsoft.CodeAnalysis.Text.SourceText) + (parseResults: FSharpParseFileResults) = + + getSymbolPosition symbolUse source + |> Option.bind (parseResults.FindParameterLocations) + |> Option.map (fun locations -> locations.ArgumentLocations) + |> Option.map (Seq.map (fun location -> location.ArgumentRange)) + |> Option.defaultValue [] + |> Seq.toList + + let private getCurryRanges + (symbolUse: FSharpSymbolUse) + (parseResults: FSharpParseFileResults) = + + parseResults.GetAllArgumentsForFunctionApplicationAtPosition symbolUse.Range.Start + |> Option.defaultValue [] + let isMemberOrFunctionOrValueValidForHint (symbol: FSharpMemberOrFunctionOrValue) (symbolUse: FSharpSymbolUse) = if symbolUse.IsFromUse then let isNotBuiltInOperator = @@ -48,22 +103,21 @@ module InlineParameterNameHints = let getHintsForMemberOrFunctionOrValue (parseResults: FSharpParseFileResults) + (source: Microsoft.CodeAnalysis.Text.SourceText) (symbol: FSharpMemberOrFunctionOrValue) (symbolUse: FSharpSymbolUse) = let parameters = symbol.CurriedParameterGroups |> Seq.concat - let ranges = parseResults.GetAllArgumentsForFunctionApplicationAtPosition symbolUse.Range.Start - - match ranges with - | Some ranges -> - parameters - |> Seq.zip ranges - |> Seq.where (snd >> doesParameterNameExist) - |> Seq.map getParameterHint - |> Seq.toList - - // this is the case at least for custom operators - | None -> [] + + let tupleRanges = parseResults |> getTupleRanges symbolUse source + let curryRanges = parseResults |> getCurryRanges symbolUse + let ranges = if tupleRanges |> (not << Seq.isEmpty) then tupleRanges else curryRanges + + parameters + |> Seq.zip ranges // Seq.zip is important as List.zip requires equal lengths + |> Seq.where (snd >> doesParameterNameExist) + |> Seq.map getParameterHint + |> Seq.toList let getHintsForUnionCase (parseResults: FSharpParseFileResults) diff --git a/vsintegration/src/FSharp.Editor/Hints/RoslynAdapter.fs b/vsintegration/src/FSharp.Editor/Hints/RoslynAdapter.fs index b6026d6da44..c95587d968f 100644 --- a/vsintegration/src/FSharp.Editor/Hints/RoslynAdapter.fs +++ b/vsintegration/src/FSharp.Editor/Hints/RoslynAdapter.fs @@ -31,6 +31,7 @@ type internal RoslynAdapter let! nativeHints = HintService.getHintsForDocument document + sourceText hintKinds userOpName cancellationToken diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index 751d089720c..539054f28a7 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -2,11 +2,15 @@ namespace FSharp.Editor.Tests.Hints +open System open System.Threading +open Microsoft.IO open Microsoft.VisualStudio.FSharp.Editor open Microsoft.VisualStudio.FSharp.Editor.Hints +open Microsoft.CodeAnalysis open Microsoft.CodeAnalysis.Text open Hints +open FSharp.Compiler.CodeAnalysis open FSharp.Editor.Tests.Helpers module HintTestFramework = @@ -15,6 +19,13 @@ module HintTestFramework = type TestHint = { Content: string; Location: int * int } + // like: C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0\ref\net7.0\mscorlib.dll + let locateMscorlib() = + let programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + let dotnetPacks = $"{programFiles}\dotnet\packs" + let mscorlibs = Directory.GetFiles(dotnetPacks, "mscorlib.dll", SearchOption.AllDirectories) + mscorlibs |> Seq.last + let private convert hint = let content = hint.Parts |> Seq.map (fun hintPart -> hintPart.Text) |> String.concat "" @@ -32,15 +43,17 @@ module HintTestFramework = let getFsDocument code = use project = SingleFileProject code let fileName = fst project.Files.Head - let document, _ = RoslynTestHelpers.CreateSingleDocumentSolution(fileName, code) + let options = { project.Options with OtherOptions = [|$"-r:{locateMscorlib()}"|] } + let document, _ = RoslynTestHelpers.CreateSingleDocumentSolution(fileName, code, options) document let getFsiAndFsDocuments (fsiCode: string) (fsCode: string) = RoslynTestHelpers.CreateTwoDocumentSolution("test.fsi", SourceText.From fsiCode, "test.fs", SourceText.From fsCode) - let getHints document hintKinds = + let getHints (document: Document) hintKinds = async { - let! hints = HintService.getHintsForDocument document hintKinds "test" CancellationToken.None + let! source = document.GetTextAsync(CancellationToken.None) |> Async.AwaitTask + let! hints = HintService.getHintsForDocument document source hintKinds "test" CancellationToken.None return hints |> Seq.map convert } |> Async.RunSynchronously diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/InlineParameterNameHintTests.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/InlineParameterNameHintTests.fs index 532ce7adfe1..5a49830098a 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/InlineParameterNameHintTests.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/InlineParameterNameHintTests.fs @@ -381,3 +381,28 @@ type X = let actual = getParameterNameHints document Assert.IsEmpty(actual) + + [] + let ``Hints are not shown in front of indexes`` () = + let code = + """ +let x = "test".Split("").[0].Split(""); +""" + + let document = getFsDocument code + + let expected = + [ + { + Content = "separator = " + Location = (1, 22) + } + { + Content = "separator = " + Location = (1, 36) + } + ] + + let actual = getParameterNameHints document + + Assert.AreEqual(expected, actual) From 0c8967394bf3216ce7d24d92c3d1156fb0e6ff23 Mon Sep 17 00:00:00 2001 From: Petr Date: Tue, 6 Dec 2022 19:28:44 +0100 Subject: [PATCH 02/26] A few comments --- .../src/FSharp.Editor/Hints/InlineParameterNameHints.fs | 4 +++- .../tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs b/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs index c4e3131ed09..8f0c8d5ab33 100644 --- a/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs +++ b/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs @@ -44,7 +44,9 @@ module InlineParameterNameHints = // Why the hell is this so complicated? // There can be (rarely) cases like there can be cases like // .SymbolUse1().SymbolUse2() - // and we need to locate the last one + // and we need to locate the last one. + // Hopefully someone will have a better way to do that one day, + // this is quite heavily tested so should be safe to refactor. let getSymbolPosition (symbolUse: FSharpSymbolUse) (source: Microsoft.CodeAnalysis.Text.SourceText) = diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index 539054f28a7..9c368ae8ebf 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -22,7 +22,7 @@ module HintTestFramework = // like: C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0\ref\net7.0\mscorlib.dll let locateMscorlib() = let programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) - let dotnetPacks = $"{programFiles}\dotnet\packs" + let dotnetPacks = $"{programFiles}\\dotnet\\packs" let mscorlibs = Directory.GetFiles(dotnetPacks, "mscorlib.dll", SearchOption.AllDirectories) mscorlibs |> Seq.last @@ -43,6 +43,7 @@ module HintTestFramework = let getFsDocument code = use project = SingleFileProject code let fileName = fst project.Files.Head + // I don't know, without this lib some symbols are just not loaded let options = { project.Options with OtherOptions = [|$"-r:{locateMscorlib()}"|] } let document, _ = RoslynTestHelpers.CreateSingleDocumentSolution(fileName, code, options) document From 7aae412dbddb51db6ebeb7c45c083306c8e9b62f Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 12:53:22 +0100 Subject: [PATCH 03/26] Update --- vsintegration/src/FSharp.Editor/Hints/HintService.fs | 3 ++- vsintegration/src/FSharp.Editor/Hints/RoslynAdapter.fs | 1 - .../tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/vsintegration/src/FSharp.Editor/Hints/HintService.fs b/vsintegration/src/FSharp.Editor/Hints/HintService.fs index 8f0199eae41..9470f853d89 100644 --- a/vsintegration/src/FSharp.Editor/Hints/HintService.fs +++ b/vsintegration/src/FSharp.Editor/Hints/HintService.fs @@ -37,12 +37,13 @@ module HintService = | _ -> [] - let getHintsForDocument (document: Document) source hintKinds userOpName cancellationToken = + let getHintsForDocument (document: Document) hintKinds userOpName cancellationToken = async { if isSignatureFile document.FilePath then return [] else + let! source = document.GetTextAsync() |> Async.AwaitTask let! parseResults, checkResults = document.GetFSharpParseAndCheckResultsAsync userOpName diff --git a/vsintegration/src/FSharp.Editor/Hints/RoslynAdapter.fs b/vsintegration/src/FSharp.Editor/Hints/RoslynAdapter.fs index c95587d968f..b6026d6da44 100644 --- a/vsintegration/src/FSharp.Editor/Hints/RoslynAdapter.fs +++ b/vsintegration/src/FSharp.Editor/Hints/RoslynAdapter.fs @@ -31,7 +31,6 @@ type internal RoslynAdapter let! nativeHints = HintService.getHintsForDocument document - sourceText hintKinds userOpName cancellationToken diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index 9c368ae8ebf..dbbfe15edca 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -51,10 +51,9 @@ module HintTestFramework = let getFsiAndFsDocuments (fsiCode: string) (fsCode: string) = RoslynTestHelpers.CreateTwoDocumentSolution("test.fsi", SourceText.From fsiCode, "test.fs", SourceText.From fsCode) - let getHints (document: Document) hintKinds = + let getHints document hintKinds = async { - let! source = document.GetTextAsync(CancellationToken.None) |> Async.AwaitTask - let! hints = HintService.getHintsForDocument document source hintKinds "test" CancellationToken.None + let! hints = HintService.getHintsForDocument document hintKinds "test" CancellationToken.None return hints |> Seq.map convert } |> Async.RunSynchronously From da8bd16f6bab427a6e0850b95fc79ae6005321ac Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 13:20:27 +0100 Subject: [PATCH 04/26] Update InlineParameterNameHints.fs --- .../src/FSharp.Editor/Hints/InlineParameterNameHints.fs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs b/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs index 8f0c8d5ab33..10cd8dee91b 100644 --- a/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs +++ b/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs @@ -58,14 +58,9 @@ module InlineParameterNameHints = if symbolColumns |> Seq.isEmpty then None - else - let symbolColumn = - symbolColumns - |> Seq.where (fun column -> column < symbolUse.Range.EndColumn) - |> Seq.last - + else let positionLine = symbolLine + 1 - let positionColumn = symbolColumn + symbolName.Length + 1 + let positionColumn = symbolUse.Range.End.Column + 1 Some (Position.mkPos positionLine positionColumn) let private getTupleRanges From 31d10b1298d794b36fe957a45f6ec85fb14b227c Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 13:25:55 +0100 Subject: [PATCH 05/26] Update --- .../src/FSharp.Editor/Hints/HintService.fs | 6 ++--- .../Hints/InlineParameterNameHints.fs | 22 +++++-------------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/vsintegration/src/FSharp.Editor/Hints/HintService.fs b/vsintegration/src/FSharp.Editor/Hints/HintService.fs index 9470f853d89..64bf972d8d5 100644 --- a/vsintegration/src/FSharp.Editor/Hints/HintService.fs +++ b/vsintegration/src/FSharp.Editor/Hints/HintService.fs @@ -9,7 +9,7 @@ open FSharp.Compiler.Symbols open Hints module HintService = - let private getHintsForSymbol source parseResults hintKinds (symbolUse: FSharpSymbolUse) = + let private getHintsForSymbol parseResults hintKinds (symbolUse: FSharpSymbolUse) = match symbolUse.Symbol with | :? FSharpMemberOrFunctionOrValue as symbol when hintKinds |> Set.contains HintKind.TypeHint @@ -23,7 +23,6 @@ module HintService = InlineParameterNameHints.getHintsForMemberOrFunctionOrValue parseResults - source symbol symbolUse @@ -43,12 +42,11 @@ module HintService = then return [] else - let! source = document.GetTextAsync() |> Async.AwaitTask let! parseResults, checkResults = document.GetFSharpParseAndCheckResultsAsync userOpName return checkResults.GetAllUsesOfAllSymbolsInFile cancellationToken |> Seq.toList - |> List.collect (getHintsForSymbol source parseResults hintKinds) + |> List.collect (getHintsForSymbol parseResults hintKinds) } diff --git a/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs b/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs index 10cd8dee91b..d704eb23a2b 100644 --- a/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs +++ b/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs @@ -48,27 +48,18 @@ module InlineParameterNameHints = // Hopefully someone will have a better way to do that one day, // this is quite heavily tested so should be safe to refactor. let getSymbolPosition - (symbolUse: FSharpSymbolUse) - (source: Microsoft.CodeAnalysis.Text.SourceText) = + (symbolUse: FSharpSymbolUse) = - let symbolName = symbolUse.Symbol.DisplayNameCore let symbolLine = symbolUse.Range.End.Line - 1 - let symbolRow = source.Lines.[symbolLine] - let symbolColumns = $"{symbolRow}" |> allIndexesOf symbolName - - if symbolColumns |> Seq.isEmpty - then None - else - let positionLine = symbolLine + 1 - let positionColumn = symbolUse.Range.End.Column + 1 - Some (Position.mkPos positionLine positionColumn) + let positionLine = symbolLine + 1 + let positionColumn = symbolUse.Range.End.Column + 1 + Some (Position.mkPos positionLine positionColumn) let private getTupleRanges (symbolUse: FSharpSymbolUse) - (source: Microsoft.CodeAnalysis.Text.SourceText) (parseResults: FSharpParseFileResults) = - getSymbolPosition symbolUse source + getSymbolPosition symbolUse |> Option.bind (parseResults.FindParameterLocations) |> Option.map (fun locations -> locations.ArgumentLocations) |> Option.map (Seq.map (fun location -> location.ArgumentRange)) @@ -100,13 +91,12 @@ module InlineParameterNameHints = let getHintsForMemberOrFunctionOrValue (parseResults: FSharpParseFileResults) - (source: Microsoft.CodeAnalysis.Text.SourceText) (symbol: FSharpMemberOrFunctionOrValue) (symbolUse: FSharpSymbolUse) = let parameters = symbol.CurriedParameterGroups |> Seq.concat - let tupleRanges = parseResults |> getTupleRanges symbolUse source + let tupleRanges = parseResults |> getTupleRanges symbolUse let curryRanges = parseResults |> getCurryRanges symbolUse let ranges = if tupleRanges |> (not << Seq.isEmpty) then tupleRanges else curryRanges From d055710a9b256d0b0f08cb1255855f94169b50ba Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 13:28:58 +0100 Subject: [PATCH 06/26] Update InlineParameterNameHints.fs --- .../Hints/InlineParameterNameHints.fs | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs b/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs index d704eb23a2b..3a5aadd906d 100644 --- a/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs +++ b/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs @@ -39,28 +39,17 @@ module InlineParameterNameHints = minIndex <- s.IndexOf(value, minIndex + value.Length); } - // Fragile Roslyn arithmetics, don't try this at home. - // - // Why the hell is this so complicated? - // There can be (rarely) cases like there can be cases like - // .SymbolUse1().SymbolUse2() - // and we need to locate the last one. - // Hopefully someone will have a better way to do that one day, - // this is quite heavily tested so should be safe to refactor. - let getSymbolPosition - (symbolUse: FSharpSymbolUse) = - - let symbolLine = symbolUse.Range.End.Line - 1 - let positionLine = symbolLine + 1 + let getSymbolPosition (symbolUse: FSharpSymbolUse) = + let positionLine = symbolUse.Range.End.Line let positionColumn = symbolUse.Range.End.Column + 1 - Some (Position.mkPos positionLine positionColumn) + Position.mkPos positionLine positionColumn let private getTupleRanges (symbolUse: FSharpSymbolUse) (parseResults: FSharpParseFileResults) = getSymbolPosition symbolUse - |> Option.bind (parseResults.FindParameterLocations) + |> parseResults.FindParameterLocations |> Option.map (fun locations -> locations.ArgumentLocations) |> Option.map (Seq.map (fun location -> location.ArgumentRange)) |> Option.defaultValue [] From 750745278397186400b8fb76b94f1f3df627f54c Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 13:31:52 +0100 Subject: [PATCH 07/26] Update --- vsintegration/src/FSharp.Editor/Hints/HintService.fs | 5 +---- .../FSharp.Editor/Hints/InlineParameterNameHints.fs | 11 +---------- .../FSharp.Editor.Tests/Hints/HintTestFramework.fs | 1 - 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/vsintegration/src/FSharp.Editor/Hints/HintService.fs b/vsintegration/src/FSharp.Editor/Hints/HintService.fs index 64bf972d8d5..6b23fe78506 100644 --- a/vsintegration/src/FSharp.Editor/Hints/HintService.fs +++ b/vsintegration/src/FSharp.Editor/Hints/HintService.fs @@ -21,10 +21,7 @@ module HintService = when hintKinds |> Set.contains HintKind.ParameterNameHint && InlineParameterNameHints.isMemberOrFunctionOrValueValidForHint symbol symbolUse -> - InlineParameterNameHints.getHintsForMemberOrFunctionOrValue - parseResults - symbol - symbolUse + InlineParameterNameHints.getHintsForMemberOrFunctionOrValue parseResults symbol symbolUse | :? FSharpUnionCase as symbol when hintKinds |> Set.contains HintKind.ParameterNameHint diff --git a/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs b/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs index 3a5aadd906d..37582971c31 100644 --- a/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs +++ b/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs @@ -30,15 +30,6 @@ module InlineParameterNameHints = let private doesFieldNameExist (field: FSharpField) = not field.IsNameGenerated - // copypaste: https://stackoverflow.com/a/15993446/3232646 - let private allIndexesOf (value: string) (s: string) = - seq { - let mutable minIndex = s.IndexOf(value); - while (minIndex <> -1) do - yield minIndex; - minIndex <- s.IndexOf(value, minIndex + value.Length); - } - let getSymbolPosition (symbolUse: FSharpSymbolUse) = let positionLine = symbolUse.Range.End.Line let positionColumn = symbolUse.Range.End.Column + 1 @@ -47,7 +38,7 @@ module InlineParameterNameHints = let private getTupleRanges (symbolUse: FSharpSymbolUse) (parseResults: FSharpParseFileResults) = - + getSymbolPosition symbolUse |> parseResults.FindParameterLocations |> Option.map (fun locations -> locations.ArgumentLocations) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index dbbfe15edca..2d6a902fcd3 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -7,7 +7,6 @@ open System.Threading open Microsoft.IO open Microsoft.VisualStudio.FSharp.Editor open Microsoft.VisualStudio.FSharp.Editor.Hints -open Microsoft.CodeAnalysis open Microsoft.CodeAnalysis.Text open Hints open FSharp.Compiler.CodeAnalysis From 5654ee677a9f287c822af2932c757688d14293c8 Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 13:45:02 +0100 Subject: [PATCH 08/26] Update InlineParameterNameHints.fs --- .../FSharp.Editor/Hints/InlineParameterNameHints.fs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs b/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs index 37582971c31..4d55fe98986 100644 --- a/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs +++ b/vsintegration/src/FSharp.Editor/Hints/InlineParameterNameHints.fs @@ -30,17 +30,15 @@ module InlineParameterNameHints = let private doesFieldNameExist (field: FSharpField) = not field.IsNameGenerated - let getSymbolPosition (symbolUse: FSharpSymbolUse) = - let positionLine = symbolUse.Range.End.Line - let positionColumn = symbolUse.Range.End.Column + 1 - Position.mkPos positionLine positionColumn - let private getTupleRanges (symbolUse: FSharpSymbolUse) (parseResults: FSharpParseFileResults) = - getSymbolPosition symbolUse - |> parseResults.FindParameterLocations + let position = Position.mkPos + (symbolUse.Range.End.Line) + (symbolUse.Range.End.Column + 1) + + parseResults.FindParameterLocations position |> Option.map (fun locations -> locations.ArgumentLocations) |> Option.map (Seq.map (fun location -> location.ArgumentRange)) |> Option.defaultValue [] From 56d0775ca26b412a2f88c47a64faf331bf494cd1 Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 15:48:38 +0100 Subject: [PATCH 09/26] trying smth out --- .../tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index 2d6a902fcd3..4eeb3491392 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -43,7 +43,7 @@ module HintTestFramework = use project = SingleFileProject code let fileName = fst project.Files.Head // I don't know, without this lib some symbols are just not loaded - let options = { project.Options with OtherOptions = [|$"-r:{locateMscorlib()}"|] } + let options = { project.Options with OtherOptions = [|(*$"-r:{locateMscorlib()}"*)|] } let document, _ = RoslynTestHelpers.CreateSingleDocumentSolution(fileName, code, options) document From 32b2d394535fd2fbee9a24c41a46313a33b004c2 Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 16:06:45 +0100 Subject: [PATCH 10/26] Update HintTestFramework.fs --- .../Hints/HintTestFramework.fs | 162 +++++++++++++++++- 1 file changed, 161 insertions(+), 1 deletion(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index 4eeb3491392..d578e201a79 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -43,7 +43,167 @@ module HintTestFramework = use project = SingleFileProject code let fileName = fst project.Files.Head // I don't know, without this lib some symbols are just not loaded - let options = { project.Options with OtherOptions = [|(*$"-r:{locateMscorlib()}"*)|] } + let options = { project.Options with OtherOptions = + [| + "-o:obj\\Debug\\net7.0\\FSharp.dll" + "-g" + "--debug:portable" + "--noframework" + "--define:TRACE" + "--define:DEBUG" + "--define:NET" + "--define:NET7_0" + "--define:NETCOREAPP" + "--define:NET5_0_OR_GREATER" + "--define:NET6_0_OR_GREATER" + "--define:NET7_0_OR_GREATER" + "--define:NETCOREAPP1_0_OR_GREATER" + "--define:NETCOREAPP1_1_OR_GREATER" + "--define:NETCOREAPP2_0_OR_GREATER" + "--define:NETCOREAPP2_1_OR_GREATER" + "--define:NETCOREAPP2_2_OR_GREATER" + "--define:NETCOREAPP3_0_OR_GREATER" + "--define:NETCOREAPP3_1_OR_GREATER" + "--optimize-" + "--tailcalls-" + "--target:exe" + "--nowarn:IL2121" + "--warn:3" + "--warnaserror:3239" + "--fullpaths" + "--flaterrors" + "--highentropyva+" + "--targetprofile:netcore" + "--nocopyfsharpcore" + "--deterministic+" + "--simpleresolution" + "-r:C:\\Users\\psemkin\\.nuget\\packages\\fsharp.core\\7.0.0\\lib\\netstandard2.1\\FSharp.Core.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\Microsoft.CSharp.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\Microsoft.VisualBasic.Core.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\Microsoft.VisualBasic.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\Microsoft.Win32.Primitives.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\Microsoft.Win32.Registry.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\netstandard.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.AppContext.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Buffers.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Collections.Concurrent.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Collections.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Collections.Immutable.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Collections.NonGeneric.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Collections.Specialized.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.ComponentModel.Annotations.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.ComponentModel.DataAnnotations.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.ComponentModel.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.ComponentModel.EventBasedAsync.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.ComponentModel.Primitives.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.ComponentModel.TypeConverter.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Configuration.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Console.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Core.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Data.Common.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Data.DataSetExtensions.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Data.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.Contracts.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.Debug.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.DiagnosticSource.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.FileVersionInfo.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.Process.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.StackTrace.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.TextWriterTraceListener.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.Tools.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.TraceSource.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.Tracing.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Drawing.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Drawing.Primitives.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Dynamic.Runtime.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Formats.Asn1.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Formats.Tar.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Globalization.Calendars.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Globalization.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Globalization.Extensions.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.Compression.Brotli.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.Compression.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.Compression.FileSystem.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.Compression.ZipFile.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.FileSystem.AccessControl.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.FileSystem.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.FileSystem.DriveInfo.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.FileSystem.Primitives.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.FileSystem.Watcher.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.IsolatedStorage.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.MemoryMappedFiles.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.Pipes.AccessControl.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.Pipes.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.UnmanagedMemoryStream.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Linq.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Linq.Expressions.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Linq.Parallel.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Linq.Queryable.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Memory.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Http.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Http.Json.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.HttpListener.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Mail.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.NameResolution.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.NetworkInformation.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Ping.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Primitives.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Quic.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Requests.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Security.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.ServicePoint.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Sockets.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.WebClient.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.WebHeaderCollection.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.WebProxy.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.WebSockets.Client.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.WebSockets.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Numerics.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Numerics.Vectors.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.ObjectModel.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.DispatchProxy.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.Emit.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.Emit.ILGeneration.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.Emit.Lightweight.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.Extensions.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.Metadata.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.Primitives.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.TypeExtensions.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Resources.Reader.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Resources.ResourceManager.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Resources.Writer.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.CompilerServices.Unsafe.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.CompilerServices.VisualC.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Extensions.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Handles.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.InteropServices.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.InteropServices.JavaScript.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.InteropServices.RuntimeInformation.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Intrinsics.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Loader.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Numerics.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Serialization.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Serialization.Formatters.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Serialization.Json.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Serialization.Primitives.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Serialization.Xml.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.AccessControl.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Claims.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.Algorithms.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.Cng.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.Csp.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.Encoding.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.OpenSsl.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.Primitives.dll" + "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.X509Certificates.dll" + "--ignorelinedirectives" + |] } let document, _ = RoslynTestHelpers.CreateSingleDocumentSolution(fileName, code, options) document From 748c9b3b148eea84b14a6b23605e1b049e228bfe Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 16:09:28 +0100 Subject: [PATCH 11/26] Update HintTestFramework.fs --- .../tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs | 1 - 1 file changed, 1 deletion(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index d578e201a79..4dec1cb5782 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -201,7 +201,6 @@ module HintTestFramework = "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.Encoding.dll" "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.OpenSsl.dll" "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.Primitives.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.X509Certificates.dll" "--ignorelinedirectives" |] } let document, _ = RoslynTestHelpers.CreateSingleDocumentSolution(fileName, code, options) From 26f25607e64409d46c3280467b8ab6fa020bea47 Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 16:10:00 +0100 Subject: [PATCH 12/26] Update HintTestFramework.fs --- .../tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index 4dec1cb5782..982c1364310 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -195,12 +195,6 @@ module HintTestFramework = "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.AccessControl.dll" "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Claims.dll" "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.Algorithms.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.Cng.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.Csp.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.Encoding.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.OpenSsl.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.Primitives.dll" "--ignorelinedirectives" |] } let document, _ = RoslynTestHelpers.CreateSingleDocumentSolution(fileName, code, options) From 7087cee0584d5b008636c62d904f83bc4d112f30 Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 16:10:49 +0100 Subject: [PATCH 13/26] Update HintTestFramework.fs --- .../Hints/HintTestFramework.fs | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index 982c1364310..ea18c8d8c2d 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -49,21 +49,6 @@ module HintTestFramework = "-g" "--debug:portable" "--noframework" - "--define:TRACE" - "--define:DEBUG" - "--define:NET" - "--define:NET7_0" - "--define:NETCOREAPP" - "--define:NET5_0_OR_GREATER" - "--define:NET6_0_OR_GREATER" - "--define:NET7_0_OR_GREATER" - "--define:NETCOREAPP1_0_OR_GREATER" - "--define:NETCOREAPP1_1_OR_GREATER" - "--define:NETCOREAPP2_0_OR_GREATER" - "--define:NETCOREAPP2_1_OR_GREATER" - "--define:NETCOREAPP2_2_OR_GREATER" - "--define:NETCOREAPP3_0_OR_GREATER" - "--define:NETCOREAPP3_1_OR_GREATER" "--optimize-" "--tailcalls-" "--target:exe" @@ -189,12 +174,6 @@ module HintTestFramework = "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Numerics.dll" "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Serialization.dll" "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Serialization.Formatters.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Serialization.Json.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Serialization.Primitives.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Serialization.Xml.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.AccessControl.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Claims.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Security.Cryptography.Algorithms.dll" "--ignorelinedirectives" |] } let document, _ = RoslynTestHelpers.CreateSingleDocumentSolution(fileName, code, options) From 0a2600bd7db45e328dd60d489c4af65132b2a985 Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 16:14:06 +0100 Subject: [PATCH 14/26] Update HintTestFramework.fs --- .../tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs | 2 -- 1 file changed, 2 deletions(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index ea18c8d8c2d..64d9b2acc03 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -45,7 +45,6 @@ module HintTestFramework = // I don't know, without this lib some symbols are just not loaded let options = { project.Options with OtherOptions = [| - "-o:obj\\Debug\\net7.0\\FSharp.dll" "-g" "--debug:portable" "--noframework" @@ -57,7 +56,6 @@ module HintTestFramework = "--warnaserror:3239" "--fullpaths" "--flaterrors" - "--highentropyva+" "--targetprofile:netcore" "--nocopyfsharpcore" "--deterministic+" From e8ee70d11de4b92da5917fe8d474c7642a1c652d Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 16:15:52 +0100 Subject: [PATCH 15/26] Update HintTestFramework.fs --- .../tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs | 3 --- 1 file changed, 3 deletions(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index 64d9b2acc03..e4de72fc571 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -170,9 +170,6 @@ module HintTestFramework = "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Intrinsics.dll" "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Loader.dll" "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Numerics.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Serialization.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Serialization.Formatters.dll" - "--ignorelinedirectives" |] } let document, _ = RoslynTestHelpers.CreateSingleDocumentSolution(fileName, code, options) document From 63dc0228d5501f9da76e00354bf629841c701188 Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 16:18:39 +0100 Subject: [PATCH 16/26] Update HintTestFramework.fs --- .../tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs | 3 --- 1 file changed, 3 deletions(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index e4de72fc571..1619c904c12 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -51,9 +51,6 @@ module HintTestFramework = "--optimize-" "--tailcalls-" "--target:exe" - "--nowarn:IL2121" - "--warn:3" - "--warnaserror:3239" "--fullpaths" "--flaterrors" "--targetprofile:netcore" From 1a55a35b2196e37659ce558a11fd8d90fb56af18 Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 16:19:10 +0100 Subject: [PATCH 17/26] Update HintTestFramework.fs --- .../tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs | 3 --- 1 file changed, 3 deletions(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index 1619c904c12..cfa68fee4e8 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -49,10 +49,7 @@ module HintTestFramework = "--debug:portable" "--noframework" "--optimize-" - "--tailcalls-" - "--target:exe" "--fullpaths" - "--flaterrors" "--targetprofile:netcore" "--nocopyfsharpcore" "--deterministic+" From 20103026041ae7068a0b89dc8f0afa1d4cb27d68 Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 16:19:49 +0100 Subject: [PATCH 18/26] Update HintTestFramework.fs --- .../tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs | 2 -- 1 file changed, 2 deletions(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index cfa68fee4e8..9dac79af097 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -48,11 +48,9 @@ module HintTestFramework = "-g" "--debug:portable" "--noframework" - "--optimize-" "--fullpaths" "--targetprofile:netcore" "--nocopyfsharpcore" - "--deterministic+" "--simpleresolution" "-r:C:\\Users\\psemkin\\.nuget\\packages\\fsharp.core\\7.0.0\\lib\\netstandard2.1\\FSharp.Core.dll" "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\Microsoft.CSharp.dll" From 34009eadd445a1604891b49c7edb209a8027051d Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 16:20:18 +0100 Subject: [PATCH 19/26] Update HintTestFramework.fs --- .../tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs | 2 -- 1 file changed, 2 deletions(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index 9dac79af097..93e3fb32d2c 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -48,10 +48,8 @@ module HintTestFramework = "-g" "--debug:portable" "--noframework" - "--fullpaths" "--targetprofile:netcore" "--nocopyfsharpcore" - "--simpleresolution" "-r:C:\\Users\\psemkin\\.nuget\\packages\\fsharp.core\\7.0.0\\lib\\netstandard2.1\\FSharp.Core.dll" "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\Microsoft.CSharp.dll" "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\Microsoft.VisualBasic.Core.dll" From 4befc25f640eff6bf851e33a3836883d55ab1857 Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 16:20:59 +0100 Subject: [PATCH 20/26] Update HintTestFramework.fs --- .../tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs | 1 - 1 file changed, 1 deletion(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index 93e3fb32d2c..0a8b7a03c18 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -46,7 +46,6 @@ module HintTestFramework = let options = { project.Options with OtherOptions = [| "-g" - "--debug:portable" "--noframework" "--targetprofile:netcore" "--nocopyfsharpcore" From f5c1e3f2b66f62fe90848a418fe06269d4e8f1d6 Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 16:29:06 +0100 Subject: [PATCH 21/26] Update HintTestFramework.fs --- .../tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs | 1 - 1 file changed, 1 deletion(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index 0a8b7a03c18..72d35ac582a 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -48,7 +48,6 @@ module HintTestFramework = "-g" "--noframework" "--targetprofile:netcore" - "--nocopyfsharpcore" "-r:C:\\Users\\psemkin\\.nuget\\packages\\fsharp.core\\7.0.0\\lib\\netstandard2.1\\FSharp.Core.dll" "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\Microsoft.CSharp.dll" "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\Microsoft.VisualBasic.Core.dll" From a5efeebae95c8448d57604dacf11ffa0057d6d0c Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 16:30:03 +0100 Subject: [PATCH 22/26] Update HintTestFramework.fs --- .../tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs | 1 - 1 file changed, 1 deletion(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index 72d35ac582a..eaf55209dc0 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -46,7 +46,6 @@ module HintTestFramework = let options = { project.Options with OtherOptions = [| "-g" - "--noframework" "--targetprofile:netcore" "-r:C:\\Users\\psemkin\\.nuget\\packages\\fsharp.core\\7.0.0\\lib\\netstandard2.1\\FSharp.Core.dll" "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\Microsoft.CSharp.dll" From e1d5b5396905883948f1e35183832729cd847056 Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 16:30:30 +0100 Subject: [PATCH 23/26] Update HintTestFramework.fs --- .../tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs | 1 - 1 file changed, 1 deletion(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index eaf55209dc0..b8d726fcf9b 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -45,7 +45,6 @@ module HintTestFramework = // I don't know, without this lib some symbols are just not loaded let options = { project.Options with OtherOptions = [| - "-g" "--targetprofile:netcore" "-r:C:\\Users\\psemkin\\.nuget\\packages\\fsharp.core\\7.0.0\\lib\\netstandard2.1\\FSharp.Core.dll" "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\Microsoft.CSharp.dll" From 4a86fb37c348ece357dee844c434f82d066878ce Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 16:34:44 +0100 Subject: [PATCH 24/26] Update HintTestFramework.fs --- .../Hints/HintTestFramework.fs | 116 +----------------- 1 file changed, 1 insertion(+), 115 deletions(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index b8d726fcf9b..08d8a8f60d3 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -42,121 +42,7 @@ module HintTestFramework = let getFsDocument code = use project = SingleFileProject code let fileName = fst project.Files.Head - // I don't know, without this lib some symbols are just not loaded - let options = { project.Options with OtherOptions = - [| - "--targetprofile:netcore" - "-r:C:\\Users\\psemkin\\.nuget\\packages\\fsharp.core\\7.0.0\\lib\\netstandard2.1\\FSharp.Core.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\Microsoft.CSharp.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\Microsoft.VisualBasic.Core.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\Microsoft.VisualBasic.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\Microsoft.Win32.Primitives.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\Microsoft.Win32.Registry.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\netstandard.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.AppContext.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Buffers.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Collections.Concurrent.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Collections.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Collections.Immutable.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Collections.NonGeneric.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Collections.Specialized.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.ComponentModel.Annotations.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.ComponentModel.DataAnnotations.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.ComponentModel.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.ComponentModel.EventBasedAsync.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.ComponentModel.Primitives.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.ComponentModel.TypeConverter.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Configuration.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Console.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Core.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Data.Common.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Data.DataSetExtensions.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Data.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.Contracts.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.Debug.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.DiagnosticSource.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.FileVersionInfo.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.Process.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.StackTrace.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.TextWriterTraceListener.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.Tools.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.TraceSource.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Diagnostics.Tracing.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Drawing.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Drawing.Primitives.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Dynamic.Runtime.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Formats.Asn1.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Formats.Tar.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Globalization.Calendars.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Globalization.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Globalization.Extensions.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.Compression.Brotli.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.Compression.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.Compression.FileSystem.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.Compression.ZipFile.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.FileSystem.AccessControl.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.FileSystem.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.FileSystem.DriveInfo.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.FileSystem.Primitives.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.FileSystem.Watcher.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.IsolatedStorage.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.MemoryMappedFiles.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.Pipes.AccessControl.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.Pipes.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.IO.UnmanagedMemoryStream.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Linq.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Linq.Expressions.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Linq.Parallel.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Linq.Queryable.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Memory.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Http.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Http.Json.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.HttpListener.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Mail.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.NameResolution.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.NetworkInformation.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Ping.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Primitives.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Quic.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Requests.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Security.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.ServicePoint.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.Sockets.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.WebClient.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.WebHeaderCollection.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.WebProxy.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.WebSockets.Client.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Net.WebSockets.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Numerics.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Numerics.Vectors.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.ObjectModel.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.DispatchProxy.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.Emit.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.Emit.ILGeneration.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.Emit.Lightweight.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.Extensions.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.Metadata.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.Primitives.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Reflection.TypeExtensions.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Resources.Reader.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Resources.ResourceManager.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Resources.Writer.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.CompilerServices.Unsafe.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.CompilerServices.VisualC.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Extensions.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Handles.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.InteropServices.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.InteropServices.JavaScript.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.InteropServices.RuntimeInformation.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Intrinsics.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Loader.dll" - "-r:C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\7.0.0\\ref\\net7.0\\System.Runtime.Numerics.dll" - |] } + let options = { project.Options with OtherOptions = [| "--targetprofile:netcore" |] } let document, _ = RoslynTestHelpers.CreateSingleDocumentSolution(fileName, code, options) document From 4dbf808f58fa76795f65926460581e8a8a764d68 Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 16:35:20 +0100 Subject: [PATCH 25/26] Update HintTestFramework.fs --- .../FSharp.Editor.Tests/Hints/HintTestFramework.fs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index 08d8a8f60d3..001d9e69985 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -2,9 +2,7 @@ namespace FSharp.Editor.Tests.Hints -open System open System.Threading -open Microsoft.IO open Microsoft.VisualStudio.FSharp.Editor open Microsoft.VisualStudio.FSharp.Editor.Hints open Microsoft.CodeAnalysis.Text @@ -18,13 +16,6 @@ module HintTestFramework = type TestHint = { Content: string; Location: int * int } - // like: C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0\ref\net7.0\mscorlib.dll - let locateMscorlib() = - let programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) - let dotnetPacks = $"{programFiles}\\dotnet\\packs" - let mscorlibs = Directory.GetFiles(dotnetPacks, "mscorlib.dll", SearchOption.AllDirectories) - mscorlibs |> Seq.last - let private convert hint = let content = hint.Parts |> Seq.map (fun hintPart -> hintPart.Text) |> String.concat "" @@ -42,6 +33,7 @@ module HintTestFramework = let getFsDocument code = use project = SingleFileProject code let fileName = fst project.Files.Head + // I don't know, without this lib some symbols are just not loaded let options = { project.Options with OtherOptions = [| "--targetprofile:netcore" |] } let document, _ = RoslynTestHelpers.CreateSingleDocumentSolution(fileName, code, options) document From 69741f28f34ab2ace953894b13b17d6ecdedfcdb Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Dec 2022 16:38:02 +0100 Subject: [PATCH 26/26] Update HintTestFramework.fs --- .../tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs | 1 - 1 file changed, 1 deletion(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs index 001d9e69985..f009feba036 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/Hints/HintTestFramework.fs @@ -7,7 +7,6 @@ open Microsoft.VisualStudio.FSharp.Editor open Microsoft.VisualStudio.FSharp.Editor.Hints open Microsoft.CodeAnalysis.Text open Hints -open FSharp.Compiler.CodeAnalysis open FSharp.Editor.Tests.Helpers module HintTestFramework =