fsprojects / fsprojects/FSharpLint
Create an API layer for external process (eg: FsAutoComplete)
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:
- Create the lib layer (Add FSharpLint.Client project) (#637)
- Expose a
versionmethod for the Client/Console flow (#637) - Setup the build process to release FSharpLint.Client as a new nuget (#637)
- Expose a
lintmethod (that will call val lintFile : optionalParams:OptionalLintParameters -> filePath:string -> LintResult method) (#663)
I would like a confirmation that this feature is ok for you guys and I'm willing to work on it
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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