rescript-lang / rescript-lang/rescript-vscode

Refactor wish list

Open
#1,094 4 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
ReScript
Stars
354
Forks
63
Avg merge
11h 29m
Merged PRs (30d)
1

Description

As mentioned here, it would be great to refactor the extension and LSP server. Here are some ideas to consider; please feel free to raise other points or challenge any listed:

  • Use promises in the LSP server, as many endpoints spin a binary or read files.
  • Refactor incrementalCompilation.ts and implement an interface to handle the differences between bsb and rewatch, as those checks are scattered throughout the code.
  • Utilise semver for more version checks.
  • Enable more logging in the output window; see https://github.com/rescript-lang/rescript-vscode/pull/1066. Wink @zth.
  • Employ a formatter (e.g., prettier/biome), as our lack of it is quite annoying.
  • Remove chokidar from the LSP server and use the [DidChangeWatchedFiles Notification] instead.
  • Bump the TypeScript version, as we likely have an outdated one.
  • Consider removing ESBuild; do we still need to bundle?
  • Should we implement the mono-repo structure properly? Currently, we have three package.json files, and the top one lacks a workspaces entry.
  • Use yarn as we do in rescript compiler?
  • Update CONTRIBUTING.md, as it may no longer be accurate.
  • switch from TextDocumentSyncKind.Full to TextDocumentSyncKind.Incremental

Let me know your thoughts, @zth, @cometkim, @mediremi!

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 reading the LSP server entry points and incrementalCompilation.ts, then review the discussion in PR 1092 and the logging changes in PR 1066. CONTRIBUTING.md is also listed for review. Done requires a narrowly scoped, agreed refactor rather than completing this entire wishlist.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.