Skip to content

Commit

Permalink
Melange 2 and OCaml 5 (#24)
Browse files Browse the repository at this point in the history
* update opam

* update opam and code to latest

* update version on ci

* remove pins
  • Loading branch information
jchavarri authored Sep 24, 2023
1 parent ea8eb4b commit ef762ff
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-sample-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- ubuntu-latest
# - windows-latest # for some reason windows build is not picking dune 3.5
ocaml-compiler:
- 5.1.0
- 5.1.x

fail-fast: false
runs-on: ${{ matrix.system }}
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@ help: ## Print this help message

.PHONY: create-switch
create-switch: ## Create opam switch
opam switch create . 5.1.0 --deps-only -y
opam switch create . 5.1.0 -y --deps-only

.PHONY: init
init: create-switch install ## Configure everything to develop this repository in local

.PHONY: install
install: ## Install development dependencies
npm install --legacy-peer-deps
npm install
opam update
opam install -y . --deps-only
opam pin -y add $(project_name).dev .
opam install -y . --deps-only --with-test
opam exec opam-check-npm-deps

.PHONY: build
Expand Down
14 changes: 7 additions & 7 deletions melange-opam-template.opam
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ homepage: "https://github.com/your/project"
bug-reports: "https://github.com/your/project/issues"
depends: [
"ocaml" {>= "5.1.0"}
"reason" {>= "3.9.0" & < "3.10.0"}
"reason" {>= "3.10.0"}
"dune" {>= "3.8"}
"melange" {>= "1.0.0" & < "2.0.0"}
"reason-react-ppx" {>= "0.12.0" & < "0.13.0"}
"reason-react" {>= "0.12.0"}
"opam-check-npm-deps" {dev} # todo: use with-dev-setup once 2.2 is out
"ocaml-lsp-server" {dev}
"dot-merlin-reader" {dev}
"melange" {>= "2.0.0"}
"reason-react" {>= "0.13.0"}
"reason-react-ppx"
"opam-check-npm-deps" {with-test} # todo: use with-dev-setup once opam 2.2 is out
"ocaml-lsp-server" {with-test} # todo: use with-dev-setup once opam 2.2 is out
"dot-merlin-reader" {with-test} # todo: use with-dev-setup once opam 2.2 is out
"odoc" {with-doc}
]
dev-repo: "git+https://github.com/your/project.git"
2 changes: 1 addition & 1 deletion src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(libraries reason-react world)
(modules :standard \ hello)
(preprocess
(pps reason-react-ppx))
(pps melange.ppx reason-react-ppx))
(module_systems es6))

(melange.emit
Expand Down

0 comments on commit ef762ff

Please sign in to comment.