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

Remove FAKE integration #961

Merged
merged 1 commit into from
Jul 11, 2022
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
1 change: 0 additions & 1 deletion build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#load ".fake/build.fsx/intellisense.fsx"


// open Fake
open Fake.Core
open Fake.IO
open Fake.IO.FileSystemOperators
Expand Down
1 change: 0 additions & 1 deletion paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ nuget FSharp.Analyzers.SDK
nuget ICSharpCode.Decompiler
nuget Mono.Cecil >= 0.10.0-beta7
nuget Newtonsoft.Json
# nuget Fake.Runtime prerelease
nuget FSharpLint.Core
nuget FSharp.Core content: none
nuget Dapper
Expand Down
10 changes: 0 additions & 10 deletions src/FsAutoComplete.Core/Commands.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1632,16 +1632,6 @@ type Commands(checker: FSharpCompilerServiceChecker, state: State, hasAnalyzers:
member __.Quit() =
async { return [ CoreResponse.InfoRes "quitting..." ] }

// member x.FakeTargets file ctx = async {
// let! targets = FakeSupport.getTargets file ctx
// return CoreResponse.Res targets
// }

// member x.FakeRuntime () = async {
// let! runtimePath = FakeSupport.getFakeRuntime ()
// return CoreResponse.Res runtimePath
// }

member x.ScopesForFile(file: string<LocalPath>) =
asyncResult {
let! (opts, text) = state.TryGetFileCheckerOptionsWithLines file
Expand Down
19 changes: 0 additions & 19 deletions src/FsAutoComplete.Core/CompilerServiceInterface.fs
Original file line number Diff line number Diff line change
Expand Up @@ -247,25 +247,6 @@ type FSharpCompilerServiceChecker(hasAnalyzers) =
)

return projOptions

// try
// match FakeSupport.detectFakeScript file with
// | None ->
// logQueueLength optsLogger (Log.setMessage "{file} is not a FAKE script" >> Log.addContextDestructured "file" file)
// return projOptions
// | Some (detectionInfo) ->
// logQueueLength optsLogger (Log.setMessage "{file} is a FAKE script" >> Log.addContextDestructured "file" file)
// try
// let otherOpts = FakeSupport.getProjectOptions detectionInfo
// logQueueLength optsLogger (Log.setMessage "Discovered FAKE options {otherOpts} " >> Log.addContextDestructured "file" file >> Log.addContextDestructured "otherOpts" otherOpts)
// return { projOptions with OtherOptions = otherOpts }
// with e ->
// logQueueLength optsLogger (Log.setLogLevel LogLevel.Error >> Log.setMessage "Error in FAKE script support" >> Log.addExn e)
// return projOptions
// with
// | e ->
// logQueueLength optsLogger (Log.setMessage "error while checking if {file} is a FAKE script" >> Log.addContextDestructured "file" file >> Log.addExn e)
// return projOptions
}

member __.GetBackgroundCheckResultsForFileInProject(fn: string<LocalPath>, opt) =
Expand Down
41 changes: 0 additions & 41 deletions src/FsAutoComplete.Core/FakeSupport.fs

This file was deleted.

1 change: 0 additions & 1 deletion src/FsAutoComplete.Core/FsAutoComplete.Core.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<Compile Include="UnusedDeclarationsAnalyzer.fs" />
<Compile Include="Decompiler.fs" />
<Compile Include="Sourcelink.fs" />
<!-- <Compile Include="FakeSupport.fs" /> -->
<Compile Include="InteractiveDirectives.fs" />
<Compile Include="ParseAndCheckResults.fs" />
<Compile Include="CompilerServiceInterface.fs" />
Expand Down
1 change: 0 additions & 1 deletion src/FsAutoComplete.Core/paket.references
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Ionide.ProjInfo.FCS
Ionide.ProjInfo.ProjectSystem
FSharp.Analyzers.SDK
Newtonsoft.Json
#Fake.Runtime
ICSharpCode.Decompiler
Microsoft.SourceLink.GitHub
Dapper
Expand Down
6 changes: 0 additions & 6 deletions src/FsAutoComplete/CommandResponse.fs
Original file line number Diff line number Diff line change
Expand Up @@ -648,12 +648,6 @@ module CommandResponse =
{ Code = code
Errors = Array.map FSharpErrorInfo.OfFSharpError errors } }

// let fakeTargets (serialize : Serializer) (targets : FakeSupport.GetTargetsResult) =
// serialize targets

// let fakeRuntime (serialize : Serializer) (runtimePath : string) =
// serialize { Kind = "fakeRuntime"; Data = runtimePath }

