From 77d40df594d11b7db17920c067c43cc92d6d93d9 Mon Sep 17 00:00:00 2001 From: Marshall Roch Date: Tue, 9 Jul 2019 11:48:21 -0400 Subject: [PATCH] finish conversion to dune, upgraded to opam 2.0 --- .gitignore | 1 + CHANGES.md | 6 +++--- CONTRIBUTING.md | 21 +++++++++++---------- dune-project | 2 ++ ppx_gen_rec.opam | 21 +++++++++++++-------- src/dune | 6 ++++++ src/jbuild | 12 ------------ 7 files changed, 36 insertions(+), 33 deletions(-) create mode 100644 dune-project create mode 100644 src/dune delete mode 100644 src/jbuild diff --git a/.gitignore b/.gitignore index 1b69d9c..9012564 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ _build/ *.native *.byte *.install +*.swp diff --git a/CHANGES.md b/CHANGES.md index 26ef3a2..797930b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,8 @@ -v1.1.0 2019-04-04 +v1.1.0 2019-07-09 ----------------- -Set the ocaml-migrate-parsetree priority to -10, so as to run before ppx_deriving -Switch from jbuilder to dune +- Set the ocaml-migrate-parsetree priority to -10, so as to run before ppx_deriving +- Switch from jbuilder to dune v1.0.0 2018-07-06 ----------------- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 648ba22..7655671 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,13 +36,14 @@ licensed under the LICENSE file in the root directory of this source tree. ## Release Process -1. Install `topkg-care`: `opam install topkg-care topkg-jbuilder` -2. Review the changes since last version: `topkg status` -3. Write the release notes: `topkg log edit` -4. Commit the release notes: `topkg log commit` -5. Run some sanity checks: `topkg lint` -6. Tag the distribution with a version: `topkg tag` -7. Create the distribution archive: `topkg distrib` -8. Upload the archive to GitHub: `topkg publish distrib` -9. Create an opam package: `topkg opam pkg` -10. Submit it to OCaml's opam repository: `topkg opam submit` +1. Install `dune-release`: `opam install dune-release` +2. Update `CHANGES.md`, being careful to follow the existing format +3. Commit `CHANGES.md` +4. Run some sanity checks: `dune-release lint` +5. Tag the distribution with a version: `dune-release tag` +6. Create the distribution archive: `dune-release distrib` +7. Upload the archive to GitHub: `dune-release publish distrib` +8. Create an opam package: `dune-release opam pkg` +9. Submit it to OCaml's opam repository: `dune-release opam submit` + +For more details, see `dune-release help release`. diff --git a/dune-project b/dune-project new file mode 100644 index 0000000..d816d52 --- /dev/null +++ b/dune-project @@ -0,0 +1,2 @@ +(lang dune 1.0) +(name ppx_gen_rec) diff --git a/ppx_gen_rec.opam b/ppx_gen_rec.opam index ba8b91f..dd868e4 100644 --- a/ppx_gen_rec.opam +++ b/ppx_gen_rec.opam @@ -1,14 +1,19 @@ -opam-version: "1.2" +opam-version: "2.0" maintainer: "Marshall Roch " authors: ["Marshall Roch "] -homepage: "https://github.com/flowtype/ocaml-ppx_gen_rec" -doc: "https://github.com/flowtype/ocaml-ppx_gen_rec" license: "MIT" -dev-repo: "https://github.com/flowtype/ocaml-ppx_gen_rec.git" +homepage: "https://github.com/flowtype/ocaml-ppx_gen_rec" bug-reports: "https://github.com/flowtype/ocaml-ppx_gen_rec/issues" -depends: -[ +depends: [ + "ocaml" "dune" {build} - "ocaml-migrate-parsetree" { >= "1.1.0" } + "ocaml-migrate-parsetree" {>= "1.1.0"} ] -build: [["dune" "build" "-p" name "-j" jobs]] +build: ["dune" "build" "-p" name "-j" jobs] +dev-repo: "git+https://github.com/flowtype/ocaml-ppx_gen_rec.git" +synopsis: "A ppx rewriter that transforms a recursive module expression into a `struct`" +description: """ +In a recursive module expression, the struct can be derived from the signature automatically +by the compiler. This package does the same thing, but doing it this way allows ppx_deriving +to transform the signature and struct separately. +""" diff --git a/src/dune b/src/dune new file mode 100644 index 0000000..0e2e09e --- /dev/null +++ b/src/dune @@ -0,0 +1,6 @@ +(library + (name ppx_gen_rec) + (public_name ppx_gen_rec) + (kind ppx_rewriter) + (libraries compiler-libs.common ocaml-migrate-parsetree) + (preprocess no_preprocessing)) diff --git a/src/jbuild b/src/jbuild deleted file mode 100644 index 297aad5..0000000 --- a/src/jbuild +++ /dev/null @@ -1,12 +0,0 @@ -(library ( - (name ppx_gen_rec) - (public_name ppx_gen_rec) - (kind ppx_rewriter) - (libraries ( - compiler-libs.common - ocaml-migrate-parsetree - )) - (preprocess no_preprocessing) -)) - -(jbuild_version 1)