From ef762ffdd273b841bdf4e516f7d33f7e98077fe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Ch=C3=A1varri?= Date: Sun, 24 Sep 2023 11:15:14 +0200 Subject: [PATCH] Melange 2 and OCaml 5 (#24) * update opam * update opam and code to latest * update version on ci * remove pins --- .github/workflows/build-sample-project.yml | 2 +- Makefile | 7 +++---- melange-opam-template.opam | 14 +++++++------- src/dune | 2 +- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-sample-project.yml b/.github/workflows/build-sample-project.yml index 90cc6ca..319d2d7 100644 --- a/.github/workflows/build-sample-project.yml +++ b/.github/workflows/build-sample-project.yml @@ -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 }} diff --git a/Makefile b/Makefile index 426f7fc..4086179 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/melange-opam-template.opam b/melange-opam-template.opam index e91db81..fa5abd4 100644 --- a/melange-opam-template.opam +++ b/melange-opam-template.opam @@ -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" diff --git a/src/dune b/src/dune index 1fc73b4..b0d54d6 100644 --- a/src/dune +++ b/src/dune @@ -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