let fsharpLiterate (serialize: Serializer) (content: string) =
serialize
{ Kind = "fsharpLiterate"
Expand Down
33 changes: 0 additions & 33 deletions src/FsAutoComplete/FsAutoComplete.Lsp.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2519,37 +2519,6 @@ type FSharpLspServer(state: State, lspClient: FSharpLspClient) =
|> async.Return
| Error e -> AsyncLspResult.internalError e


// member __.FakeTargets(p:FakeTargetsRequest) = async {
// logger.info (Log.setMessage "FakeTargets Request: {parms}" >> Log.addContextDestructured "parms" p )

// let! res = commands.FakeTargets (p.FileName |> Utils.normalizePath) (p.FakeContext)
// let res =
// match res with
// | CoreResponse.InfoRes msg | CoreResponse.ErrorRes msg ->
// LspResult.internalError msg
// | CoreResponse.Res (targets) ->
// { Content = CommandResponse.fakeTargets FsAutoComplete.JsonSerializer.writeJson targets }
// |> success

// return res
// }

// member __.FakeRuntimePath(p) = async {
// logger.info (Log.setMessage "FakeRuntimePath Request: {parms}" >> Log.addContextDestructured "parms" p )


// let! res = commands.FakeRuntime ()
// let res =
// match res with
// | CoreResponse.InfoRes msg | CoreResponse.ErrorRes msg ->
// LspResult.internalError msg
// | CoreResponse.Res (runtimePath) ->
// { Content = CommandResponse.fakeRuntime FsAutoComplete.JsonSerializer.writeJson runtimePath }
// |> success
// return res
// }

member __.LoadAnalyzers(path) =
async {
logger.info (
Expand Down Expand Up @@ -2757,8 +2726,6 @@ let startCore toolsPath stateStorageDir workspaceLoaderFactory =
|> Map.add "fsharp/loadAnalyzers" (serverRequestHandling (fun s p -> s.LoadAnalyzers(p)))
// |> Map.add "fsharp/fsharpLiterate" (serverRequestHandling (fun s p -> s.FSharpLiterate(p) ))
|> Map.add "fsharp/pipelineHint" (serverRequestHandling (fun s p -> s.FSharpPipelineHints(p)))
// |> Map.add "fake/listTargets" (serverRequestHandling (fun s p -> s.FakeTargets(p) ))
// |> Map.add "fake/runtimePath" (serverRequestHandling (fun s p -> s.FakeRuntimePath(p) ))
|> Map.add "fsproj/moveFileUp" (serverRequestHandling (fun s p -> s.FsProjMoveFileUp(p)))
|> Map.add "fsproj/moveFileDown" (serverRequestHandling (fun s p -> s.FsProjMoveFileDown(p)))
|> Map.add "fsproj/addFileAbove" (serverRequestHandling (fun s p -> s.FsProjAddFileAbove(p)))
Expand Down
2 changes: 0 additions & 2 deletions src/FsAutoComplete/LspHelpers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,6 @@ type WorkspacePeekRequest =

type DocumentationForSymbolReuqest = { XmlSig: string; Assembly: string }

// type FakeTargetsRequest = { FileName : string; FakeContext : FakeSupport.FakeContext; }

type HighlightingRequest =
{ TextDocument: TextDocumentIdentifier }

Expand Down
21 changes: 0 additions & 21 deletions test/FsAutoComplete.Tests.Lsp/ExtensionsTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -294,27 +294,6 @@ let formattingTests state =
"tests"
[ verifyFormatting "can replace entire content of file when formatting whole document" "endCharacter" ] ]

// let fakeInteropTests toolsPath =
// let serverStart = lazy (
// let folderPath = Path.Combine(__SOURCE_DIRECTORY__, "TestCases", "FakeInterop")
// let (server, events) = serverInitialize folderPath defaultConfigDto toolsPath
// let buildScript = "build.fsx"
// do waitForWorkspaceFinishedParsing events
// server, events, folderPath, buildScript
// )
// let serverTest f () = f serverStart.Value

// testList "fake integration" [
// testCase "can typecheck a fake script including uses of paket-delivered types" (serverTest (fun (server, events, rootPath, scriptName) ->
// server.TextDocumentDidOpen { TextDocument = loadDocument (Path.Combine(rootPath, scriptName)) } |> Async.Start

// match waitForParseResultsForFile scriptName events with
// | Ok () ->
// () // all good, no parsing/checking errors
// | Core.Result.Error errors ->
// failwithf "Errors while parsing script %s: %A" (Path.Combine(rootPath, scriptName)) errors
// ))
// ]

let analyzerTests state =
let server =
Expand Down
2 changes: 0 additions & 2 deletions test/FsAutoComplete.Tests.Lsp/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ let lspTests =
uriTests
//linterTests state
formattingTests state
// fake isn't updated to FCS 39, disabling tests until that's resolved
//fakeInteropTests toolsPath
analyzerTests state
signatureTests state
SignatureHelp.tests state
Expand Down
1 change: 0 additions & 1 deletion utils/local-proj-info.patch
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ index 09835df..6c4ec25 100644
-Ionide.ProjInfo.ProjectSystem
FSharp.Analyzers.SDK
Newtonsoft.Json
#Fake.Runtime
@@ -13,6 +10,5 @@ System.Configuration.ConfigurationManager
FSharp.UMX
FsToolkit.ErrorHandling
Expand Down