diff --git a/.gitignore b/.gitignore index 3cfeb6c1cb3..78418b2b36b 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,6 @@ scripts/*.patch /src/FSharp.Build/*.resx /src/fsi/*.resx /src/FSharp.Compiler.Interactive.Settings/*.resx -/src/FSharp.Compiler.Server.Shared/*.resx /src/fsi/Fsi.sln /src/FSharp.Build/*.resources /src/Compiler/*.resx diff --git a/FSharp.sln b/FSharp.sln index 9744d3283ef..364764378bb 100644 --- a/FSharp.sln +++ b/FSharp.sln @@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.1.32113.165 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Server.Shared", "src\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj", "{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}" -EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core", "src\FSharp.Core\FSharp.Core.fsproj", "{DED3BBD7-53F4-428A-8C9F-27968E768605}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}" @@ -98,9 +96,10 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsiAnyCpu", "src\fsi\fsiAny EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsiArm64", "src\fsi\fsiArm64Project\fsiArm64.fsproj", "{209C7D37-8C01-413C-8698-EC25F4C86976}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "HistoricalBenchmark", "tests\benchmarks\FCSBenchmarks\BenchmarkComparison\HistoricalBenchmark.fsproj", "{BEC6E796-7E53-4888-AAFC-B8FD55C425DF}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "HistoricalBenchmark", "tests\benchmarks\FCSBenchmarks\BenchmarkComparison\HistoricalBenchmark.fsproj", "{BEC6E796-7E53-4888-AAFC-B8FD55C425DF}" +EndProject +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Benchmarks", "tests\benchmarks\FCSBenchmarks\CompilerServiceBenchmarks\FSharp.Compiler.Benchmarks.fsproj", "{9C7523BA-7AB2-4604-A5FD-653E82C2BAD1}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Benchmarks", "tests\benchmarks\FCSBenchmarks\CompilerServiceBenchmarks\FSharp.Compiler.Benchmarks.fsproj", "{9C7523BA-7AB2-4604-A5FD-653E82C2BAD1}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D58BFE8B-7C85-4D3B-B5F3-9A7BB90FF1EE}" ProjectSection(SolutionItems) = preProject src\Compiler\FSComp.txt = src\Compiler\FSComp.txt @@ -116,18 +115,6 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|x86.ActiveCfg = Debug|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|x86.Build.0 = Debug|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|Any CPU.ActiveCfg = Release|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|Any CPU.Build.0 = Release|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|x86.ActiveCfg = Release|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|x86.Build.0 = Release|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|Any CPU.Build.0 = Release|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|x86.ActiveCfg = Release|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|x86.Build.0 = Release|Any CPU {DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|Any CPU.Build.0 = Debug|Any CPU {DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|x86.ActiveCfg = Debug|Any CPU @@ -433,7 +420,6 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06} = {B8DDA694-7939-42E3-95E5-265C2217C142} {DED3BBD7-53F4-428A-8C9F-27968E768605} = {3058BC79-8E79-4645-B05D-48CC182FA8A6} {702A7979-BCF9-4C41-853E-3ADFC9897890} = {B8DDA694-7939-42E3-95E5-265C2217C142} {649FA588-F02E-457C-9FCF-87E46407481E} = {B8DDA694-7939-42E3-95E5-265C2217C142} diff --git a/VisualFSharp.sln b/VisualFSharp.sln index 343c976316e..60b7ece4d7f 100644 --- a/VisualFSharp.sln +++ b/VisualFSharp.sln @@ -33,8 +33,6 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.VS.FSI", "vsintegrat EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VisualFSharpFull", "vsintegration\Vsix\VisualFSharpFull\VisualFSharpFull.csproj", "{59ADCE46-9740-4079-834D-9A03A3494EBC}" EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Server.Shared", "src\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj", "{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}" -EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core", "src\FSharp.Core\FSharp.Core.fsproj", "{DED3BBD7-53F4-428A-8C9F-27968E768605}" EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.LanguageService", "vsintegration\src\FSharp.LanguageService\FSharp.LanguageService.fsproj", "{EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}" @@ -193,7 +191,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FCSBenchmarks", "FCSBenchma tests\benchmarks\FCSBenchmarks\SmokeTestAllBenchmarks.ps1 = tests\benchmarks\FCSBenchmarks\SmokeTestAllBenchmarks.ps1 EndProjectSection EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fsharp.ProfilingStartpointProject", "tests\benchmarks\Fsharp.ProfilingStartpointProject\Fsharp.ProfilingStartpointProject.fsproj", "{FE23BB65-276A-4E41-8CC7-F7752241DEBA}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fsharp.ProfilingStartpointProject", "tests\benchmarks\Fsharp.ProfilingStartpointProject\Fsharp.ProfilingStartpointProject.fsproj", "{FE23BB65-276A-4E41-8CC7-F7752241DEBA}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -229,18 +227,6 @@ Global {59ADCE46-9740-4079-834D-9A03A3494EBC}.Release|Any CPU.Build.0 = Release|Any CPU {59ADCE46-9740-4079-834D-9A03A3494EBC}.Release|x86.ActiveCfg = Release|Any CPU {59ADCE46-9740-4079-834D-9A03A3494EBC}.Release|x86.Build.0 = Release|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|x86.ActiveCfg = Debug|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|x86.Build.0 = Debug|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|Any CPU.ActiveCfg = Release|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|Any CPU.Build.0 = Release|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|x86.ActiveCfg = Release|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|x86.Build.0 = Release|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|Any CPU.Build.0 = Release|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|x86.ActiveCfg = Release|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|x86.Build.0 = Release|Any CPU {DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|Any CPU.Build.0 = Debug|Any CPU {DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|x86.ActiveCfg = Debug|Any CPU @@ -1045,7 +1031,6 @@ Global {CCAB6E50-34C6-42AF-A6B0-567C29FCD91B} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} {991DCF75-C2EB-42B6-9A0D-AA1D2409D519} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} {59ADCE46-9740-4079-834D-9A03A3494EBC} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06} = {B8DDA694-7939-42E3-95E5-265C2217C142} {DED3BBD7-53F4-428A-8C9F-27968E768605} = {3058BC79-8E79-4645-B05D-48CC182FA8A6} {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F} = {CCAB6E50-34C6-42AF-A6B0-567C29FCD91B} {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF} = {CCAB6E50-34C6-42AF-A6B0-567C29FCD91B} diff --git a/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj b/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj index d96bbf1e59d..eb3190a7418 100644 --- a/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj +++ b/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj @@ -13,7 +13,6 @@ - @@ -108,7 +107,6 @@ folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools" file source="$(BinariesFolder)fsc\$(Configuration)\$(TargetFramework)\Microsoft.Build.Framework.dll" file source="$(BinariesFolder)fsc\$(Configuration)\$(TargetFramework)\Microsoft.Build.Tasks.Core.dll" file source="$(BinariesFolder)fsc\$(Configuration)\$(TargetFramework)\Microsoft.Build.Utilities.Core.dll" - file source="$(BinariesFolder)FSharp.Compiler.Server.Shared\$(Configuration)\$(TargetFramework)\FSharp.Compiler.Server.Shared.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 file source="$(BinariesFolder)FSharp.Core\$(Configuration)\netstandard2.0\FSharp.Core.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 file source="$(BinariesFolder)FSharp.Core\$(Configuration)\netstandard2.0\FSharp.Core.xml" file source="$(BinariesFolder)FSharp.Build\$(Configuration)\netstandard2.0\FSharp.Build.dll" vs.file.ngen=no vs.file.ngenArchitecture=All vs.file.ngenPriority=2 diff --git a/setup/Swix/Microsoft.FSharp.IDE/Microsoft.FSharp.IDE.csproj b/setup/Swix/Microsoft.FSharp.IDE/Microsoft.FSharp.IDE.csproj index 834d95d3bf1..d78d0b6d1e9 100644 --- a/setup/Swix/Microsoft.FSharp.IDE/Microsoft.FSharp.IDE.csproj +++ b/setup/Swix/Microsoft.FSharp.IDE/Microsoft.FSharp.IDE.csproj @@ -18,7 +18,6 @@ <_Dependency Include="FSharp.Compiler.Interactive.Settings" Version="$(FSProductVersion)" /> <_Dependency Include="FSharp.Compiler.Service" Version="$(FSharpCompilerServiceVersion)" /> <_Dependency Include="FSharp.DependencyManager.Nuget" Version="$(FSProductVersion)" /> - <_Dependency Include="FSharp.Compiler.Server.Shared" Version="$(FSProductVersion)" /> <_Dependency Include="FSharp.Core" Version="$(FSCoreVersion)" /> <_Dependency Include="FSharp.Editor" Version="$(VSAssemblyVersion)" /> <_Dependency Include="FSharp.LanguageService.Base" Version="$(VSAssemblyVersion)" /> diff --git a/src/Compiler/FSharp.Compiler.Service.fsproj b/src/Compiler/FSharp.Compiler.Service.fsproj index 98a87e8d736..e7468b34086 100644 --- a/src/Compiler/FSharp.Compiler.Service.fsproj +++ b/src/Compiler/FSharp.Compiler.Service.fsproj @@ -69,7 +69,6 @@ - @@ -456,6 +455,8 @@ + + diff --git a/src/Compiler/Interactive/FSharpInteractiveServer.fs b/src/Compiler/Interactive/FSharpInteractiveServer.fs new file mode 100644 index 00000000000..9c66f2df2c5 --- /dev/null +++ b/src/Compiler/Interactive/FSharpInteractiveServer.fs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +namespace FSharp.Compiler.Interactive + +open System +open System.Text +open System.Diagnostics +open System.IO +open System.IO.Pipes +open System.Threading + +module CtrlBreakHandlers = + + let interuptCommand = "Interactive-CtrlCNotificationCommand-Interupt" + + let lineInteruptCommand = + Encoding.UTF8.GetBytes(interuptCommand + Environment.NewLine) + + let connectionTimeout = 1000 + + [] + type public CtrlBreakService(channelName: string) = + + abstract Interrupt: unit -> unit + + // Exceptions percolate to callsite, IO exceptions must be handled by caller + // Should be run on a new thread + member this.Run() : unit = + let service = new NamedPipeServerStream(channelName, PipeDirection.In) + + // Wait for a client to connect + service.WaitForConnection() + use stream = new StreamReader(service) + + try + while not (stream.EndOfStream) do + let line = stream.ReadLine() + + if line = interuptCommand then + this.Interrupt() + finally + stream.Close() + service.Close() + + type public CtrlBreakClient(channelName: string) = + + let mutable service: NamedPipeClientStream option = + Some(new NamedPipeClientStream(".", channelName, PipeDirection.Out)) + + member this.Interrupt() = + match service with + | None -> () + | Some client -> + try + if not (client.IsConnected) then + client.Connect(connectionTimeout) + with _ -> + () + + client.Write(lineInteruptCommand, 0, lineInteruptCommand.Length) + client.Flush() + + interface IDisposable with + member _.Dispose() = + match service with + | None -> () + | Some client -> + client.Dispose() + service <- None diff --git a/src/Compiler/Interactive/FSharpInteractiveServer.fsi b/src/Compiler/Interactive/FSharpInteractiveServer.fsi new file mode 100644 index 00000000000..5931fe5f12f --- /dev/null +++ b/src/Compiler/Interactive/FSharpInteractiveServer.fsi @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +namespace FSharp.Compiler.Interactive + +open System + +module CtrlBreakHandlers = + + [] + type public CtrlBreakService = + new: channelName: string -> CtrlBreakService + + abstract Interrupt: unit -> unit + + member Run: unit -> unit + + type public CtrlBreakClient = + + new: channelName: string -> CtrlBreakClient + + member Interrupt: unit -> unit + + interface IDisposable diff --git a/src/Compiler/Service/ServiceStructure.fs b/src/Compiler/Service/ServiceStructure.fs index 010f37e87d8..e9468f63357 100644 --- a/src/Compiler/Service/ServiceStructure.fs +++ b/src/Compiler/Service/ServiceStructure.fs @@ -493,9 +493,21 @@ module Structure = | x -> x let synPat = getLastPat synPat - // Collapse the scope starting with `->` - let collapse = Range.endToEnd synPat.Range clause.Range - rcheck Scope.MatchClause Collapse.Same e.Range collapse + let synPatRange = synPat.Range + let resultExprRange = e.Range + + // Avoid rcheck because we want to be able to collapse resultExpr even if it spans a single line + // but is not on the same one as the pattern + if synPatRange.EndLine <> resultExprRange.EndLine then + acc.Add + { + Scope = Scope.MatchClause + Collapse = Collapse.Same + Range = resultExprRange + // Collapse the scope starting with `->` + CollapseRange = Range.endToEnd synPatRange clause.Range + } + parseExpr e and parseAttributes (Attributes attrs) = diff --git a/src/Compiler/lex.fsl b/src/Compiler/lex.fsl index 45057efa104..ab11625c7d5 100644 --- a/src/Compiler/lex.fsl +++ b/src/Compiler/lex.fsl @@ -601,7 +601,9 @@ rule token args skip = parse // Single quote in triple quote ok, others disallowed match args.stringNest with | (_, LexerStringStyle.TripleQuote, _) :: _ -> () - | _ :: _ -> errorR(Error(FSComp.SR.lexSingleQuoteInSingleQuote(), m)) + | _ :: rest -> + args.stringNest <- rest + errorR(Error(FSComp.SR.lexSingleQuoteInSingleQuote(), m)) | [] -> () if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, LexerStringKind.String, m)) @@ -612,7 +614,9 @@ rule token args skip = parse // Single quote in triple quote ok, others disallowed match args.stringNest with - | _ :: _ -> errorR(Error(FSComp.SR.lexTripleQuoteInTripleQuote(), m)) + | _ :: rest -> + args.stringNest <- rest + errorR(Error(FSComp.SR.lexTripleQuoteInTripleQuote(), m)) | [] -> () if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, LexerStringKind.InterpolatedStringFirst, m)) @@ -624,7 +628,9 @@ rule token args skip = parse // Single quote in triple quote ok, others disallowed match args.stringNest with | (_, LexerStringStyle.TripleQuote, _) :: _ -> () - | _ :: _ -> errorR(Error(FSComp.SR.lexSingleQuoteInSingleQuote(), m)) + | _ :: rest -> + args.stringNest <- rest + errorR(Error(FSComp.SR.lexSingleQuoteInSingleQuote(), m)) | _ -> () if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, LexerStringKind.InterpolatedStringFirst, m)) @@ -635,7 +641,9 @@ rule token args skip = parse // Single quote in triple quote ok, others disallowed match args.stringNest with - | _ :: _ -> errorR(Error(FSComp.SR.lexTripleQuoteInTripleQuote(), m)) + | _ :: rest -> + args.stringNest <- rest + errorR(Error(FSComp.SR.lexTripleQuoteInTripleQuote(), m)) | _ -> () if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, LexerStringKind.String, m)) @@ -647,7 +655,9 @@ rule token args skip = parse // Single quote in triple quote ok, others disallowed match args.stringNest with | (_, LexerStringStyle.TripleQuote, _) :: _ -> () - | _ :: _ -> errorR(Error(FSComp.SR.lexSingleQuoteInSingleQuote(), m)) + | _ :: rest -> + args.stringNest <- rest + errorR(Error(FSComp.SR.lexSingleQuoteInSingleQuote(), m)) | _ -> () if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, LexerStringKind.String, m)) @@ -659,7 +669,9 @@ rule token args skip = parse // Single quote in triple quote ok, others disallowed match args.stringNest with | (_, LexerStringStyle.TripleQuote, _) :: _ -> () - | _ :: _ -> errorR(Error(FSComp.SR.lexSingleQuoteInSingleQuote(), m)) + | _ :: rest -> + args.stringNest <- rest + errorR(Error(FSComp.SR.lexSingleQuoteInSingleQuote(), m)) | _ -> () if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, LexerStringKind.InterpolatedStringFirst, m)) diff --git a/src/FSharp.Compiler.Server.Shared/AssemblyInfo.fs b/src/FSharp.Compiler.Server.Shared/AssemblyInfo.fs deleted file mode 100644 index d2321169772..00000000000 --- a/src/FSharp.Compiler.Server.Shared/AssemblyInfo.fs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.FSharp - -open System.Reflection -open System.Runtime.InteropServices - -[] -do () diff --git a/src/FSharp.Compiler.Server.Shared/Directory.Build.props b/src/FSharp.Compiler.Server.Shared/Directory.Build.props deleted file mode 100644 index 7cd41381b5d..00000000000 --- a/src/FSharp.Compiler.Server.Shared/Directory.Build.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - true - - - - - diff --git a/src/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj b/src/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj deleted file mode 100644 index 2b6e504664f..00000000000 --- a/src/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - net472 - FSharp.Compiler.Server.Shared - true - - - - - false - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/FSharp.Compiler.Server.Shared/FSharpInteractiveServer.fs b/src/FSharp.Compiler.Server.Shared/FSharpInteractiveServer.fs deleted file mode 100644 index 72a58118625..00000000000 --- a/src/FSharp.Compiler.Server.Shared/FSharpInteractiveServer.fs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -//[] // avoid calling the type "Shared" which is keyword in some languages -namespace FSharp.Compiler.Server.Shared - -// For FSI VS plugin, require FSI to provide services: -// e.g. -// - interrupt -// - intellisense completion -// -// This is done via remoting. -// Here we define the service class. -// This dll is required for both client (fsi-vs plugin) and server (spawned fsi). - -//[] -[] -[] -do () - -open System -open System.Diagnostics -open System.Runtime.Remoting.Channels -open System.Runtime.Remoting -open System.Runtime.Remoting.Lifetime - -[] -type internal FSharpInteractiveServer() = - inherit System.MarshalByRefObject() - abstract Interrupt: unit -> unit - default x.Interrupt() = () - - static member StartServer(channelName: string, server: FSharpInteractiveServer) = - let chan = new Ipc.IpcChannel(channelName) - LifetimeServices.LeaseTime <- TimeSpan(7, 0, 0, 0) // days,hours,mins,secs - LifetimeServices.LeaseManagerPollTime <- TimeSpan(7, 0, 0, 0) - LifetimeServices.RenewOnCallTime <- TimeSpan(7, 0, 0, 0) - LifetimeServices.SponsorshipTimeout <- TimeSpan(7, 0, 0, 0) - ChannelServices.RegisterChannel(chan, false) - let objRef = RemotingServices.Marshal(server, "FSIServer") - () - - static member StartClient(channelName) = - let T = - Activator.GetObject(typeof, "ipc://" + channelName + "/FSIServer") - - let x = T :?> FSharpInteractiveServer - x diff --git a/src/fsi/fsi.targets b/src/fsi/fsi.targets index dcd34a0ee86..23ee6e76bfc 100644 --- a/src/fsi/fsi.targets +++ b/src/fsi/fsi.targets @@ -44,9 +44,6 @@ - - - diff --git a/src/fsi/fsimain.fs b/src/fsi/fsimain.fs index d4394269ff4..c51df65f381 100644 --- a/src/fsi/fsimain.fs +++ b/src/fsi/fsimain.fs @@ -11,6 +11,7 @@ module internal Sample.FSharp.Compiler.Interactive.Main open System +open System.Diagnostics open System.Globalization open System.IO open System.Reflection @@ -22,6 +23,8 @@ open System.Windows.Forms open FSharp.Compiler open FSharp.Compiler.AbstractIL +open FSharp.Compiler.Interactive +open FSharp.Compiler.Interactive.CtrlBreakHandlers open FSharp.Compiler.Interactive.Shell open FSharp.Compiler.Interactive.Shell.Settings open FSharp.Compiler.CodeAnalysis @@ -147,9 +150,9 @@ let internal TrySetUnhandledExceptionMode () = /// Starts the remoting server to handle interrupt reuests from a host tool. let StartServer (fsiSession: FsiEvaluationSession) (fsiServerName) = -#if FSI_SERVER let server = - { new Server.Shared.FSharpInteractiveServer() with + + { new CtrlBreakService(fsiServerName) with member _.Interrupt() = //printf "FSI-SERVER: received CTRL-C request...\n" try @@ -160,10 +163,7 @@ let StartServer (fsiSession: FsiEvaluationSession) (fsiServerName) = () } - Server.Shared.FSharpInteractiveServer.StartServer(fsiServerName, server) -#else - ignore (fsiSession, fsiServerName) -#endif + server.Run() //---------------------------------------------------------------------------- // GUI runCodeOnMainThread diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/noframework.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/noframework/noframework.fs similarity index 81% rename from tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/noframework.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/noframework/noframework.fs index 15689fe6c17..5b988ceb6e9 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/noframework.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/noframework/noframework.fs @@ -10,7 +10,7 @@ module noframework = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/noframework) // - [] + [] let ``noframework - noframework02.fs - --noframework`` compilation = compilation |> asFsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/noframework/noframework02.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/noframework/noframework02.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/noframework/noframework02.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/noframework/noframework02.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_01.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_01.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_02.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_02.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_02.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_02.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_03.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_03.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_03.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_03.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_04.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_04.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_04.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_04.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_05.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_05.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_05.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_05.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_06.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_06.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_06.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_06.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_07.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_07.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_07.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_07.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_08.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_08.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_08.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_08.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_09.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_09.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_09.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_09.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_10.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_10.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_10.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_10.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_11.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_11.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_11.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_11.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_12.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_12.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_12.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_12.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_13.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_13.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_13.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_13.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_15.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_15.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_15.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_15.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_16.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_16.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/platform/error_16.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/error_16.fs diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/platform.fs similarity index 83% rename from tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/platform.fs index 8063e7aa5b2..5f5e803c0bc 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/platform.fs @@ -10,7 +10,7 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) //The 'anycpu32bitpreferred' platform can only be used with EXE targets\. You must use 'anycpu' instead\. - [] + [] let ``platform - error_16.fs - --target:library --platform:anycpu32bitpreferred`` compilation = compilation |> asFs @@ -23,7 +23,7 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) //Unrecognized option: '--PLATFORM' - [] + [] let ``platform - error_01.fs - --PLATFORM:anycpu`` compilation = compilation |> asFsx @@ -36,7 +36,7 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) //Unrecognized option: '--PlatForm' - [] + [] let ``platform - error_02.fs - --PlatForm:anycpu`` compilation = compilation |> asFsx @@ -49,7 +49,7 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) //Unrecognized platform 'ITANIUM', valid values are 'x86', 'x64', 'Arm', 'Arm64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' - [] + [] let ``platform - error_03.fs - --platform:ITANIUM`` compilation = compilation |> asFsx @@ -62,7 +62,7 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) //Unrecognized platform 'ANYCPU', valid values are 'x86', 'x64', 'Arm', 'Arm64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' - [] + [] let ``platform - error_04.fs - --platform:ANYCPU`` compilation = compilation |> asFsx @@ -75,7 +75,7 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) //Unrecognized platform 'X86', valid values are 'x86', 'x64', 'Arm', 'Arm64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' - [] + [] let ``platform - error_05.fs - --platform:X86`` compilation = compilation |> asFsx @@ -88,7 +88,7 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) //Unrecognized platform 'X64', valid values are 'x86', 'x64', 'Arm', 'Arm64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' - [] + [] let ``platform - error_06.fs - --platform:X64`` compilation = compilation |> asFsx @@ -101,7 +101,7 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) //Unrecognized platform 'IA64', valid values are 'x86', 'x64', 'Arm', 'Arm64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' - [] + [] let ``platform - error_07.fs - --platform:IA64`` compilation = compilation |> asFsx @@ -114,7 +114,7 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) //Unrecognized platform 'i386', valid values are 'x86', 'x64', 'Arm', 'Arm64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' - [] + [] let ``platform - error_08.fs - --platform:i386`` compilation = compilation |> asFsx @@ -127,7 +127,7 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) //Unrecognized platform 'AMD64', valid values are 'x86', 'x64', 'Arm', 'Arm64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' - [] + [] let ``platform - error_09.fs - --platform:AMD64`` compilation = compilation |> asFsx @@ -140,7 +140,7 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) //Unrecognized platform 'PPC', valid values are 'x86', 'x64', 'Arm', 'Arm64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' - [] + [] let ``platform - error_10.fs - --platform:PPC`` compilation = compilation |> asFsx @@ -153,7 +153,7 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) //Unrecognized platform 'ARM', valid values are 'x86', 'x64', 'Arm', 'Arm64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' - [] + [] let ``platform - error_15.fs - --platform:ARM`` compilation = compilation |> asFsx @@ -166,7 +166,7 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) //Unrecognized option: '--platform-' - [] + [] let ``platform - error_11.fs - --platform-:anycpu`` compilation = compilation |> asFsx @@ -179,7 +179,7 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) //Unrecognized option: '--PLATFORM\+' - [] + [] let ``platform - error_12.fs - --PLATFORM+:anycpu`` compilation = compilation |> asFsx @@ -192,7 +192,7 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) //Unrecognized option: '---platform' - [] + [] let ``platform - error_13.fs - ---platform:anycpu`` compilation = compilation |> asFsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_01.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/error_01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_01.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/error_01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_02.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/error_02.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_02.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/error_02.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_03.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/error_03.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/error_03.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/error_03.fs diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/times.fs similarity index 81% rename from tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/times.fs index 95ea392f1ae..dcdd57b4000 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/times.fs @@ -10,7 +10,7 @@ module times = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/times) //Unrecognized option: '--Times' - [] + [] let ``times - error_01.fs - --Times`` compilation = compilation |> asFsx @@ -23,7 +23,7 @@ module times = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/times) //Unrecognized option: '--times-' - [] + [] let ``times - error_02.fs - --times-`` compilation = compilation |> asFsx @@ -36,7 +36,7 @@ module times = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/times) //Unrecognized option: '--times\+' - [] + [] let ``times - error_03.fs - --times+`` compilation = compilation |> asFsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/times01.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/times01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/times/times01.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/times01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/nowarn.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/nowarn.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/nowarn.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/nowarn.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/nowarn_readonlystruct.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/nowarn_readonlystruct.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/nowarn_readonlystruct.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/nowarn_readonlystruct.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/nowarn_with_warnaserror01.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/nowarn_with_warnaserror01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/nowarn_with_warnaserror01.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/nowarn_with_warnaserror01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/nowarn_with_warnaserror02.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/nowarn_with_warnaserror02.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/nowarn_with_warnaserror02.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/nowarn_with_warnaserror02.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/nowarn_with_warnaserror03.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/nowarn_with_warnaserror03.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/nowarn_with_warnaserror03.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/nowarn_with_warnaserror03.fs diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn.fs similarity index 75% rename from tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn.fs index 4e98ff92545..63fc7382a5a 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn.fs @@ -8,7 +8,7 @@ open FSharp.Test.Compiler module TestCompilerWarningLevel = - [] + [] let ``warn_level0_fs --warn:0`` compilation = compilation |> asExe @@ -16,7 +16,7 @@ module TestCompilerWarningLevel = |> compileAndRun |> shouldSucceed - [] + [] let ``warn_level1_fs --warn:1 --warnaserror:52`` compilation = compilation |> asExe @@ -24,7 +24,7 @@ module TestCompilerWarningLevel = |> compile |> shouldSucceed - [] + [] let ``warn_level2_fs --warn:2 --warnaserror:52`` compilation = compilation |> asExe @@ -32,7 +32,7 @@ module TestCompilerWarningLevel = |> compile |> shouldSucceed - [] + [] let ``warn_level3_fs --warn:3 --warnaserror:52`` compilation = compilation |> asExe @@ -40,7 +40,7 @@ module TestCompilerWarningLevel = |> compile |> shouldSucceed - [] + [] let ``warn_level4_fs --warn:4 --warnaserror:52`` compilation = compilation |> asExe @@ -48,7 +48,7 @@ module TestCompilerWarningLevel = |> compile |> shouldSucceed - [] + [] let ``warn_level5_fs --warn:5 --warnaserror:52`` compilation = compilation |> asExe @@ -59,7 +59,7 @@ module TestCompilerWarningLevel = |> withDiagnosticMessageMatches "The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed$" |> ignore - [] + [] let ``warn_level5_fs --warn:5`` compilation = compilation |> asExe @@ -72,7 +72,7 @@ module TestCompilerWarningLevel = #if NETSTANDARD // This test works with KeyValuePair, which is not a 'readonly struct' in net472 - [] + [] let ``no error 52 with readonly struct`` compilation = compilation |> asExe @@ -82,7 +82,7 @@ module TestCompilerWarningLevel = |> ignore #endif - [] + [] let ``warn_level6_fs --warn:6`` compilation = compilation |> asExe @@ -93,7 +93,7 @@ module TestCompilerWarningLevel = |> withDiagnosticMessageMatches "Invalid warning level '6'" |> ignore - [] + [] let ``nowarn_fs --warnaserror`` compilation = compilation |> asExe @@ -102,7 +102,7 @@ module TestCompilerWarningLevel = |> shouldSucceed |> ignore - [] + [] let ``warn40_fs`` compilation = compilation |> asExe @@ -115,7 +115,7 @@ module TestCompilerWarningLevel = ] |> ignore - [] + [] let ``warn40_fs --warnaserror`` compilation = compilation |> asExe @@ -129,7 +129,7 @@ module TestCompilerWarningLevel = ] |> ignore - [] + [] let ``warn40_fs --nowarn:40;21`` compilation = compilation |> asExe @@ -138,7 +138,7 @@ module TestCompilerWarningLevel = |> shouldSucceed |> ignore - [] + [] let ``warn40_fs --nowarn:NU0000;FS40;NU0001`` compilation = compilation |> asExe @@ -147,7 +147,7 @@ module TestCompilerWarningLevel = |> shouldSucceed |> ignore - [] + [] let ``warn40_fs --nowarn:FS0040`` compilation = compilation |> asExe diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/warn40.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn40.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/warn40.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn40.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/warn_level0.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn_level0.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/warn_level0.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn_level0.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/warn_level1.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn_level1.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/warn_level1.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn_level1.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/warn_level2.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn_level2.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/warn_level2.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn_level2.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/warn_level3.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn_level3.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/warn_level3.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn_level3.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/warn_level4.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn_level4.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/warn_level4.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn_level4.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/warn_level5.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn_level5.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/warn_level5.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn_level5.fs diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/warn_level6.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn_level6.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warn/warn_level6.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn_level6.fs diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warnon.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warnon/warnon.fs similarity index 84% rename from tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warnon.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warnon/warnon.fs index d233f05a4ac..91322a0595d 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warnon.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warnon/warnon.fs @@ -10,7 +10,7 @@ module warnon = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/warnon) //The value 'n' is unused$ - [] + [] let ``warnon - warnon01.fs - --warnon:1182 --test:ErrorRanges`` compilation = compilation |> asFsx @@ -23,7 +23,7 @@ module warnon = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/warnon) //The value 'n' is unused$ - [] + [] let ``warnon - warnon01.fs - --warnon:NU0001;FS1182;NU0001 --test:ErrorRanges`` compilation = compilation |> asFsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warnon/warnon01.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warnon/warnon01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/CompilerOptions/fsc/warnon/warnon01.fs rename to tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warnon/warnon01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/CustomAttributes/ArgumentsOfAllTypes/env.lst b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/CustomAttributes/ArgumentsOfAllTypes/env.lst deleted file mode 100644 index e740078e5a7..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/CustomAttributes/ArgumentsOfAllTypes/env.lst +++ /dev/null @@ -1,41 +0,0 @@ -# This test builds an F# library with attributes.. -# ... and then it consumes them from C# code -NoMT SOURCE=FSharpAttrLibrary.fs SCFLAGS=-a # FSharpAttrLibrary.fs -NoMT SOURCE=dummy.fs PRECMD="\$CSC_PIPE CSharpConsumer.cs /reference:System.Core.dll /r:FSharpAttrLibrary.dll" POSTCMD=CSharpConsumer.exe # CSharpConsumer - -# The following tests build a C# library with attributes... -# .. then consumes them from F# directly and also by creating other attributes inherited from them -# .. which are eventually consumed again from F# -NoMT SOURCE=dummy.fs PRECMD="\$CSC_PIPE /target:library /reference:System.dll CSLibraryWithAttributes.cs" # CSLibraryWithAttributes.cs -NoMT SOURCE=System_Int16.fsx SCFLAGS="-a -r CSLibraryWithAttributes.dll" # System_Int16.fsx -NoMT SOURCE=System_Int16_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Int16.dll" # System_Int16_Consumer.fsx -NoMT SOURCE=System_Int32.fsx SCFLAGS="-a -r CSLibraryWithAttributes.dll" # System_Int32.fsx -NoMT SOURCE=System_Int32_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Int32.dll" # System_Int32_Consumer.fsx -NoMT SOURCE=System_Int64.fsx SCFLAGS="-a -r CSLibraryWithAttributes.dll" # System_Int64.fsx -NoMT SOURCE=System_Int64_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Int64.dll" # System_Int64_Consumer.fsx -NoMT SOURCE=System_UInt16.fsx SCFLAGS="-a -r CSLibraryWithAttributes.dll" # System_UInt16.fsx -NoMT SOURCE=System_UInt16_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_UInt16.dll" # System_UInt16_Consumer.fsx -NoMT SOURCE=System_UInt32.fsx SCFLAGS="-a -r CSLibraryWithAttributes.dll" # System_UInt32.fsx -NoMT SOURCE=System_UInt32_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_UInt32.dll" # System_UInt32_Consumer.fsx -NoMT SOURCE=System_UInt64.fsx SCFLAGS="-a -r CSLibraryWithAttributes.dll" # System_UInt64.fsx -NoMT SOURCE=System_UInt64_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_UInt64.dll" # System_UInt64_Consumer.fsx -NoMT SOURCE=System_Char.fsx SCFLAGS="-a -r CSLibraryWithAttributes.dll" # System_Char.fsx -NoMT SOURCE=System_Char_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Char.dll" # System_Char_Consumer.fsx -NoMT SOURCE=System_Byte.fsx SCFLAGS="-a -r CSLibraryWithAttributes.dll" # System_Byte.fsx -NoMT SOURCE=System_Byte_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Byte.dll" # System_Byte_Consumer.fsx -NoMT SOURCE=System_SByte.fsx SCFLAGS="-a -r CSLibraryWithAttributes.dll" # System_SByte.fsx -NoMT SOURCE=System_SByte_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_SByte.dll" # System_SByte_Consumer.fsx -NoMT SOURCE=System_Single.fsx SCFLAGS="-a -r CSLibraryWithAttributes.dll" # System_Single.fsx -NoMT SOURCE=System_Single_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Single.dll" # System_Single_Consumer.fsx -NoMT SOURCE=System_Double.fsx SCFLAGS="-a -r CSLibraryWithAttributes.dll" # System_Double.fsx -NoMT SOURCE=System_Double_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Double.dll" # System_Double_Consumer.fsx -NoMT SOURCE=System_String.fsx SCFLAGS="-a -r CSLibraryWithAttributes.dll" # System_String.fsx -NoMT SOURCE=System_String_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_String.dll" # System_String_Consumer.fsx -NoMT SOURCE=System_DateTimeKind.fsx SCFLAGS="-a -r CSLibraryWithAttributes.dll" # System_DateTimeKind.fsx -NoMT SOURCE=System_DateTimeKind_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_DateTimeKind.dll" # System_DateTimeKind_Consumer.fsx -NoMT SOURCE=System_Type.fsx SCFLAGS="-a -r CSLibraryWithAttributes.dll" # System_Type.fsx -NoMT SOURCE=System_Type_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Type.dll" # System_Type_Consumer.fsx -NoMT SOURCE=System_Object.fsx SCFLAGS="-a -r CSLibraryWithAttributes.dll" # System_Object.fsx -NoMT SOURCE=System_Object_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Object.dll" # System_Object_Consumer.fsx -NoMT SOURCE=System_TypeArray.fsx SCFLAGS="-a -r CSLibraryWithAttributes.dll" # System_TypeArray.fsx -NoMT SOURCE=System_TypeArray_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_TypeArray.dll" # System_TypeArray_Consumer.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/ByrefSafetyAnalysis/env.lst b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/ByrefSafetyAnalysis/env.lst deleted file mode 100644 index 79cd656ac5a..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/ByrefSafetyAnalysis/env.lst +++ /dev/null @@ -1,16 +0,0 @@ - SOURCE=UseByrefInLambda01.fs # UseByrefInLambda01.fs - SOURCE=E_ByrefAsGenericArgument01.fs SCFLAGS="--test:ErrorRanges" # E_ByrefAsGenericArgument01.fs - SOURCE=E_ByrefUsedInInnerLambda01.fs SCFLAGS="--test:ErrorRanges" # E_ByrefUsedInInnerLambda01.fs - SOURCE=E_ByrefUsedInInnerLambda02.fs SCFLAGS="--test:ErrorRanges" # E_ByrefUsedInInnerLambda02.fs - SOURCE=E_ByrefUsedInInnerLambda03.fs SCFLAGS="--test:ErrorRanges" # E_ByrefUsedInInnerLambda03.fs - SOURCE=E_ByrefUsedInQuotation01.fs SCFLAGS="--test:ErrorRanges" # E_ByrefUsedInQuotation01.fs - SOURCE=E_SetFieldToByref01.fs SCFLAGS="--test:ErrorRanges" # E_SetFieldToByref01.fs - SOURCE=E_SetFieldToByref02.fs SCFLAGS="--test:ErrorRanges" # E_SetFieldToByref02.fs - SOURCE=E_SetFieldToByref03.fs SCFLAGS="--test:ErrorRanges" # E_SetFieldToByref03.fs - SOURCE=E_SetFieldToByref04.fs SCFLAGS="--test:ErrorRanges" # E_SetFieldToByref04.fs - SOURCE=E_SetFieldToByref05.fs SCFLAGS="--test:ErrorRanges" # E_SetFieldToByref05.fs - SOURCE=E_FirstClassFuncTakesByref.fs SCFLAGS="--test:ErrorRanges --flaterrors" # E_FirstClassFuncTakesByref.fs - -NoMT SOURCE=ByrefInFSI1.fsx FSIMODE=PIPE COMPILE_ONLY=1 # ByrefInFSI1.fsx - SOURCE=E_StaticallyResolvedByRef01.fs SCFLAGS="--test:ErrorRanges" # E_StaticallyResolvedByRef01.fs - SOURCE=E_ByrefAsArrayElement.fs SCFLAGS="--test:ErrorRanges" # E_ByrefAsArrayElement.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/UnionTypes/env.lst b/tests/FSharp.Compiler.ComponentTests/Conformance/UnionTypes/env.lst deleted file mode 100644 index 55b56d6e047..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/UnionTypes/env.lst +++ /dev/null @@ -1,98 +0,0 @@ - SOURCE=E_GenericFunctionValuedStaticProp01.fs SCFLAGS="--test:ErrorRanges --warnaserror-" # E_GenericFunctionValuedStaticProp01.fs - SOURCE=W_GenericFunctionValuedStaticProp02.fs SCFLAGS="--test:ErrorRanges --warnaserror-" # W_GenericFunctionValuedStaticProp02.fs - - SOURCE=E_Overload_Equals.fs SCFLAGS="--test:ErrorRanges" # E_Overload_Equals.fs - SOURCE=E_Overload_GetHashCode.fs SCFLAGS="--test:ErrorRanges" # E_Overload_GetHashCode.fs - - SOURCE=EqualAndBoxing01.fs # EqualAndBoxing01.fs - - -NoMT SOURCE=Overload_Equals.fs COMPILE_ONLY=1 SCFLAGS=--warnaserror+ FSIMODE=PIPE # Overload_Equals.fs - fsi -NoMT SOURCE=Overload_GetHashCode.fs COMPILE_ONLY=1 SCFLAGS=--warnaserror+ FSIMODE=PIPE # Overload_GetHashCode.fs - fsi - - SOURCE=E_LowercaseDT.fs # E_LowercaseDT.fs - SOURCE=ImplicitEquals001.fs # ImplicitEquals001.fs - - SOURCE=E_UnionsNotNull01.fs # E_UnionsNotNull01.fs - SOURCE=E_UnionsNotNull02.fs # E_UnionsNotNull02.fs - - SOURCE=BeginWithUppercase01.fsx SCFLAGS= # BeginWithUppercase01.fsx - -# Renaming the .exe because for some weird reason on some OSes having 'DispatchSlot' in the .exe -# seems to trigger the UAC dialog... (e.g. Win7 x86) - SOURCE=DispatchSlot_Equals01.fsx SCFLAGS="-o dl_equals01.exe" # DispatchSlot_Equals01.fsx - SOURCE=DispatchSlot_GetHashCode.fsx SCFLAGS="-o dl_gethashcode01.exe" # DispatchSlot_GetHashCode.fsx - - SOURCE=E_BeginWithUppercase01.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercase01.fsx - - SOURCE=E_BeginWithUppercase02.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercase02.fsx - - SOURCE=E_BeginWithUppercase03.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercase03.fsx - - SOURCE=E_BeginWithUppercase04.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercase04.fsx - - SOURCE=E_BeginWithUppercaseNoPipe01.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercaseNoPipe01.fsx - SOURCE=E_DuplicateUnionCase01.fsx SCFLAGS="--test:ErrorRanges" # E_DuplicateUnionCase01.fsx - - SOURCE=E_Interface_IComparable.fsx SCFLAGS="--test:ErrorRanges" # E_Interface_IComparable.fsx - - SOURCE=E_Member_Duplicate01.fsx SCFLAGS="--test:ErrorRanges" # E_Member_Duplicate01.fsx - - SOURCE=E_ScopeAndDataConstrAndPattern01.fsx SCFLAGS="--test:ErrorRanges" # E_ScopeAndDataConstrAndPattern01.fsx - - SOURCE=Interface01.fsx SCFLAGS= # Interface01.fsx - - SOURCE=Interface_IComparable.fsx SCFLAGS= # Interface_IComparable.fsx - - SOURCE=E_Interface_IStructuralHash.fsx # E_Interface_IStructuralHash.fsx - - SOURCE=Member01.fsx # Member01.fsx - - SOURCE=Overrides01.fsx # Overrides01.fsx - - SOURCE=Parenthesis01.fsx # Parenthesis01.fsx - - SOURCE=Parenthesis02.fsx # Parenthesis02.fsx - - SOURCE=Parenthesis03.fsx # Parenthesis03.fsx - - SOURCE=Recursive01.fsx SCFLAGS= # Recursive01.fsx - - SOURCE=SampleFromSpec01.fsx SCFLAGS= # SampleFromSpec01.fsx - - SOURCE=SampleFromSpec01b.fsx SCFLAGS= # SampleFromSpec01b.fsx - - SOURCE=W_SampleFromSpec01c.fsx SCFLAGS="--test:ErrorRanges" # W_SampleFromSpec01c.fsx - - - SOURCE=SampleFromSpec01d.fsx SCFLAGS= # SampleFromSpec01d.fsx - - SOURCE=E_SampleFromSpec01d.fsx SCFLAGS="--test:ErrorRanges" # E_SampleFromSpec01d.fsx - SOURCE=E_SampleFromSpec01d2.fsx SCFLAGS="--test:ErrorRanges" # E_SampleFromSpec01d2.fsx - - SOURCE=ScopeAndDataConstrAndPattern01.fsx SCFLAGS= # ScopeAndDataConstrAndPattern01.fsx - - SOURCE=UnionCaseProduction01.fsx SCFLAGS=-a # UnionCaseProduction01.fsx - - SOURCE=UnionCasesProduction01.fsx SCFLAGS=-a # UnionCasesProduction01.fsx - - SOURCE=W_UnionCaseProduction01.fsx SCFLAGS="-a --test:ErrorRanges" # W_UnionCaseProduction01.fsx - - SOURCE=ReflectionOnUnionTypes01.fs SCFLAGS= # ReflectionOnUnionTypes01.fs - - SOURCE=E_InheritUnion.fs # E_InheritUnion.fs - SOURCE=E_UnionFieldNamedTag.fs SCFLAGS="--test:ErrorRanges" # E_UnionFieldNamedTag.fs - - SOURCE=E_UnionFieldNamedTagNoDefault.fs SCFLAGS="--test:ErrorRanges" #E_UnionFieldNamedTagNoDefault.fs - SOURCE=E_UnionMemberNamedTag.fs SCFLAGS="--test:ErrorRanges" #E_UnionMemberNamedTag.fs - SOURCE=E_UnionMemberNamedTagNoDefault.fs SCFLAGS="--test:ErrorRanges" #E_UnionMemberNamedTagNoDefault.fs - SOURCE=E_UnionMemberNamedTags.fs SCFLAGS="--test:ErrorRanges" #E_UnionMemberNamedTags.fs - SOURCE=E_UnionMemberNamedTagsNoDefault.fs SCFLAGS="--test:ErrorRanges" #E_UnionMemberNamedTagsNoDefault.fs - - SOURCE=NamedFields01.fsx SCFLAGS= # NamedFields01.fsx - SOURCE=NamedFields02.fsx SCFLAGS= # NamedFields02.fsx - SOURCE=NamedFields03.fsx SCFLAGS= # NamedFields03.fsx - SOURCE=E_UnionFieldConflictingName.fs SCFLAGS="--test:ErrorRanges" # E_UnionFieldConflictingName.fs - SOURCE=E_UnionConstructorBadFieldName.fs SCFLAGS="--test:ErrorRanges" # E_UnionConstructorBadFieldName.fs - SOURCE=E_FieldNameUsedMulti.fs SCFLAGS="--test:ErrorRanges" # E_FieldNameUsedMulti.fs - SOURCE=E_FieldMemberClash.fs SCFLAGS="--test:ErrorRanges" # E_FieldMemberClash.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AssemblyBoundary/env.lst b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AssemblyBoundary/env.lst deleted file mode 100644 index 401e3a6f896..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AssemblyBoundary/env.lst +++ /dev/null @@ -1,7 +0,0 @@ -NoMT SOURCE=test01.fs SCFLAGS="--optimize+ -r:lib01.dll" PRECMD="\$FSC_PIPE -a --optimize+ lib01.fs" # test01.fs -NoMT SOURCE=test02.fs SCFLAGS="--optimize+ -r:lib02.dll" PRECMD="\$FSC_PIPE -a --optimize+ lib02.fs" # test02.fs -NoMT SOURCE=test03.fs SCFLAGS="--optimize+ -r:lib03.dll" PRECMD="\$FSC_PIPE -a --optimize+ lib03.fs" # test03.fs -NoMT SOURCE=test04.fs SCFLAGS="--optimize+ -r:lib04.dll" PRECMD="\$FSC_PIPE -a --optimize+ lib04.fs" # test04.fs - - SOURCE=InlineWithPrivateValues01.fs SCFLAGS="-r:TypeLib01.dll" PRECMD="\$FSC_PIPE -a --optimize+ TypeLib01.fs" # InlineWithPrivateValuesStruct - SOURCE=InlineWithPrivateValues01.fs SCFLAGS="-r:TypeLib02.dll" PRECMD="\$FSC_PIPE -a --optimize+ TypeLib02.fs" # InlineWithPrivateValuesRef diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AssemblyBoundary/keep.lst b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AssemblyBoundary/keep.lst deleted file mode 100644 index f59ec20aabf..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AssemblyBoundary/keep.lst +++ /dev/null @@ -1 +0,0 @@ -* \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/env.lst b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/env.lst deleted file mode 100644 index ffb1ef3226a..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/env.lst +++ /dev/null @@ -1,19 +0,0 @@ -NoMT SOURCE=Utils.fs SCFLAGS="-a -r:System.Xml.Linq" # Utils.fs -Retry,NoMT SOURCE=Linq101Aggregates01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Aggregates01.exe" # Linq101Aggregates01.fs - CodeGen -NoMT SOURCE=Linq101ElementOperators01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101ElementOperators01.exe" # Linq101ElementOperators01.fs - CodeGen -NoMT SOURCE=Linq101Grouping01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Grouping01.exe" # Linq101Grouping01.fs - CodeGen -NoMT SOURCE=Linq101Joins01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Joins01.exe" # Linq101Joins01.fs - CodeGen -NoMT SOURCE=Linq101Ordering01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Ordering01.exe" # Linq101Ordering01.fs - CodeGen -NoMT SOURCE=Linq101Partitioning01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Partitioning01.exe" # Linq101Partitioning01.fs - CodeGen -NoMT SOURCE=Linq101Quantifiers01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Quantifiers01.exe" # Linq101Quantifiers01.fs - CodeGen -Retry,NoMT SOURCE=Linq101Select01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Select01.exe" # Linq101Select01.fs - CodeGen -Retry,NoMT SOURCE=Linq101SetOperators01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101SetOperators01.exe" # Linq101SetOperators01.fs - CodeGen -NoMT SOURCE=Linq101Where01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Where01.exe" # Linq101Where01.fs - CodeGen - - - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/env.lst b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/env.lst deleted file mode 100644 index 31a98f68d38..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/env.lst +++ /dev/null @@ -1,7 +0,0 @@ - SOURCE=LetBinding01.fs SCFLAGS=" -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd LetBinding01.exe" # LetBinding01.fs - - SOURCE=StaticInit_Struct01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Struct01.dll" # StaticInit_Struct01.fs - - - SOURCE=StaticInit_Class01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Class01.dll" # StaticInit_Class01.fs - - - SOURCE=StaticInit_Module01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Module01.dll" # StaticInit_Module01.fs - diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 66eb3cd39b0..a8bb9167159 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -177,12 +177,6 @@ - - %(RelativeDir)\TestSource\%(Filename)%(Extension) - - - %(RelativeDir)\TestSource\%(Filename)%(Extension) - @@ -191,12 +185,13 @@ - - + + + + + - - @@ -210,14 +205,21 @@ + - - - + + %(RelativeDir)\TestSource\%(Filename)%(Extension) + %(RelativeDir)\BaseLine\%(Filename)%(Extension) + + + + + + diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected b/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected index 1c37f62e330..1b20d3ba959 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected @@ -4151,6 +4151,14 @@ FSharp.Compiler.IO.StreamExtensions: System.String[] Stream.ReadAllLines(System. FSharp.Compiler.IO.StreamExtensions: Void Stream.WriteAllLines(System.IO.Stream, System.Collections.Generic.IEnumerable`1[System.String], Microsoft.FSharp.Core.FSharpOption`1[System.Text.Encoding]) FSharp.Compiler.IO.StreamExtensions: Void Stream.WriteAllText(System.IO.Stream, System.String) FSharp.Compiler.IO.StreamExtensions: Void Stream.Write[a](System.IO.Stream, a) +FSharp.Compiler.Interactive.CtrlBreakHandlers +FSharp.Compiler.Interactive.CtrlBreakHandlers+CtrlBreakClient: Void .ctor(System.String) +FSharp.Compiler.Interactive.CtrlBreakHandlers+CtrlBreakClient: Void Interrupt() +FSharp.Compiler.Interactive.CtrlBreakHandlers+CtrlBreakService: Void .ctor(System.String) +FSharp.Compiler.Interactive.CtrlBreakHandlers+CtrlBreakService: Void Interrupt() +FSharp.Compiler.Interactive.CtrlBreakHandlers+CtrlBreakService: Void Run() +FSharp.Compiler.Interactive.CtrlBreakHandlers: FSharp.Compiler.Interactive.CtrlBreakHandlers+CtrlBreakClient +FSharp.Compiler.Interactive.CtrlBreakHandlers: FSharp.Compiler.Interactive.CtrlBreakHandlers+CtrlBreakService FSharp.Compiler.Interactive.Shell FSharp.Compiler.Interactive.Shell+CompilerInputStream: Boolean CanRead FSharp.Compiler.Interactive.Shell+CompilerInputStream: Boolean CanSeek diff --git a/tests/fsharp/Compiler/Language/StringInterpolation.fs b/tests/fsharp/Compiler/Language/StringInterpolation.fs index 367f4997d85..bda3864b4eb 100644 --- a/tests/fsharp/Compiler/Language/StringInterpolation.fs +++ b/tests/fsharp/Compiler/Language/StringInterpolation.fs @@ -730,70 +730,50 @@ let x3 : FormattableString = $"one %10s{String.Empty}" // no %10s in Formattable (FSharpDiagnosticSeverity.Error, 3376, (6, 30, 6, 55), "Invalid interpolated string. Interpolated strings used as type IFormattable or type FormattableString may not use '%' specifiers, only .NET-style interpolands such as '{expr}', '{expr,3}' or '{expr:N5}' may be used.")|] - - [] - let ``String interpolation negative nested in single`` () = - let code = """ - -open System -let s1 = $"123{456}789{"012"}345" -let s2 = $"123{456}789{@"012"}345" -let s3 = $"123{456}789{$"012"}345" -let s4 = $@"123{456}789{"012"}345" -let s5 = @$"123{456}789{"012"}345" -let s6 = $@"123{456}789{@"012"}345" -let s7 = @$"123{456}789{$"012"}345" -let s8 = $@"123{456}789{@$"012"}345" -let s9 = @$"123{456}789{$@"012"}345" -""" - CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:5.0" |] + [] + [] + [] + [] + [] + [] + [] + [] + [] + let ``String interpolation negative nested in single`` ((part1: string, expr: string, part2: string)) = + let code = part1 + expr + part2 + let exprPosBegin = 1 + part1.Length + let quotePosInExpr = exprPosBegin + (expr |> Seq.findIndex (fun c -> c = '"')) + let closingBracePos = exprPosBegin + expr.Length + CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:5.0" |] code - [|(FSharpDiagnosticSeverity.Error, 3373, (4, 24, 4, 25), - "Invalid interpolated string. Single quote or verbatim string literals may not be used in interpolated expressions in single quote or verbatim strings. Consider using an explicit 'let' binding for the interpolation expression or use a triple quote string as the outer string literal."); - (FSharpDiagnosticSeverity.Error, 3373, (5, 24, 5, 26), - "Invalid interpolated string. Single quote or verbatim string literals may not be used in interpolated expressions in single quote or verbatim strings. Consider using an explicit 'let' binding for the interpolation expression or use a triple quote string as the outer string literal."); - (FSharpDiagnosticSeverity.Error, 3373, (6, 24, 6, 26), - "Invalid interpolated string. Single quote or verbatim string literals may not be used in interpolated expressions in single quote or verbatim strings. Consider using an explicit 'let' binding for the interpolation expression or use a triple quote string as the outer string literal."); - (FSharpDiagnosticSeverity.Error, 3373, (7, 25, 7, 26), - "Invalid interpolated string. Single quote or verbatim string literals may not be used in interpolated expressions in single quote or verbatim strings. Consider using an explicit 'let' binding for the interpolation expression or use a triple quote string as the outer string literal."); - (FSharpDiagnosticSeverity.Error, 3373, (8, 25, 8, 26), - "Invalid interpolated string. Single quote or verbatim string literals may not be used in interpolated expressions in single quote or verbatim strings. Consider using an explicit 'let' binding for the interpolation expression or use a triple quote string as the outer string literal."); - (FSharpDiagnosticSeverity.Error, 3373, (9, 25, 9, 27), - "Invalid interpolated string. Single quote or verbatim string literals may not be used in interpolated expressions in single quote or verbatim strings. Consider using an explicit 'let' binding for the interpolation expression or use a triple quote string as the outer string literal."); - (FSharpDiagnosticSeverity.Error, 3373, (10, 25, 10, 27), - "Invalid interpolated string. Single quote or verbatim string literals may not be used in interpolated expressions in single quote or verbatim strings. Consider using an explicit 'let' binding for the interpolation expression or use a triple quote string as the outer string literal."); - (FSharpDiagnosticSeverity.Error, 3373, (11, 25, 11, 28), - "Invalid interpolated string. Single quote or verbatim string literals may not be used in interpolated expressions in single quote or verbatim strings. Consider using an explicit 'let' binding for the interpolation expression or use a triple quote string as the outer string literal."); - (FSharpDiagnosticSeverity.Error, 3373, (12, 25, 12, 28), - "Invalid interpolated string. Single quote or verbatim string literals may not be used in interpolated expressions in single quote or verbatim strings. Consider using an explicit 'let' binding for the interpolation expression or use a triple quote string as the outer string literal.")|] - - [] - let ``String interpolation negative nested in triple`` () = - let code = " - -open System -let TripleInTripleInterpolated = $\"\"\"123{456}789{\"\"\"012\"\"\"}345\"\"\" -let TripleInSingleInterpolated = $\"123{456}789{\"\"\"012\"\"\"}345\" -let TripleInVerbatimInterpolated = $\"123{456}789{\"\"\"012\"\"\"}345\" -let TripleInterpolatedInTripleInterpolated = $\"\"\"123{456}789{$\"\"\"012\"\"\"}345\"\"\" -let TripleInterpolatedInSingleInterpolated = $\"123{456}789{$\"\"\"012\"\"\"}345\" -let TripleInterpolatedInVerbatimInterpolated = $\"123{456}789{$\"\"\"012\"\"\"}345\" -" + [|(FSharpDiagnosticSeverity.Error, 3373, (1, exprPosBegin, 1, quotePosInExpr + 1), + "Invalid interpolated string. Single quote or verbatim string literals may not be used in interpolated expressions in single quote or verbatim strings. \ + Consider using an explicit 'let' binding for the interpolation expression or use a triple quote string as the outer string literal."); + (FSharpDiagnosticSeverity.Error, 10, (1, closingBracePos, 1, closingBracePos + 1), + "Unexpected symbol '}' in binding. Expected interpolated string (final part), interpolated string (part) or other token."); + (FSharpDiagnosticSeverity.Error, 514, (1, code.Length, 1, code.Length + 1), "End of file in string begun at or before here")|] + + [] + [] + [] + [] + [] + [] + let ``String interpolation negative nested in triple`` ((part1: string, expr: string, part2: string)) = + let code = part1 + expr + part2 + let exprPosBegin = 1 + part1.Length + let exprOpenQuoteEnd = exprPosBegin + 3 + (expr |> Seq.takeWhile (fun c -> c <> '"') |> Seq.length) + let closingBracePos = exprPosBegin + expr.Length + let closingQuotePos = code.Length + 1 - 3 CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:5.0" |] code - [|(FSharpDiagnosticSeverity.Error, 3374, (4, 52, 4, 55), - "Invalid interpolated string. Triple quote string literals may not be used in interpolated expressions. Consider using an explicit 'let' binding for the interpolation expression."); - (FSharpDiagnosticSeverity.Error, 3374, (5, 50, 5, 53), - "Invalid interpolated string. Triple quote string literals may not be used in interpolated expressions. Consider using an explicit 'let' binding for the interpolation expression."); - (FSharpDiagnosticSeverity.Error, 3374, (6, 50, 6, 53), + [|(FSharpDiagnosticSeverity.Error, 3374, (1, exprPosBegin, 1, exprOpenQuoteEnd), "Invalid interpolated string. Triple quote string literals may not be used in interpolated expressions. Consider using an explicit 'let' binding for the interpolation expression."); - (FSharpDiagnosticSeverity.Error, 3374, (7, 64, 7, 68), - "Invalid interpolated string. Triple quote string literals may not be used in interpolated expressions. Consider using an explicit 'let' binding for the interpolation expression."); - (FSharpDiagnosticSeverity.Error, 3374, (8, 62, 8, 66), - "Invalid interpolated string. Triple quote string literals may not be used in interpolated expressions. Consider using an explicit 'let' binding for the interpolation expression."); - (FSharpDiagnosticSeverity.Error, 3374, (9, 62, 9, 66), - "Invalid interpolated string. Triple quote string literals may not be used in interpolated expressions. Consider using an explicit 'let' binding for the interpolation expression.")|] - + (FSharpDiagnosticSeverity.Error, 10, (1, closingBracePos, 1, closingBracePos + 1), + "Unexpected symbol '}' in binding. Expected interpolated string (final part), interpolated string (part) or other token."); + (FSharpDiagnosticSeverity.Error, 1232, (1, closingQuotePos, 1, closingQuotePos + 3), + "End of file in triple-quote string begun at or before here")|] + [] let ``String interpolation negative incomplete string`` () = let code = """let x1 = $"one %d{System.String.Empty}""" @@ -803,9 +783,9 @@ let TripleInterpolatedInVerbatimInterpolated = $\"123{456}789{$\"\"\"012\"\"\"}3 "Incomplete structured construct at or before this point in binding. Expected interpolated string (final part), interpolated string (part) or other token."); (FSharpDiagnosticSeverity.Error, 3379, (1, 38, 1, 39), "Incomplete interpolated string begun at or before here")|] - + [] - let ``String interpolation negative incomplete string fill`` () = + let ``String interpolation negative incomplete string with incomplete fill`` () = let code = """let x1 = $"one %d{System.String.Empty""" CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:5.0" |] code @@ -813,7 +793,36 @@ let TripleInterpolatedInVerbatimInterpolated = $\"123{456}789{$\"\"\"012\"\"\"}3 "Incomplete structured construct at or before this point in binding. Expected interpolated string (final part), interpolated string (part) or other token."); (FSharpDiagnosticSeverity.Error, 3378, (1, 18, 1, 19), "Incomplete interpolated string expression fill begun at or before here")|] - + + [] + let ``String interpolation negative incomplete fill`` () = + let code = "let x1 = $\"one %d{System.String.Empty\"" + CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:5.0" |] + code + [|(FSharpDiagnosticSeverity.Error, 3373, (1, 38, 1, 39), + "Invalid interpolated string. Single quote or verbatim string literals may not be used in interpolated expressions in single quote or verbatim strings. \ + Consider using an explicit 'let' binding for the interpolation expression or use a triple quote string as the outer string literal."); + (FSharpDiagnosticSeverity.Error, 10, (1, 1, 1, 39), + "Incomplete structured construct at or before this point in binding. Expected interpolated string (final part), interpolated string (part) or other token."); + (FSharpDiagnosticSeverity.Error, 514, (1, 38, 1, 39), + "End of file in string begun at or before here")|] + + [] + let ``String interpolation negative incomplete fill with another valid string`` () = + let code = """ +let x1 = $"one %d{System.String.Empty" +let x2 = "any old string" +""" + CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:5.0" |] + code + [|(FSharpDiagnosticSeverity.Error, 3373, (2, 38, 2, 39), + "Invalid interpolated string. Single quote or verbatim string literals may not be used in interpolated expressions in single quote or verbatim strings. \ + Consider using an explicit 'let' binding for the interpolation expression or use a triple quote string as the outer string literal."); + (FSharpDiagnosticSeverity.Error, 10, (4, 1, 4, 1), + "Incomplete structured construct at or before this point in binding. Expected interpolated string (final part), interpolated string (part) or other token."); + (FSharpDiagnosticSeverity.Error, 514, (3, 25, 3, 26), + "End of file in string begun at or before here")|] + [] let ``String interpolation negative incomplete verbatim string`` () = let code = """let x1 = @$"one %d{System.String.Empty} """ diff --git a/vsintegration/Vsix/VisualFSharpFull/Source.extension.vsixmanifest b/vsintegration/Vsix/VisualFSharpFull/Source.extension.vsixmanifest index fb2764e3d58..081cd403c50 100644 --- a/vsintegration/Vsix/VisualFSharpFull/Source.extension.vsixmanifest +++ b/vsintegration/Vsix/VisualFSharpFull/Source.extension.vsixmanifest @@ -23,7 +23,6 @@ - @@ -49,7 +48,6 @@ - diff --git a/vsintegration/Vsix/VisualFSharpFull/VisualFSharp.Core.targets b/vsintegration/Vsix/VisualFSharpFull/VisualFSharp.Core.targets index 4d86ad05cc5..f3c3ce40b79 100644 --- a/vsintegration/Vsix/VisualFSharpFull/VisualFSharp.Core.targets +++ b/vsintegration/Vsix/VisualFSharpFull/VisualFSharp.Core.targets @@ -48,18 +48,6 @@ TargetFramework=netstandard2.0 - - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06} - FSharp.Compiler.Server.Shared - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b - DebugSymbolsProjectOutputGroup%3b - true - All - 2 - True - TargetFramework=$(DependencyTargetFramework) - - {A59DB8AE-8044-41A5-848A-800A7FF31C93} FSharp.Compiler.Service diff --git a/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj b/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj index d247d927341..9c82f79ec9e 100644 --- a/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj +++ b/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj @@ -18,7 +18,6 @@ - diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/FSharp.ProjectSystem.FSharp.fsproj b/vsintegration/src/FSharp.ProjectSystem.FSharp/FSharp.ProjectSystem.FSharp.fsproj index aab721f9de1..b472ed00da0 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/FSharp.ProjectSystem.FSharp.fsproj +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/FSharp.ProjectSystem.FSharp.fsproj @@ -71,11 +71,6 @@ $(FSharpCompilerServiceVersion) $PackageFolder$\FSharp.Compiler.Service.dll - - FSharp.Compiler.Server.Shared - $(FSProductVersion) - $PackageFolder$\FSharp.Compiler.Server.Shared.dll - FSharp.UIResources $(VSAssemblyVersion) diff --git a/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj b/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj index b7819fb3611..a4fba0a23d8 100644 --- a/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj +++ b/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj @@ -43,8 +43,7 @@ - - + diff --git a/vsintegration/src/FSharp.VS.FSI/sessions.fs b/vsintegration/src/FSharp.VS.FSI/sessions.fs index fbd1b43c363..c552c0eda41 100644 --- a/vsintegration/src/FSharp.VS.FSI/sessions.fs +++ b/vsintegration/src/FSharp.VS.FSI/sessions.fs @@ -15,6 +15,9 @@ open System.Threading let mutable timeoutAppShowMessageOnTimeOut = true open Microsoft.FSharp.Control +open FSharp.Compiler.Interactive +open FSharp.Compiler.Interactive.CtrlBreakHandlers + // Wrapper around ManualResetEvent which will ignore Sets on disposed object type internal EventWrapper() = let waitHandle = new ManualResetEvent(false) @@ -129,7 +132,7 @@ let catchAll trigger x = try trigger x with err -> System.Windows.Forms.MessageBox.Show(err.ToString()) |> ignore -let determineFsiPath () = +let determineFsiPath () = if SessionsProperties.fsiUseNetCore then let pf = Environment.GetEnvironmentVariable("ProgramW6432") let pf = if String.IsNullOrEmpty(pf) then Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) else pf @@ -137,7 +140,7 @@ let determineFsiPath () = let arg = "fsi" if not (File.Exists exe) then raise (SessionError (VFSIstrings.SR.couldNotFindFsiExe exe)) - exe, arg, false, false + exe, arg, false else let fsiExeName () = if SessionsProperties.useAnyCpuVersion then @@ -152,9 +155,9 @@ let determineFsiPath () = let thisAssemblyDirectory = typeof.Assembly.Location |> Path.GetDirectoryName Path.Combine(thisAssemblyDirectory,fsiExeName() ) - // This path is relative to the location of "FSharp.Compiler.Interactive.Settings.dll" + // This path is relative to the location of "FSharp.Compiler.Service.dll" let determineFsiRelativePath2 () = - let thisAssembly : System.Reflection.Assembly = typeof.Assembly + let thisAssembly : System.Reflection.Assembly = typeof.Assembly let thisAssemblyDirectory = thisAssembly.Location |> Path.GetDirectoryName // Use the quick-development path if available Path.Combine(thisAssemblyDirectory, "Tools", fsiExeName() ) @@ -175,7 +178,7 @@ let determineFsiPath () = // Otherwise give up raise (SessionError (VFSIstrings.SR.couldNotFindFsiExe fsiRegistryPath)) - fsiExe, "", true, true + fsiExe, "", true let readOutputAsync (reader: StreamReader) trigger = let buffer = StringBuilder(1024) @@ -234,7 +237,7 @@ let readOutputAsync (reader: StreamReader) trigger = let fsiStartInfo channelName sourceFile = let procInfo = new ProcessStartInfo() - let fsiPath, fsiFirstArgs, fsiSupportsServer, fsiSupportsShadowcopy = determineFsiPath () + let fsiPath, fsiFirstArgs, fsiSupportsShadowcopy = determineFsiPath () procInfo.FileName <- fsiPath @@ -278,7 +281,7 @@ let fsiStartInfo channelName sourceFile = if Directory.Exists(initialPath) then procInfo.WorkingDirectory <- initialPath - procInfo, fsiSupportsServer + procInfo let nonNull = function null -> false | (s:string) -> true @@ -286,13 +289,13 @@ let nonNull = function null -> false | (s:string) -> true /// Represents an active F# Interactive process to which Visual Studio is connected via stdin/stdout/stderr and a remoting channel type FsiSession(sourceFile: string) = let randomSalt = System.Random() - let channelName = - let pid = System.Diagnostics.Process.GetCurrentProcess().Id - let tick = System.Environment.TickCount + let channelName = + let pid = Process.GetCurrentProcess().Id + let tick = Environment.TickCount let salt = randomSalt.Next() sprintf "FSIChannel_%d_%d_%d" pid tick salt - let procInfo, fsiSupportsServer = fsiStartInfo channelName sourceFile + let procInfo = fsiStartInfo channelName sourceFile let usingNetCore = SessionsProperties.fsiUseNetCore @@ -349,24 +352,19 @@ type FsiSession(sourceFile: string) = do cmdProcess.EnableRaisingEvents <- true - let clientConnection = - if fsiSupportsServer then - try Some (FSharp.Compiler.Server.Shared.FSharpInteractiveServer.StartClient(channelName)) - with e -> raise (SessionError (VFSIstrings.SR.exceptionRaisedWhenCreatingRemotingClient(e.ToString()))) - else - None + let client = + try + new CtrlBreakClient(channelName) + with e -> raise (SessionError (VFSIstrings.SR.exceptionRaisedWhenCreatingRemotingClient(e.ToString()))) - /// interrupt timeout in miliseconds - let interruptTimeoutMS = 1000 + /// interrupt timeout in miliseconds + let interruptTimeoutMS = 1000 // Create session object member _.Interrupt() = - match clientConnection with - | None -> false - | Some client -> - match timeoutApp "VFSI interrupt" interruptTimeoutMS (fun () -> client.Interrupt()) () with - | Some () -> true - | None -> false + match timeoutApp "VFSI interrupt" interruptTimeoutMS (fun () -> client.Interrupt()) () with + | Some () -> true + | None -> false member _.SendInput (str: string) = inputQueue.Post(str) @@ -378,7 +376,7 @@ type FsiSession(sourceFile: string) = member _.Alive = not cmdProcess.HasExited - member _.SupportsInterrupt = not cmdProcess.HasExited && clientConnection.IsSome // clientConnection not on .NET Core + member _.SupportsInterrupt = not cmdProcess.HasExited member _.ProcessID = // When using .NET Core, allow up to 2 seconds to allow detection of process ID diff --git a/vsintegration/update-vsintegration.cmd b/vsintegration/update-vsintegration.cmd index 3a7da14f77d..740e098aa65 100644 --- a/vsintegration/update-vsintegration.cmd +++ b/vsintegration/update-vsintegration.cmd @@ -274,7 +274,6 @@ if "%DEPLOY%" == "yes" if "!ISADMIN!" == "yes" ( !SN32! -Vr HostedCompilerServer,b03f5f7f11d50a3a 1>NUL 2>NUL !SN32! -Vr FSharp.Compiler,b03f5f7f11d50a3a 1>NUL 2>NUL - !SN32! -Vr FSharp.Compiler.Server.Shared,b03f5f7f11d50a3a 1>NUL 2>NUL !SN32! -Vr FSharp.Editor,b03f5f7f11d50a3a 1>NUL 2>NUL !SN32! -Vr FSharp.LanguageService,b03f5f7f11d50a3a 1>NUL 2>NUL !SN32! -Vr FSharp.LanguageService.Base,b03f5f7f11d50a3a 1>NUL 2>NUL @@ -293,7 +292,6 @@ if "%DEPLOY%" == "yes" if "!ISADMIN!" == "yes" ( !SN64! -Vr HostedCompilerServer,b03f5f7f11d50a3a 1>NUL 2>NUL !SN64! -Vr FSharp.Compiler,b03f5f7f11d50a3a 1>NUL 2>NUL - !SN64! -Vr FSharp.Compiler.Server.Shared,b03f5f7f11d50a3a 1>NUL 2>NUL !SN64! -Vr FSharp.Editor,b03f5f7f11d50a3a 1>NUL 2>NUL !SN64! -Vr FSharp.LanguageService,b03f5f7f11d50a3a 1>NUL 2>NUL !SN64! -Vr FSharp.LanguageService.Base,b03f5f7f11d50a3a 1>NUL 2>NUL @@ -346,7 +344,6 @@ if "%ACTION%" == "restore" if "!ISADMIN!" == "yes" ( !SN32! -Vu HostedCompilerServer,b03f5f7f11d50a3a 2>NUL 1>NUL !SN32! -Vu FSharp.Compiler,b03f5f7f11d50a3a 2>NUL 1>NUL - !SN32! -Vu FSharp.Compiler.Server.Shared,b03f5f7f11d50a3a 2>NUL 1>NUL !SN32! -Vu FSharp.Editor,b03f5f7f11d50a3a 2>NUL 1>NUL !SN32! -Vu FSharp.LanguageService,b03f5f7f11d50a3a 2>NUL 1>NUL !SN32! -Vu FSharp.LanguageService.Base,b03f5f7f11d50a3a 2>NUL 1>NUL @@ -365,7 +362,6 @@ if "%ACTION%" == "restore" if "!ISADMIN!" == "yes" ( !SN64! -Vu HostedCompilerServer,b03f5f7f11d50a3a 2>NUL 1>NUL !SN64! -Vu FSharp.Compiler,b03f5f7f11d50a3a 2>NUL 1>NUL - !SN64! -Vu FSharp.Compiler.Server.Shared,b03f5f7f11d50a3a 2>NUL 1>NUL !SN64! -Vu FSharp.Editor,b03f5f7f11d50a3a 2>NUL 1>NUL !SN64! -Vu FSharp.LanguageService,b03f5f7f11d50a3a 2>NUL 1>NUL !SN64! -Vu FSharp.LanguageService.Base,b03f5f7f11d50a3a 2>NUL 1>NUL