fsprojects / fsprojects/FSharpLint

Create an API layer for external process (eg: FsAutoComplete)

Open
#627 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
F#
Stars
327
Forks
74
PR merge metrics
No merged PRs in 30d

Description

Description

Today, there is no more integration with ionide F# plugin (through FsAutoComplete).
With the current implementation (FSAC directly referencing FSharpLint.Core), it means both FSharpLint & FSAC must share the same version of FSharp.Compiler.Service.

As discussed in https://github.com/fsharp/FsAutoComplete/issues/942, an alternative solution could be to implement a API layer between FSharpLint.Core & FSAC, so FSharp.Compiler.Service could be abstracted using dedicated types (same solution that Fantomas is using)

To summarize the integration with FSAC this new API :

sequenceDiagram
    box green FsAutoComplete process
    participant FsAutoComplete
    participant FSharpLint.Client
    end
    box blue FSharpLint process
    participant FSharpLint.Console
    end
    FsAutoComplete->>FSharpLint.Client: GetDaemon
    FSharpLint.Client->>FSharpLint.Console: Start Daemon
    FSharpLint.Console-->>FSharpLint.Client: 
    FSharpLint.Client->FSharpLint.Console: Setup jsonrpc
    FSharpLint.Console-->>FSharpLint.Client: 
    FSharpLint.Client-->>FsAutoComplete: 
    Note over FsAutoComplete,FSharpLint.Client: Later, when a lint is needed
    FsAutoComplete->>FSharpLint.Client: LintRequest
    FSharpLint.Client->>FSharpLint.Console: LintRequest
    FSharpLint.Console->>FSharpLint.Console: Lint with FSharp.Compiler.Service
    FSharpLint.Console-->>FSharpLint.Client: LintResponse<br/>(no FSharp.Compiler.Service types here)
    FSharpLint.Client-->>FsAutoComplete: LintResponse
TODO:

I would like a confirmation that this feature is ok for you guys and I'm willing to work on it

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the proposed FSharpLint.Client layer and the existing FSharpLint.Core Application/Lint.fsi lintFile entry point. The work is complete when the Client project exposes version and lint methods, can communicate with the Console without FSharp.Compiler.Service types, and is included in the build and released as a NuGet package.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
api, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.