Skip to content

Generate opam file and improve CONTRIBUTING.md #659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,21 @@ Thanks for your interest. Below is an informal spec of how the plugin's server c
## Install Dependencies

- Run `npm install` at the root. This will also install the npm modules for both the `client` and `server` folders.
- `opam switch 4.14.0` (if you haven't created the switch, do it). OPAM [here](https://opam.ocaml.org). This is needed for the `analysis` folder, which is native code.
- Optionally, you can `opam install ocamlformat` and format the `.ml` files in `analysis`.

## Analysis Binary

This is needed for the `analysis` folder, which is native code.

```sh
# If you haven't created the switch, do it. OPAM(https://opam.ocaml.org)
opam switch 4.14.0 # can also create local switch with opam switch create . 4.14.0

# Install dev dependencies from OPAM
opam install . --deps-only

# For IDE support, install the OCaml language server
opam install ocaml-lsp-server
```

## Build & Run

Expand Down
10 changes: 10 additions & 0 deletions analysis/dune-project
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
(lang dune 2.0)

(generate_opam_files true)

(authors "Cristiano Calcagno")

(maintainers "Cristiano Calcagno")

(homepage "https://github.com/rescript-lang/rescript-vscode")

(bug_reports "https://github.com/rescript-lang/rescript-vscode/issues")

(package
(name rescript-vscode)
(synopsis "ReScript vscode support")
Expand Down
27 changes: 27 additions & 0 deletions analysis/rescript-vscode.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "ReScript vscode support"
maintainer: ["Cristiano Calcagno"]
authors: ["Cristiano Calcagno"]
homepage: "https://github.com/rescript-lang/rescript-vscode"
bug-reports: "https://github.com/rescript-lang/rescript-vscode/issues"
depends: [
"ocaml" {>= "4.10"}
"ocamlformat" {= "0.22.4"}
"reanalyze" {= "2.23.0"}
"dune"
]
build: [
["dune" "subst"] {pinned}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]