Skip to content

Commit 7033bdf

Browse files
committed
Polish docs for the new fused repo
1 parent 0ccda23 commit 7033bdf

File tree

3 files changed

+38
-45
lines changed

3 files changed

+38
-45
lines changed

CONTRIBUTING.md

+17-6
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,30 @@ This repo happens to also contain a language-server usable by other editors. If
1010

1111
```
1212
.
13-
├── client // Language Client
13+
├── client // Language Client. VSCode UI
1414
│ └── src
1515
│ └── extension.ts // Language Client entry point
16+
├── analysis // Native binary powering hover, autocomplete, etc.
17+
│ ├── src
18+
│ └── run.exe // Dev-time analysis binary
1619
├── package.json // The extension manifest.
1720
└── server // Language Server
1821
├── src
1922
│ └── server.ts // Language Server entry point
20-
├── win32
21-
├── linux
22-
└── darwin // these 3 folders contain rescript-editor-support.exe
23+
└── analysis_binaries // Prod-time platform-specific analysis binaries
2324
```
2425

25-
## Run the Project
26+
## Install Dependencies
2627

27-
- Run `npm install` at the root. This will also install the necessary npm modules in both the `client` and `server` folders.
28+
- Run `npm install` at the root. This will also install the npm modules for both the `client` and `server` folders.
29+
- `opam switch 4.06.1`. OPAM [here](https://opam.ocaml.org). This is needed for the `analysis` folder, which is native code.
30+
31+
## Build & Run
32+
33+
- `npm run compile`. You don't need this if you're developing this repo in VSCode. The compilation happens automatically in the background.
34+
- `cd analysis && make`.
35+
36+
## Test
2837
- Open VS Code to this folder.
2938
- Switch to the Debug viewlet (command palette -> View: Show Run and Debug).
3039
- Select `Client + Server` from the drop down, launch it (green arrow):
@@ -40,6 +49,7 @@ This repo happens to also contain a language-server usable by other editors. If
4049
- When you make a change, Go to the same Debug viewlet's Call Stack panel and restart the client and the server:
4150

4251
<img width="359" alt="image" src="https://user-images.githubusercontent.com/1909539/97448639-19db0800-18ee-11eb-875a-d17cd1b141d1.png">
52+
- For the native analysis binary tests: `cd analysis && make test`.
4353

4454
### Change the Grammar
4555

@@ -157,5 +167,6 @@ Currently the release is vetted and done by @chenglou.
157167

158168
- Bump the version properly in `package.json` and lockfile and make a new commit.
159169
- Make sure @ryyppy is aware of your changes. He needs to sync them over to the vim plugin.
170+
- Download and unzip the 3 platforms' production binaries from the Github CI. Put them into `server/analysis_binaries`. Name them `darwin-run.exe`, `linux-run.exe` and `win32-run.exe`.
160171
- Use `vsce publish` to publish. Official VSCode guide [here](https://code.visualstudio.com/api/working-with-extensions/publishing-extension). Only @chenglou has the publishing rights right now.
161172
- Not done! Make a new manual release [here](https://github.com/rescript-lang/rescript-vscode/releases); use `vsce package` to package up a standalone `.vsix` plugin and attach it onto that new release. This is for folks who don't use the VSCode marketplace.

analysis/README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Analysis Binary
2+
3+
This subfolder builds a private command line binary used by the plugin to power a few functionalities such as jump to definition, hover and autocomplete.
4+
5+
The binary reads the `.cmt` and `.cmti` files and analyses them.
6+
7+
For installation & build instructions, see the main CONTRIBUTING.md.
8+
9+
## Overview
10+
11+
See main CONTRIBUTING.md's repo structure. Additionally, `examples/` is a convenience debugging repo. Check out `test.sh` (invoked through `make test`) to see the snapshots testing workflow stored in `tests/`.
12+
13+
## Usage
14+
15+
```sh
16+
run.exe --help
17+
```
18+
19+
## History
20+
21+
This project is based on a fork of [Reason Language Server](https://github.com/jaredly/reason-language-server).

analysis/Readme.md

-39
This file was deleted.

0 commit comments

Comments
 (0)