Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do FCS 41 update in hopes of getting somewhere with cracking #2

Merged
merged 7 commits into from
Nov 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ storage: none
github TheAngryByrd/FsLibLog:f81cba440bf0476bb4e2262b57a067a0d6ab78a7 src/FsLibLog/FsLibLog.fs

nuget Argu ~> 5.2.0
nuget Fantomas.Client 0.3.1
nuget FSharp.Compiler.Service ~> 39
nuget Ionide.ProjInfo 0.54.2
nuget Ionide.ProjInfo.FCS 0.54.2
nuget Ionide.ProjInfo.ProjectSystem 0.54.2
nuget Ionide.ProjInfo.Sln 0.54.2
nuget Fantomas.Client
nuget FSharp.Compiler.Service ~> 41
nuget Ionide.ProjInfo 0.55.0
nuget Ionide.ProjInfo.FCS 0.55.0
nuget Ionide.ProjInfo.ProjectSystem 0.55.0
nuget Ionide.ProjInfo.Sln 0.55.0
nuget Microsoft.Build copy_local:false
nuget Microsoft.Build.Framework copy_local:false
nuget Microsoft.Build.Utilities.Core copy_local:false
Expand All @@ -27,7 +27,7 @@ nuget Mono.Cecil >= 0.10.0-beta7
nuget Newtonsoft.Json
# nuget Fake.Runtime prerelease
nuget FSharpLint.Core
nuget FSharp.Core < 6.0.0
nuget FSharp.Core
nuget Dapper
nuget Microsoft.Data.Sqlite 2.2.4
nuget Microsoft.Data.Sqlite.Core 2.2.4
Expand All @@ -38,15 +38,15 @@ nuget Serilog
nuget Serilog.Sinks.File
nuget Serilog.Sinks.Console
nuget Serilog.Sinks.Async
nuget Destructurama.FSharp 1.1.1-dev-00035 # prerelease is stable, just has different FSharp.Core version constraints
nuget Destructurama.FSharp
nuget FSharp.UMX
nuget FSharp.Formatting
nuget FsToolkit.ErrorHandling
nuget FSharpx.Async
nuget CliWrap

