leanprover / leanprover/vscode-lean4

RFC: do not use `_serverProcess` in leanclient.

Open
#487 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
313
Forks
104
Avg merge
1h 56m
Merged PRs (30d)
1

Description

Consider the following lines of code:

https://github.com/leanprover/vscode-lean4/blob/cee53169b58d31a03a60c4769ee827a3cabffd7c/vscode-lean4/src/leanclient.ts#L264C1-L274C11

;(this.client as any)._serverProcess.stderr.on('data', async (chunk: Buffer) => {
  ...
})

When adapting the extension to monaco, we are replacing vscode's LanguageClient (link to source) with the MonacoLanguageClient (link to source) which does not have _serverProcess, so we basically delete the marked code snippet.

As (this.client as any)._serverProcess seems like quite a hack already (i.e. _serverProcess is marked private), I thought I'd mark this here. Maybe there is a better way to do this that would work in both cases?

Contributor guide

No contributing guide indexed for this repository

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 in vscode-lean4/src/leanclient.ts at lines 264-274, then compare the referenced VS Code LanguageClient and MonacoLanguageClient APIs. Determine how stderr handling can work without relying on the private _serverProcess field, and verify that the resulting approach supports the stated Monaco adaptation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.