Skip to content

Commit 4890db4

Browse files
zthaspeddro
andauthored
Touch ups to LSP and Tools packages (#830)
* name changes and other touch ups * add sample zero cost variant version of docgen representation * Polish: LSP and Tools package (#833) * update ci, readme and contributing.md * fix * add Cli.resi and rescript.json * fixes * restore some changes --------- Co-authored-by: Pedro Castro <[email protected]>
1 parent 65c25b0 commit 4890db4

17 files changed

+106
-55
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ Analysis bin is what we currently call the OCaml code that does deeper language
192192

193193
We're happy to gather more resources over time here, including more in-depth getting started guides.
194194

195-
## Release
195+
## Releasing the VSCode extension and standalone LSP package
196+
197+
_This below will automatically release the LSP package as well._
196198

197199
1. Bump the version to an _even minor_ version number in `package.json` and `server/package.json` and their lockfiles. It's very important that it's an even minor like `1.8.0`, and not `1.7.0`. This is because even minors are reserved for actual releases, and uneven minors for pre-releases. Commit and push the version bump.
198200
2. Make sure @ryyppy is aware of your changes. He needs to sync them over to the vim plugin.
@@ -208,4 +210,8 @@ If that somehow does not work, you can do the above steps manually:
208210
2. Go to the appropriate [VSCode Marketplace Publisher](https://marketplace.visualstudio.com/manage/publishers/chenglou92), select the three dots next to the extension name, and choose `Update`. Upload your `.vsix` there.
209211
3. Not done! Make a new manual release [here](https://github.com/rescript-lang/rescript-vscode/releases), and make sure you attach the generated `.vsix` onto that new release as well. This is for folks who don't use the VSCode marketplace.
210212

211-
For beta releases, ask folks to try the `.vsix` from CI directly.
213+
For beta releases, ask folks to use the pre-release version installable from the VSCode Marketplace.
214+
215+
## Releasing the `@rescript/tools` package
216+
217+
The tools package is released by bumping the version in `tools/package.json`, running `npm i` in the `tools/` folder, and then pushing those changes with the commit message `publish tools`.

README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -176,16 +176,6 @@ A screenshot of the result:
176176

177177
![Shows the end result in VSCode, with ReScript related files nested under eachother appropriately.](https://user-images.githubusercontent.com/1457626/168123647-400e2f09-31e3-45a2-b74b-190c7c207446.png)
178178

179-
## ⌨️ Use with Other Editors
180-
181-
This repo also contains a language server that can power other editors. **However, the language server in this project is a pure implementation detail. We don't guarantee its stability for other editors' consumption** apart from Vim and Sublime Text.
182-
183-
Still, if you'd like to use this language-server with other editors:
184-
185-
- Get the release binaries from the Github Releases page.
186-
- Unzip the `.vsix` and get the `server` folder. That's the only folder you need.
187-
- The language server will be at `server/out/server.js`. Call it through node, and optionally pass `--stdio` if your editor doesn't support the default JSONRPC.
188-
189179
## 📰 Changelog
190180

191181
See [CHANGELOG](CHANGELOG.md)

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "0.0.0",
55
"description": "ReScript's language-client",
66
"keywords": [],
7-
"author": "chenglou",
7+
"author": "ReScript Team",
88
"license": "MIT",
99
"dependencies": {
1010
"vscode-languageclient": "8.1.0-next.5"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "rescript-vscode",
33
"displayName": "ReScript",
44
"description": "ReScript language support (official)",
5-
"author": "chenglou",
5+
"author": "ReScript Team",
66
"license": "MIT",
77
"version": "1.20.0",
88
"repository": {

server/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ resciptls --stdio
1515
```sh
1616
ReScript Language Server
1717

18-
Usage: rescriptls [options]
18+
Usage: rescript-ls [options]
1919

2020
Options:
2121

server/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"name": "@rescript/lsp",
33
"description": "LSP server for ReScript",
44
"version": "1.20.0",
5-
"author": "chenglou",
5+
"author": "ReScript Team",
66
"license": "MIT",
77
"bin": {
8-
"rescriptls": "./out/cli.js"
8+
"rescript-ls": "./out/cli.js"
99
},
1010
"keywords": [
1111
"ReScript",

server/src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const args = process.argv.slice(2)
66

77
const help = `ReScript Language Server
88
9-
Usage: rescriptls [options]
9+
Usage: rescript-ls [options]
1010
1111
Options:
1212

tools/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ npm install --save-dev @rescript/tools
99
## CLI Usage
1010

1111
```sh
12-
restools --help
12+
rescript-tools --help
1313
```
1414

1515
### Generate documentation
1616

1717
Print JSON:
1818

1919
```sh
20-
restools doc src/EntryPointLibFile.res
20+
rescript-tools doc src/EntryPointLibFile.res
2121
```
2222

2323
Write JSON:
2424

2525
```sh
26-
restools doc src/EntryPointLibFile.res > doc.json
26+
rescript-tools doc src/EntryPointLibFile.res > doc.json
2727
```
2828

2929
### Reanalyze
3030

3131
```sh
32-
restools reanalyze --help
32+
rescript-tools reanalyze --help
3333
```
3434

3535
## Decode JSON

tools/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)