nuget Microsoft.NET.Test.Sdk ~> 16.8.0
nuget Microsoft.SourceLink.GitHub copy_local:true
nuget Microsoft.NET.Test.Sdk
nuget Dotnet.ReproducibleBuilds copy_local:true
nuget Microsoft.NETFramework.ReferenceAssemblies 1.0.0
nuget Expecto
nuget YoloDev.Expecto.TestSdk
Expand Down
105 changes: 60 additions & 45 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ NUGET
Microsoft.Bcl.AsyncInterfaces (>= 5.0) - restriction: || (&& (== net5.0) (>= net461)) (&& (== net5.0) (< netstandard2.1)) (== netstandard2.0)
System.Buffers (>= 4.5.1) - restriction: || (&& (== net5.0) (>= net461)) (&& (== net5.0) (< netstandard2.1)) (== netstandard2.0)
System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (&& (== net5.0) (>= net461)) (&& (== net5.0) (< netstandard2.1)) (== netstandard2.0)
Dapper (2.0.90)
Dapper (2.0.123)
System.Reflection.Emit.Lightweight (>= 4.7) - restriction: == netstandard2.0
Destructurama.FSharp (1.1.1-dev-00035)
Destructurama.FSharp (1.2)
FSharp.Core (>= 4.3.4)
Serilog (>= 2.0 < 3.0)
DotNet.ReproducibleBuilds (0.1.66) - copy_local: true
Microsoft.SourceLink.AzureRepos.Git (>= 1.0)
Microsoft.SourceLink.Bitbucket.Git (>= 1.0)
Microsoft.SourceLink.GitHub (>= 1.0)
Microsoft.SourceLink.GitLab (>= 1.0)
Expecto (9.0.4)
FSharp.Core (>= 4.6)
Mono.Cecil (>= 0.11.3)
Expand All @@ -23,15 +28,15 @@ NUGET
StreamJsonRpc (>= 2.8.28)
FParsec (1.1.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
FSharp.Core (>= 4.3.4)
FSharp.Analyzers.SDK (0.9)
FSharp.Compiler.Service (>= 39.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
FSharp.Core (>= 5.0.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
McMaster.NETCore.Plugins (>= 1.3.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
FSharp.Compiler.Service (39.0)
FSharp.Core (5.0.1)
Microsoft.Build.Framework (>= 16.6)
Microsoft.Build.Tasks.Core (>= 16.6)
Microsoft.Build.Utilities.Core (>= 16.6)
FSharp.Analyzers.SDK (0.10.1)
FSharp.Compiler.Service (>= 40.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
FSharp.Core (>= 5.0.2) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
McMaster.NETCore.Plugins (>= 1.4) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
FSharp.Compiler.Service (41.0.1)
FSharp.Core (6.0.1)
Microsoft.Build.Framework (>= 16.11)
Microsoft.Build.Tasks.Core (>= 16.11)
Microsoft.Build.Utilities.Core (>= 16.11)
System.Buffers (>= 4.5.1)
System.Collections.Immutable (>= 5.0)
System.Diagnostics.Process (>= 4.3)
Expand All @@ -40,11 +45,12 @@ NUGET
System.Linq.Queryable (>= 4.3)
System.Memory (>= 4.5.4)
System.Net.Requests (>= 4.3)
System.Net.Security (>= 4.3)
System.Net.Security (>= 4.3.1)
System.Reflection.Emit (>= 4.3)
System.Reflection.Metadata (>= 5.0)
System.Reflection.TypeExtensions (>= 4.3)
System.Runtime (>= 4.3)
System.Runtime.CompilerServices.Unsafe (>= 5.0)
System.Runtime.InteropServices (>= 4.3)
System.Runtime.Loader (>= 4.3)
System.Security.Claims (>= 4.3)
Expand All @@ -59,18 +65,18 @@ NUGET
FSharp.Control.Reactive (5.0.2) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
FSharp.Core (>= 4.7.2)
System.Reactive (>= 5.0)
FSharp.Core (5.0.1)
FSharp.Formatting (11.2)
FSharp.Compiler.Service (>= 39.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netstandard2.1))
FSharp.Core (6.0.1)
FSharp.Formatting (11.5.1)
FSharp.Compiler.Service (>= 40.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netstandard2.1))
FSharp.UMX (1.1)
FSharp.Core (>= 4.3.4)
FSharpLint.Core (0.19)
FSharpLint.Core (0.20.2)
FParsec (>= 1.1.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
FSharp.Compiler.Service (>= 39.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
FSharp.Core (>= 5.0.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo (>= 0.52) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo.FCS (>= 0.48) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo.ProjectSystem (>= 0.48) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
FSharp.Compiler.Service (>= 40.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
FSharp.Core (>= 5.0.2) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo (>= 0.53.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo.FCS (>= 0.53.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo.ProjectSystem (>= 0.53.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Microsoft.Build (>= 16.10) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Microsoft.Build.Framework (>= 16.10) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Microsoft.Build.Locator (>= 1.4.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Expand All @@ -87,25 +93,25 @@ NUGET
ICSharpCode.Decompiler (7.1.0.6543)
System.Collections.Immutable (>= 5.0)
System.Reflection.Metadata (>= 5.0)
Ionide.ProjInfo (0.54.2)
FSharp.Core (>= 5.0.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo.Sln (>= 0.54.2) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Microsoft.Build (>= 16.10) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Microsoft.Build.Framework (>= 16.10) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo (0.55)
FSharp.Core (>= 6.0.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo.Sln (>= 0.55) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Microsoft.Build (>= 16.11) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Microsoft.Build.Framework (>= 16.11) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
SemanticVersioning (>= 2.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo.FCS (0.54.2)
FSharp.Compiler.Service (>= 39.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
FSharp.Core (>= 5.0.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo (>= 0.54.2) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo.ProjectSystem (0.54.2)
FSharp.Compiler.Service (>= 39.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo.FCS (0.55)
FSharp.Compiler.Service (>= 41.0.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
FSharp.Core (>= 6.0.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo (>= 0.55) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo.ProjectSystem (0.55)
FSharp.Compiler.Service (>= 41.0.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
FSharp.Control.Reactive (>= 5.0.2) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
FSharp.Core (>= 5.0.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo (>= 0.54.2) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo.FCS (>= 0.54.2) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo.Sln (>= 0.54.2) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
FSharp.Core (>= 6.0.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo (>= 0.55) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo.FCS (>= 0.55) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo.Sln (>= 0.55) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Newtonsoft.Json (>= 13.0.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Ionide.ProjInfo.Sln (0.54.2)
Ionide.ProjInfo.Sln (0.55)
McMaster.NETCore.Plugins (1.4) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net5.0))
Microsoft.DotNet.PlatformAbstractions (>= 3.1.6) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1))
Microsoft.Extensions.DependencyModel (>= 5.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1))
Expand Down Expand Up @@ -157,7 +163,7 @@ NUGET
System.Configuration.ConfigurationManager (>= 4.7)
System.Security.Permissions (>= 4.7)
System.Text.Encoding.CodePages (>= 4.0.1)
Microsoft.CodeCoverage (17.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net45)) (&& (== netstandard2.0) (>= netcoreapp2.1))
Microsoft.CodeCoverage (17.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net45)) (&& (== netstandard2.0) (>= netcoreapp1.0))
Microsoft.Data.Sqlite (2.2.4)
Microsoft.Data.Sqlite.Core (>= 2.2.4)
SQLitePCLRaw.bundle_green (>= 1.1.12)
Expand All @@ -168,20 +174,29 @@ NUGET
Microsoft.NET.StringTools (1.0) - copy_local: false
System.Memory (>= 4.5.4)
System.Runtime.CompilerServices.Unsafe (>= 5.0)
Microsoft.NET.Test.Sdk (16.8.3)
Microsoft.CodeCoverage (>= 16.8.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net45)) (&& (== netstandard2.0) (>= netcoreapp2.1))
Microsoft.TestPlatform.TestHost (>= 16.8.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1))
Microsoft.NET.Test.Sdk (17.0)
Microsoft.CodeCoverage (>= 17.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net45)) (&& (== netstandard2.0) (>= netcoreapp1.0))
Microsoft.TestPlatform.TestHost (>= 17.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp1.0))
Microsoft.NETCore.Platforms (5.0.4) - copy_local: false
Microsoft.NETCore.Targets (5.0)
Microsoft.NETFramework.ReferenceAssemblies (1.0)
Microsoft.SourceLink.AzureRepos.Git (1.0) - copy_local: true
Microsoft.Build.Tasks.Git (>= 1.0)
Microsoft.SourceLink.Common (>= 1.0)
Microsoft.SourceLink.Bitbucket.Git (1.0) - copy_local: true
Microsoft.Build.Tasks.Git (>= 1.0)
Microsoft.SourceLink.Common (>= 1.0)
Microsoft.SourceLink.Common (1.0) - copy_local: true
Microsoft.SourceLink.GitHub (1.0) - copy_local: true
Microsoft.Build.Tasks.Git (>= 1.0)
Microsoft.SourceLink.Common (>= 1.0)
Microsoft.SourceLink.GitLab (1.0) - copy_local: true
Microsoft.Build.Tasks.Git (>= 1.0)
Microsoft.SourceLink.Common (>= 1.0)
Microsoft.TestPlatform.ObjectModel (17.0)
NuGet.Frameworks (>= 5.0)
System.Reflection.Metadata (>= 1.6)
Microsoft.TestPlatform.TestHost (17.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1))
Microsoft.TestPlatform.TestHost (17.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp1.0))
Microsoft.TestPlatform.ObjectModel (>= 17.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp1.0)) (&& (== netstandard2.0) (>= uap10.0))
Newtonsoft.Json (>= 9.0.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp1.0)) (&& (== netstandard2.0) (>= uap10.0))
Microsoft.VisualStudio.Threading (17.0.63)
Expand All @@ -202,7 +217,7 @@ NUGET
Microsoft.Win32.SystemEvents (5.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp3.0))
Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.0))
Mono.Cecil (0.11.4)
Nerdbank.Streams (2.8.46)
Nerdbank.Streams (2.8.50)
Microsoft.Bcl.AsyncInterfaces (>= 5.0)
Microsoft.VisualStudio.Threading (>= 16.10.56)
Microsoft.VisualStudio.Validation (>= 16.10.26)
Expand Down Expand Up @@ -565,7 +580,7 @@ NUGET
System.Runtime (4.3.1)
Microsoft.NETCore.Platforms (>= 1.1.1)
Microsoft.NETCore.Targets (>= 1.1.3)
System.Runtime.CompilerServices.Unsafe (5.0) - copy_local: false
System.Runtime.CompilerServices.Unsafe (5.0)
System.Runtime.Extensions (4.3.1)
Microsoft.NETCore.Platforms (>= 1.1.1)
Microsoft.NETCore.Targets (>= 1.1.3)
Expand Down Expand Up @@ -871,7 +886,7 @@ NUGET
FSharp.Control.Reactive (5.0.2)
FSharp.Core (>= 4.7.2)
System.Reactive (>= 5.0)
FSharp.Core (6.0)
FSharp.Core (6.0.1)
Microsoft.Build (16.11)
Microsoft.Build.Framework (16.11)
System.Security.Permissions (>= 4.7)
Expand Down
19 changes: 10 additions & 9 deletions src/FsAutoComplete.BackgroundServices/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ open LanguageServerProtocol.Server
open LanguageServerProtocol.Types
open LanguageServerProtocol
open FSharp.Compiler
open FSharp.Compiler.Diagnostics
open FSharp.Compiler.Text
open FSharp.Compiler.SourceCodeServices
open FSharp.Compiler.CodeAnalysis
open System.Collections.Concurrent
open FsAutoComplete
open Ionide.ProjInfo.ProjectSystem
Expand Down Expand Up @@ -66,8 +67,8 @@ module Helpers =
{
Range =
{
Start = { Line = error.StartLineAlternate - 1; Character = error.StartColumn }
End = { Line = error.EndLineAlternate - 1; Character = error.EndColumn }
Start = { Line = error.StartLine - 1; Character = error.StartColumn }
End = { Line = error.StartLine - 1; Character = error.EndColumn }
}
Severity = fcsSeverityToDiagnostic error.Severity
Source = "F# Compiler"
Expand Down Expand Up @@ -120,7 +121,6 @@ type BackgroundServiceServer(state: State, client: FsacClient) =

let checker = FSharpChecker.Create(projectCacheSize = 1, keepAllBackgroundResolutions = false, suggestNamesForErrors = false)

do checker.ImplicitlyStartBackgroundWork <- false
let mutable latestSdkVersion = lazy None
let mutable latestRuntimeVersion = lazy None
//TODO: does the backgroundservice ever get config updates?
Expand Down Expand Up @@ -224,7 +224,7 @@ type BackgroundServiceServer(state: State, client: FsacClient) =
match ignoredFile with
| Some fn when fn = file -> return ()
| _ ->
let errors = Array.append pr.Errors res.Errors |> Array.map (Helpers.fcsErrorToDiagnostic)
let errors = Array.append pr.Diagnostics res.Diagnostics |> Array.map (Helpers.fcsErrorToDiagnostic)
let msg = {Diagnostics = errors; Uri = Helpers.filePathToUri file}
do! client.SendDiagnostics msg
return ()
Expand All @@ -242,7 +242,7 @@ type BackgroundServiceServer(state: State, client: FsacClient) =
match ignoredFile with
| Some fn when fn = file -> return ()
| _ ->
let errors = Array.append pr.Errors res.Errors |> Array.map (Helpers.fcsErrorToDiagnostic)
let errors = Array.append pr.Diagnostics res.Diagnostics |> Array.map (Helpers.fcsErrorToDiagnostic)
let msg = {Diagnostics = errors; Uri = Helpers.filePathToUri file}
do! client.SendDiagnostics msg
return ()
Expand All @@ -261,8 +261,8 @@ type BackgroundServiceServer(state: State, client: FsacClient) =
|> Seq.distinctBy (fun o -> o.ProjectFileName)
|> Seq.filter (fun o ->
o.ReferencedProjects
|> Array.map (fun (_,v) -> Path.GetFullPath v.ProjectFileName)
|> Array.contains s.ProjectFileName )
|> Array.map (fun p -> Path.GetFullPath p.FileName)
|> Array.contains s.ProjectFileName)
|> Seq.toList

let reactor = MailboxProcessor.Start(fun agent ->
Expand Down Expand Up @@ -412,14 +412,15 @@ module Program =

LanguageServerProtocol.Server.start requestsHandlings input output FsacClient (fun lspClient -> new BackgroundServiceServer(state, lspClient))

open FSharp.Compiler.IO


[<EntryPoint>]
let main argv =

let pid = Int32.Parse argv.[0]
let originalFs = FileSystemAutoOpens.FileSystem
let fs = FileSystem(originalFs, state.Files.TryFind) :> IFileSystem
let fs = FsAutoComplete.FileSystem(originalFs, state.Files.TryFind) :> IFileSystem
FileSystemAutoOpens.FileSystem <- fs
ProcessWatcher.zombieCheckWithHostPID (fun () -> exit 0) pid
SymbolCache.initCache (Environment.CurrentDirectory)
Expand Down
Loading