From 0ec9ecaf75768f8df3537e47812ebc45600c3a45 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 29 Apr 2017 01:32:09 +0100 Subject: [PATCH 1/6] Fix 2823 - don't look in mono/4.5-api for F# interactive code --- src/fsharp/CompileOps.fs | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/fsharp/CompileOps.fs b/src/fsharp/CompileOps.fs index eb1c52d77a..8986f86358 100644 --- a/src/fsharp/CompileOps.fs +++ b/src/fsharp/CompileOps.fs @@ -2816,16 +2816,22 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) = if runningOnMono then [ let runtimeRoot = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() let runtimeRootWithoutSlash = runtimeRoot.TrimEnd('/', '\\') - let api = runtimeRootWithoutSlash + "-api" - yield runtimeRoot // The default FSharp.Core is found in lib/mono/4.5 - if Directory.Exists(api) then - yield api - let facades = Path.Combine(api, "Facades") - if Directory.Exists(facades) then - yield facades - let facades = Path.Combine(runtimeRoot, "Facades") - if Directory.Exists(facades) then - yield facades + match tcConfig.resolutionEnvironment with +#if !FSI_TODO_NETCORE + | ReferenceResolver.RuntimeLike -> + yield runtimeRoot +#endif + | _ -> + let api = runtimeRootWithoutSlash + "-api" + yield runtimeRoot // The default FSharp.Core is found in lib/mono/4.5 + if Directory.Exists(api) then + yield api + let facades = Path.Combine(api, "Facades") + if Directory.Exists(facades) then + yield facades + let facades = Path.Combine(runtimeRoot, "Facades") + if Directory.Exists(facades) then + yield facades ] else #endif From baa98f16e0b1a650f926f73512d1a1b6139ec094 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 29 Apr 2017 01:48:19 +0100 Subject: [PATCH 2/6] remove IVT for old things (#2946) * remove IVT for old things * remove IVT for old things --- .../InternalsVisibleTo.cs | 3 --- .../Project/InternalsVisibleTo.cs | 3 --- .../FSharp.ProjectSystem.FSharp/AssemblyInfo.fs | 4 ---- .../src/FSharp.UIResources/InternalsVisibleTo.cs | 3 --- vsintegration/src/FSharp.VS.FSI/AssemblyInfo.fs | 5 ----- .../unittests/Tests.LanguageService.Completion.fs | 12 ------------ .../unittests/Tests.LanguageService.Script.fs | 15 --------------- 7 files changed, 45 deletions(-) diff --git a/vsintegration/src/FSharp.LanguageService.Base/InternalsVisibleTo.cs b/vsintegration/src/FSharp.LanguageService.Base/InternalsVisibleTo.cs index 6b0c3755cf..820fefb62e 100644 --- a/vsintegration/src/FSharp.LanguageService.Base/InternalsVisibleTo.cs +++ b/vsintegration/src/FSharp.LanguageService.Base/InternalsVisibleTo.cs @@ -11,6 +11,3 @@ [assembly: InternalsVisibleTo("FSharp.ProjectSystem.FSharp, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] [assembly: InternalsVisibleTo("FSharp.Editor, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -// Expose internals to testhook infrastructure and the test driver -[assembly: InternalsVisibleTo("Tao.VSLanguages.FSharp, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("TNugget, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/InternalsVisibleTo.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/InternalsVisibleTo.cs index 2b0a62ef28..b6e91f41f3 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/InternalsVisibleTo.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/InternalsVisibleTo.cs @@ -7,6 +7,3 @@ [assembly: InternalsVisibleTo("VisualFSharp.Salsa, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] [assembly: InternalsVisibleTo("VisualFSharp.Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] [assembly: InternalsVisibleTo("FSharp.ProjectSystem.PropertyPages, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -// Expose internals to testhook infrastructure and the test driver -[assembly: InternalsVisibleTo("Tao.VSLanguages.FSharp, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("TNugget, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/AssemblyInfo.fs b/vsintegration/src/FSharp.ProjectSystem.FSharp/AssemblyInfo.fs index 3554721433..aa6549c8c8 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/AssemblyInfo.fs +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/AssemblyInfo.fs @@ -9,10 +9,6 @@ open Microsoft.VisualStudio.Shell [] [] -// For QA testdrivers and testhooks -[] -[] - [] do() diff --git a/vsintegration/src/FSharp.UIResources/InternalsVisibleTo.cs b/vsintegration/src/FSharp.UIResources/InternalsVisibleTo.cs index 6b0c3755cf..820fefb62e 100644 --- a/vsintegration/src/FSharp.UIResources/InternalsVisibleTo.cs +++ b/vsintegration/src/FSharp.UIResources/InternalsVisibleTo.cs @@ -11,6 +11,3 @@ [assembly: InternalsVisibleTo("FSharp.ProjectSystem.FSharp, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] [assembly: InternalsVisibleTo("FSharp.Editor, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -// Expose internals to testhook infrastructure and the test driver -[assembly: InternalsVisibleTo("Tao.VSLanguages.FSharp, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("TNugget, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] diff --git a/vsintegration/src/FSharp.VS.FSI/AssemblyInfo.fs b/vsintegration/src/FSharp.VS.FSI/AssemblyInfo.fs index 5a8ab326cc..b054db9156 100644 --- a/vsintegration/src/FSharp.VS.FSI/AssemblyInfo.fs +++ b/vsintegration/src/FSharp.VS.FSI/AssemblyInfo.fs @@ -14,11 +14,6 @@ open Microsoft.VisualStudio.Shell [] [] -// Expose internals to testhook infrastructure and the test driver -[] -[] -[] - [] do() diff --git a/vsintegration/tests/unittests/Tests.LanguageService.Completion.fs b/vsintegration/tests/unittests/Tests.LanguageService.Completion.fs index 341dd4013e..86266aa854 100644 --- a/vsintegration/tests/unittests/Tests.LanguageService.Completion.fs +++ b/vsintegration/tests/unittests/Tests.LanguageService.Completion.fs @@ -5567,18 +5567,6 @@ let x = query { for bbbb in abbbbc(*D0*) do let completions = DotCompletionAtStartOfMarker file "(*Mconstrainedtoint*)" AssertCompListContainsAll(completions, ["ToString"]) - [] - [] - member this.InternalNotVisibleInDiffAssembly() = - let fileContents = """ - module CodeAccessibility - let type1 = new InternalNotVisibleInDiffAssembly.Module1.Type1() - type1(*MarkerDiffAssmb*)""" - let (solution, project, file) = this.CreateSingleFileProject(fileContents, references = ["InternalNotVisibleDiffAssembly.Assembly.dll"]) - - let completions = DotCompletionAtStartOfMarker file "(*MarkerDiffAssmb*)" - AssertCompListDoesNotContainAny(completions, ["fieldInternal";"MethodInternal"]) - [] member this.``Literal.Float``() = this.VerifyDotCompListContainAllAtStartOfMarker( diff --git a/vsintegration/tests/unittests/Tests.LanguageService.Script.fs b/vsintegration/tests/unittests/Tests.LanguageService.Script.fs index b45237216c..b29287fc80 100644 --- a/vsintegration/tests/unittests/Tests.LanguageService.Script.fs +++ b/vsintegration/tests/unittests/Tests.LanguageService.Script.fs @@ -1556,21 +1556,6 @@ type UsingMSBuild() as this = "#load \"" // Unclosed "#load \"Hello There\""] ) - - //regression test for bug 2530 - [] - [] - member public this.``Fsx.IntellisenseForFSI``() = - let code = - ["module Script" - "fsi(*MarkerFSI*)" - ] - let (_, script1) = createSingleFileFsxFromLines code - TakeCoffeeBreak(this.VS) - let marker = "(*MarkerFSI*)" - let list = ["FormatProvider";"CommandLineArgs"] - let completions = DotCompletionAtStartOfMarker script1 marker - AssertCompListContainsAll(completions, list) [] [] From d2e4570c47de0dbfb85223971ab8f1a7740182c7 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 29 Apr 2017 01:48:34 +0100 Subject: [PATCH 3/6] remove incorrect use of pointer eqquality (#2945) --- src/fsharp/ConstraintSolver.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fsharp/ConstraintSolver.fs b/src/fsharp/ConstraintSolver.fs index ddeffb0b61..f1c0d451e3 100644 --- a/src/fsharp/ConstraintSolver.fs +++ b/src/fsharp/ConstraintSolver.fs @@ -2365,7 +2365,7 @@ and ResolveOverloading let bestMethods = applicableMeths |> List.choose (fun candidate -> if applicableMeths |> List.forall (fun other -> - candidate === other || // REVIEW: change this needless use of pointer equality to be an index comparison + p13 candidate === p13 other || // REVIEW: change this needless use of pointer equality to be an index comparison let res = better candidate other //eprintfn "\n-------\nCandidate: %s\nOther: %s\nResult: %d\n" (NicePrint.stringOfMethInfo amap m denv (fst candidate).Method) (NicePrint.stringOfMethInfo amap m denv (fst other).Method) res res > 0) then From 2f78fc2d5bd5d3b68f8fc4a973b0034d26110ba9 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 29 Apr 2017 02:39:08 +0100 Subject: [PATCH 4/6] Fix 2823 - don't look in mono/4.5-api for F# interactive code (#2949) --- src/fsharp/CompileOps.fs | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/fsharp/CompileOps.fs b/src/fsharp/CompileOps.fs index eb1c52d77a..8986f86358 100644 --- a/src/fsharp/CompileOps.fs +++ b/src/fsharp/CompileOps.fs @@ -2816,16 +2816,22 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) = if runningOnMono then [ let runtimeRoot = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() let runtimeRootWithoutSlash = runtimeRoot.TrimEnd('/', '\\') - let api = runtimeRootWithoutSlash + "-api" - yield runtimeRoot // The default FSharp.Core is found in lib/mono/4.5 - if Directory.Exists(api) then - yield api - let facades = Path.Combine(api, "Facades") - if Directory.Exists(facades) then - yield facades - let facades = Path.Combine(runtimeRoot, "Facades") - if Directory.Exists(facades) then - yield facades + match tcConfig.resolutionEnvironment with +#if !FSI_TODO_NETCORE + | ReferenceResolver.RuntimeLike -> + yield runtimeRoot +#endif + | _ -> + let api = runtimeRootWithoutSlash + "-api" + yield runtimeRoot // The default FSharp.Core is found in lib/mono/4.5 + if Directory.Exists(api) then + yield api + let facades = Path.Combine(api, "Facades") + if Directory.Exists(facades) then + yield facades + let facades = Path.Combine(runtimeRoot, "Facades") + if Directory.Exists(facades) then + yield facades ] else #endif From 4c57bddc68c5c8cc22b01b44cc80eac4be154dc2 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 29 Apr 2017 02:57:32 +0100 Subject: [PATCH 5/6] additional fix --- src/fsharp/CompileOps.fs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/fsharp/CompileOps.fs b/src/fsharp/CompileOps.fs index 8986f86358..a93b2896e3 100644 --- a/src/fsharp/CompileOps.fs +++ b/src/fsharp/CompileOps.fs @@ -2816,22 +2816,23 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) = if runningOnMono then [ let runtimeRoot = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() let runtimeRootWithoutSlash = runtimeRoot.TrimEnd('/', '\\') + let api = runtimeRootWithoutSlash + "-api" + let rootFacades = Path.Combine(runtimeRootWithoutSlash, "Facades") + let facades = Path.Combine(api, "Facades") match tcConfig.resolutionEnvironment with #if !FSI_TODO_NETCORE + // For F# Interactive code we must inly reference impementation assemblies | ReferenceResolver.RuntimeLike -> yield runtimeRoot + if Directory.Exists(rootFacades) then + yield rootFacades // System.Runtime.dll is in /usr/lib/mono/4.5/Facades #endif | _ -> - let api = runtimeRootWithoutSlash + "-api" - yield runtimeRoot // The default FSharp.Core is found in lib/mono/4.5 + yield runtimeRoot // The default FSharp.Core is found in lib/mono/4.5 if Directory.Exists(api) then - yield api - let facades = Path.Combine(api, "Facades") - if Directory.Exists(facades) then - yield facades - let facades = Path.Combine(runtimeRoot, "Facades") + yield api if Directory.Exists(facades) then - yield facades + yield facades ] else #endif From 0e8b9d0e8c7a25e96846c72e2862dd51bddf9e17 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 29 Apr 2017 03:13:30 +0100 Subject: [PATCH 6/6] fix build --- src/fsharp/CompileOps.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fsharp/CompileOps.fs b/src/fsharp/CompileOps.fs index 9066c78bd2..2401a7aafe 100644 --- a/src/fsharp/CompileOps.fs +++ b/src/fsharp/CompileOps.fs @@ -2836,7 +2836,7 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) = if Directory.Exists(api) then yield api if Directory.Exists(apiFacades) then - yield facades + yield apiFacades ] else #endif