diff --git a/FSharp.sln b/FSharp.sln index 094d4302e5c..83933b62da3 100644 --- a/FSharp.sln +++ b/FSharp.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.1.32113.165 +# Visual Studio Version 18 +VisualStudioVersion = 18.0.11104.47 d18.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core", "src\FSharp.Core\FSharp.Core.fsproj", "{DED3BBD7-53F4-428A-8C9F-27968E768605}" EndProject @@ -166,6 +166,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".VisualStudio", ".VisualStu docs\release-notes\.VisualStudio\17.9.md = docs\release-notes\.VisualStudio\17.9.md EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "eng", "eng", "{79E058E4-79E9-4178-AFA4-A87C45373379}" + ProjectSection(SolutionItems) = preProject + eng\Version.Details.props = eng\Version.Details.props + eng\Version.Details.xml = eng\Version.Details.xml + eng\Versions.props = eng\Versions.props + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8ea0933b348..1201edc60af 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,6 +42,38 @@ https://github.com/dotnet/runtime 9d5a6a9aa463d6d10b0b0ba6d5982cc82f363dc3 + + https://github.com/dotnet/roslyn + ebf60fd9876294d15a47407b468709db1b31cc91 + + + https://github.com/dotnet/roslyn + ebf60fd9876294d15a47407b468709db1b31cc91 + + + https://github.com/dotnet/roslyn + ebf60fd9876294d15a47407b468709db1b31cc91 + + + https://github.com/dotnet/roslyn + ebf60fd9876294d15a47407b468709db1b31cc91 + + + https://github.com/dotnet/roslyn + ebf60fd9876294d15a47407b468709db1b31cc91 + + + https://github.com/dotnet/roslyn + ebf60fd9876294d15a47407b468709db1b31cc91 + + + https://github.com/dotnet/roslyn + ebf60fd9876294d15a47407b468709db1b31cc91 + + + https://github.com/dotnet/roslyn + ebf60fd9876294d15a47407b468709db1b31cc91 + diff --git a/eng/Versions.props b/eng/Versions.props index 5c9c5316a3b..959c6e08039 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -93,105 +93,77 @@ 4.7.0 1.6.0 - 5.0.0-1.25276.102 - 17.14.188 - 17.14.40268 - 17.14.79 - 17.14.40254 - 17.14.15 + 18.0.332-preview + 18.0.2101-preview.1 + 18.0.1237-pre + 18.0.2077-preview.1 + 18.0.5 + - $(RoslynVersion) - $(RoslynVersion) - $(RoslynVersion) - 5.0.0-1.25275.2 - $(RoslynVersion) - $(RoslynVersion) - $(RoslynVersion) - $(RoslynVersion) + 5.0.0-2.25480.7 + 5.0.0-2.25480.7 + 5.0.0-2.25480.7 + 5.0.0-2.25480.7 + 5.0.0-2.25480.7 2.0.28 - $(RoslynVersion) + + 4.14.0 $(MicrosoftVisualStudioShellPackagesVersion) - $(MicrosoftVisualStudioShellPackagesVersion) $(VisualStudioShellProjectsPackages) - $(MicrosoftVisualStudioShellPackagesVersion) $(MicrosoftVisualStudioShellPackagesVersion) $(MicrosoftVisualStudioShellPackagesVersion) $(MicrosoftVisualStudioShellPackagesVersion) - $(MicrosoftVisualStudioShellPackagesVersion) $(MicrosoftVisualStudioShellPackagesVersion) - $(MicrosoftVisualStudioShellPackagesVersion) $(MicrosoftVisualStudioShellPackagesVersion) $(MicrosoftVisualStudioShellPackagesVersion) $(VisualStudioShellProjectsPackages) - $(VisualStudioShellProjectsPackages) - $(MicrosoftVisualStudioShellPackagesVersion) - 17.14.40270 $(MicrosoftVisualStudioShellPackagesVersion) - 17.14.40270 10.0.30319 11.0.50727 15.0.25123-Dev15Preview + - $(VisualStudioEditorPackagesVersion) $(VisualStudioEditorPackagesVersion) $(VisualStudioEditorPackagesVersion) - $(VisualStudioEditorPackagesVersion) $(VisualStudioEditorPackagesVersion) $(VisualStudioEditorPackagesVersion) - $(VisualStudioEditorPackagesVersion) $(VisualStudioEditorPackagesVersion) - $(VisualStudioEditorPackagesVersion) - $(VisualStudioEditorPackagesVersion) - 17.14.106 5.6.0 - 0.1.169-beta + 0.1.800-beta $(MicrosoftVisualStudioExtensibilityTestingVersion) - $(MicrosoftVisualStudioExtensibilityTestingVersion) - - + + $(MicrosoftVisualStudioThreadingPackagesVersion) - + $(VisualStudioProjectSystemPackagesVersion) 2.3.6152103 - + - 17.10.2179 - 17.14.20 + 17.14.2120 17.0.0 - 17.8.8 - 12.0.4 - 7.0.4 - 8.0.4 - 11.0.4 - 7.0.4 0.2.0 1.0.0 - 1.1.33 + 1.1.87 0.13.10 2.16.5 - 4.3.0.0 1.0.31 4.3.0-1.22220.8 - 3.1.0 + 5.0.0-preview.7.20364.11 5.0.0-preview.7.20364.11 - 17.11.1 + 17.14.1 13.0.3 - 1.0.0-beta2-dev3 - 2.22.11 - 2.12.87 2.9.0 - 2.8.2 + 3.1.4 3.1.17 - 2.2.0 diff --git a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj index 484f8acfbb0..c1aebde1ed3 100644 --- a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj +++ b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj @@ -5,7 +5,6 @@ $(FSharpNetCoreProductTargetFramework) win-x86;win-x64;linux-x64;osx-x64 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81 - true Library true xunit @@ -69,8 +68,22 @@ - - + + runtime; native + all + + + runtime; native + all + + + runtime; native + all + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + @@ -83,8 +96,6 @@ - - @@ -92,17 +103,10 @@ $(NoWarn);NU1510 - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + - diff --git a/tests/FSharp.Test.Utilities/TestFramework.fs b/tests/FSharp.Test.Utilities/TestFramework.fs index bbb1b556746..72dbfa46f3d 100644 --- a/tests/FSharp.Test.Utilities/TestFramework.fs +++ b/tests/FSharp.Test.Utilities/TestFramework.fs @@ -6,6 +6,7 @@ open System open System.IO open System.Diagnostics open System.Reflection +open System.Xml.Linq open Scripting open Xunit open FSharp.Compiler.IO @@ -269,8 +270,31 @@ let requireFile dir path = | Some _ -> fullPathLower | None -> failwith (sprintf "Couldn't find \"%s\" on the following paths: \"%s\", \"%s\". Running 'build test' once might solve this issue" path fullPath fullPathLower) +let SCRIPT_ROOT = __SOURCE_DIRECTORY__ +let repoRoot = SCRIPT_ROOT ++ ".." ++ ".." + +let loadVersionsProps () = + let versionsPropsPath = repoRoot ++ "eng" ++ "Versions.props" + if not (File.Exists versionsPropsPath) then + failwithf "Versions.props file not found at %s" versionsPropsPath + XDocument.Load(versionsPropsPath) + +let getMsbuildPropValue (xdoc: XDocument) (propName: string) = + xdoc.Descendants "PropertyGroup" + |> Seq.collect (fun pg -> pg.Elements()) + |> Seq.tryFind (fun el -> el.Name.LocalName = propName) + |> function + | Some el -> el.Value + | None -> failwithf "Property '%s' not found in Versions.props" propName + +// Usage example: +let versionsPropsDoc = loadVersionsProps () +let cscVersion = getMsbuildPropValue versionsPropsDoc "MicrosoftNetCompilersVersion" +let ildasmVersion = getMsbuildPropValue versionsPropsDoc "MicrosoftNETCoreILDAsmVersion" +let ilasmVersion = getMsbuildPropValue versionsPropsDoc "MicrosoftNETCoreILAsmVersion" + let config configurationName envVars = - let SCRIPT_ROOT = __SOURCE_DIRECTORY__ + let fsharpCoreArchitecture = "netstandard2.0" let fsharpBuildArchitecture = "netstandard2.0" let fsharpCompilerInteractiveSettingsArchitecture = "netstandard2.0" @@ -284,10 +308,8 @@ let config configurationName envVars = let fsiArchitecture = dotnetArchitecture //let peverifyArchitecture = dotnetArchitecture #endif - let repoRoot = SCRIPT_ROOT ++ ".." ++ ".." let artifactsPath = repoRoot ++ "artifacts" let artifactsBinPath = artifactsPath ++ "bin" - let coreClrRuntimePackageVersion = "5.0.0-preview.7.20364.11" let csc_flags = "/nologo" let vbc_flags = "/nologo" let fsc_flags = "-r:System.Core.dll --nowarn:20 --define:COMPILED --preferreduilang:en-US" @@ -298,12 +320,12 @@ let config configurationName envVars = let packagesDir = getPackagesDir () let requirePackage = requireFile packagesDir let requireArtifact = requireFile artifactsBinPath - let CSC = requirePackage ("Microsoft.Net.Compilers" ++ "4.3.0-1.22220.8" ++ "tools" ++ "csc.exe") - let VBC = requirePackage ("Microsoft.Net.Compilers" ++ "4.3.0-1.22220.8" ++ "tools" ++ "vbc.exe") + let CSC = requirePackage ("Microsoft.Net.Compilers" ++ cscVersion ++ "tools" ++ "csc.exe") + let VBC = requirePackage ("Microsoft.Net.Compilers" ++ cscVersion ++ "tools" ++ "vbc.exe") let ILDASM_EXE = if operatingSystem = "win" then "ildasm.exe" else "ildasm" - let ILDASM = requirePackage (("runtime." + operatingSystem + "-" + architectureMoniker + ".Microsoft.NETCore.ILDAsm") ++ coreClrRuntimePackageVersion ++ "runtimes" ++ (operatingSystem + "-" + architectureMoniker) ++ "native" ++ ILDASM_EXE) + let ILDASM = requirePackage (("runtime." + operatingSystem + "-" + architectureMoniker + ".Microsoft.NETCore.ILDAsm") ++ ildasmVersion ++ "runtimes" ++ (operatingSystem + "-" + architectureMoniker) ++ "native" ++ ILDASM_EXE) let ILASM_EXE = if operatingSystem = "win" then "ilasm.exe" else "ilasm" - let ILASM = requirePackage (("runtime." + operatingSystem + "-" + architectureMoniker + ".Microsoft.NETCore.ILAsm") ++ coreClrRuntimePackageVersion ++ "runtimes" ++ (operatingSystem + "-" + architectureMoniker) ++ "native" ++ ILASM_EXE) + let ILASM = requirePackage (("runtime." + operatingSystem + "-" + architectureMoniker + ".Microsoft.NETCore.ILAsm") ++ ilasmVersion ++ "runtimes" ++ (operatingSystem + "-" + architectureMoniker) ++ "native" ++ ILASM_EXE) //let PEVERIFY_EXE = if operatingSystem = "win" then "PEVerify.exe" elif operatingSystem = "osx" then "PEVerify.dll" else "PEVerify" let PEVERIFY = "ilverify" //requireArtifact ("PEVerify" ++ configurationName ++ peverifyArchitecture ++ PEVERIFY_EXE) // let FSI_FOR_SCRIPTS = artifactsBinPath ++ "fsi" ++ configurationName ++ fsiArchitecture ++ "fsi.exe" diff --git a/tests/FSharp.Test.Utilities/XunitHelpers.fs b/tests/FSharp.Test.Utilities/XunitHelpers.fs index 7e907492e65..562ae04ce9b 100644 --- a/tests/FSharp.Test.Utilities/XunitHelpers.fs +++ b/tests/FSharp.Test.Utilities/XunitHelpers.fs @@ -77,13 +77,23 @@ module TestCaseCustomizations = let oldTestClass = oldTestMethod.TestClass let oldTestCollection = oldTestMethod.TestClass.TestCollection + // Create a DETERMINISTIC collection ID based on the test case's unique ID + // This ensures the same test case always gets the same collection ID + let collectionId = + use sha = System.Security.Cryptography.SHA256.Create() + let bytes = System.Text.Encoding.UTF8.GetBytes(testCase.UniqueID) + let hash = sha.ComputeHash(bytes) + System.Guid(hash.[0..15]) // Take first 16 bytes for GUID + + let newDisplayName = $"{oldTestCollection.DisplayName}_{collectionId:N}" + // Create a new collection with a unique id for the test case. let newTestCollection = new TestCollection( oldTestCollection.TestAssembly, oldTestCollection.CollectionDefinition, - oldTestCollection.DisplayName, - Guid.NewGuid() + newDisplayName, + collectionId ) let newTestClass = new TestClass(newTestCollection, oldTestClass.Class) diff --git a/tests/fsharp/Compiler/Language/OptionalInteropTests.fs b/tests/fsharp/Compiler/Language/OptionalInteropTests.fs index 17f22bbe378..868d46de779 100644 --- a/tests/fsharp/Compiler/Language/OptionalInteropTests.fs +++ b/tests/fsharp/Compiler/Language/OptionalInteropTests.fs @@ -2,6 +2,7 @@ namespace FSharp.Compiler.UnitTests +open System open System.Collections.Immutable open Xunit open FSharp.Test diff --git a/tests/fsharp/FSharpSuite.Tests.fsproj b/tests/fsharp/FSharpSuite.Tests.fsproj index b4540de0b33..d1b45048e75 100644 --- a/tests/fsharp/FSharpSuite.Tests.fsproj +++ b/tests/fsharp/FSharpSuite.Tests.fsproj @@ -2,11 +2,10 @@ - net472;$(FSharpNetCoreProductTargetFramework) + net472;$(FSharpNetCoreProductTargetFramework) $(FSharpNetCoreProductTargetFramework) win-x86;win-x64 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81 - true Library true false @@ -112,27 +111,9 @@ - + false - - - - - - - - - - - - - - - - - - diff --git a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpDebug.csproj b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpDebug.csproj index 96fd6dc836d..5a6671c4d24 100644 --- a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpDebug.csproj +++ b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpDebug.csproj @@ -8,7 +8,9 @@ netcoreapp1.0 true net472 - true + true + false + true diff --git a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj index 10c18b8530e..49f1cc33ab6 100644 --- a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj +++ b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj @@ -9,7 +9,9 @@ true net472 - false + false + false + true diff --git a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj index 963332abc3c..26621fac1e6 100644 --- a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj +++ b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj @@ -170,36 +170,17 @@ + - - - - + - - - - - - - - - + - - - - - - - - - - + diff --git a/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs b/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs index 6c84d3fb810..cfb90fc9c37 100644 --- a/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs +++ b/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs @@ -26,6 +26,7 @@ open Microsoft.CodeAnalysis.Host.Mef open Microsoft.VisualStudio.FSharp.Editor.Telemetry open CancellableTasks open FSharp.Compiler.Text +open Microsoft.VisualStudio.Editor #nowarn "9" // NativePtr.toNativeInt #nowarn "57" // Experimental stuff @@ -461,11 +462,13 @@ type internal FSharpLanguageService(package: FSharpPackage) = let outliningManagerService = this.Package.ComponentModel.GetService() - let wpfTextView = this.EditorAdaptersFactoryService.GetWpfTextView(textView) + let wpfTextView = + this.Package.ComponentModel.GetService().GetWpfTextView(textView) + let outliningManager = outliningManagerService.GetOutliningManager(wpfTextView) if not (isNull outliningManager) then - let settings = this.Workspace.Services.GetService() + let settings = this.Workspace.Value.Services.GetService() outliningManager.Enabled <- settings.Advanced.IsOutliningEnabled [] diff --git a/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj b/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj index fead6828567..fbf420a0741 100644 --- a/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj +++ b/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj @@ -46,16 +46,9 @@ - - - - - - - diff --git a/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj b/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj index 9968c121f7c..0d948cc586b 100644 --- a/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj +++ b/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj @@ -56,24 +56,15 @@ - - - - - - - - - diff --git a/vsintegration/src/FSharp.LanguageService/ProjectSitesAndFiles.fs b/vsintegration/src/FSharp.LanguageService/ProjectSitesAndFiles.fs index b2a437dc99f..39fe59fc933 100644 --- a/vsintegration/src/FSharp.LanguageService/ProjectSitesAndFiles.fs +++ b/vsintegration/src/FSharp.LanguageService/ProjectSitesAndFiles.fs @@ -34,7 +34,6 @@ module internal rec Microsoft.VisualStudio.FSharp.LanguageService.SiteProvider open System open System.Collections.Concurrent -open System.ComponentModel.Composition open System.IO open System.Diagnostics open Microsoft.VisualStudio diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/FSharp.ProjectSystem.Base.csproj b/vsintegration/src/FSharp.ProjectSystem.Base/FSharp.ProjectSystem.Base.csproj index c5608f1a6b6..be6eb82d080 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/FSharp.ProjectSystem.Base.csproj +++ b/vsintegration/src/FSharp.ProjectSystem.Base/FSharp.ProjectSystem.Base.csproj @@ -40,22 +40,10 @@ - - - - - - - - - - - - diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/FSharp.ProjectSystem.FSharp.fsproj b/vsintegration/src/FSharp.ProjectSystem.FSharp/FSharp.ProjectSystem.FSharp.fsproj index 576dc2aa464..da59e918292 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/FSharp.ProjectSystem.FSharp.fsproj +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/FSharp.ProjectSystem.FSharp.fsproj @@ -104,23 +104,12 @@ - - - - - - - - - - - - + diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/FSharp.ProjectSystem.PropertyPages.vbproj b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/FSharp.ProjectSystem.PropertyPages.vbproj index 91418865d89..e964555f55f 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/FSharp.ProjectSystem.PropertyPages.vbproj +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/FSharp.ProjectSystem.PropertyPages.vbproj @@ -46,15 +46,9 @@ - - - - - - diff --git a/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj b/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj index 0171cdf9b26..2478700de2d 100644 --- a/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj +++ b/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj @@ -19,7 +19,7 @@ - + @@ -57,18 +57,9 @@ - - - - - - - - - diff --git a/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj b/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj index c084fc6f06a..1625be60b9a 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj +++ b/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj @@ -95,12 +95,12 @@ - - - + + + + - diff --git a/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj b/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj index e1e657a651a..6396eada6a9 100644 --- a/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj +++ b/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj @@ -16,7 +16,7 @@ - + CompilerLocation.fs @@ -51,22 +51,11 @@ - - - - - - - - - - - diff --git a/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj index 96fde123dcc..d5167d28820 100644 --- a/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj +++ b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj @@ -120,34 +120,14 @@ - - - - - - - - - - - - - + + + + - - - - - - - - - - -