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

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

Open
4 tasks
MrLuje opened this issue Dec 10, 2023 · 1 comment
Open
4 tasks

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

MrLuje opened this issue Dec 10, 2023 · 1 comment

Comments

@MrLuje
Copy link

MrLuje commented Dec 10, 2023

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 ionide/FsAutoComplete#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
Loading

TODO:

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

@knocte
Copy link
Collaborator

knocte commented Dec 12, 2023

Hello @MrLuje! Yes, this would be very useful so that, if we lag behind again about updating to the last versions of FCS, the last version of the IDEs can still use FSharpLint.

So please go ahead and work on this, we will happily accept PRs. (Side note: we're probably going to merge some work soon that updates FSharpLint to the latest version of FCS; but regardless of that, and as I said above already, your work will still be valuable anyway; only thing to take in account is that if we merge our PRs before yours, you might need to rebase your work.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants