diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f89dd241..56c63e62 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,9 +37,9 @@ jobs: ocaml-version: ${{ matrix.ocaml-version }} - run: opam pin add -n . - name: Packages - run: opam depext -yt cstruct cstruct-sexp cstruct-unix cstruct-lwt + run: opam depext -yt cstruct cstruct-sexp cstruct-unix cstruct-lwt ppx_cstruct - name: Build - run: opam install -t cstruct cstruct-sexp cstruct-unix cstruct-lwt + run: opam install -t cstruct cstruct-sexp cstruct-unix cstruct-lwt ppx_cstruct async: name: Async runs-on: ${{ matrix.operating-system }} diff --git a/CHANGES.md b/CHANGES.md index 8d5b2911..0ba0c32a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,12 @@ +v5.1.1 2019-11-23 +----------------- + +This is a point release to fix a regression in 5.1.0 +on compilers earlier than 4.07. + +The release also fixes the test suite and CI on compilers +greater than 4.07. + v5.1.0 2019-11-23 ----------------- diff --git a/ppx/dune b/ppx/dune index bd5d6d6f..bd28df65 100644 --- a/ppx/dune +++ b/ppx/dune @@ -3,7 +3,7 @@ (public_name ppx_cstruct) (kind ppx_rewriter) (wrapped false) - (ppx_runtime_libraries cstruct) + (ppx_runtime_libraries cstruct stdlib-shims) (preprocess (pps ppx_tools_versioned.metaquot_404)) (libraries sexplib ocaml-migrate-parsetree ppx_tools_versioned diff --git a/ppx_cstruct.opam b/ppx_cstruct.opam index 27502c3e..131d23f8 100644 --- a/ppx_cstruct.opam +++ b/ppx_cstruct.opam @@ -25,6 +25,7 @@ depends: [ "ppx_sexp_conv" {with-test} "sexplib" {>="v0.9.0"} "cstruct-sexp" {with-test} + "cppo" {with-test} "cstruct-unix" {with-test & =version} "stdlib-shims" ] diff --git a/ppx_test/errors/dune b/ppx_test/errors/dune index 7a0eb551..92314158 100644 --- a/ppx_test/errors/dune +++ b/ppx_test/errors/dune @@ -1,6 +1,8 @@ (executable (name pp) (modules pp) + (preprocess (action + (run %{bin:cppo} -V OCAML:%{ocaml_version} %{input-file}))) (libraries ppx_cstruct ocaml-migrate-parsetree)) diff --git a/ppx_test/errors/gen_tests.ml b/ppx_test/errors/gen_tests.ml index 65979bfe..ae972b6e 100644 --- a/ppx_test/errors/gen_tests.ml +++ b/ppx_test/errors/gen_tests.ml @@ -19,6 +19,7 @@ let output_stanzas name = let is_test = function | "pp.ml" -> false + | "pp.pp.ml" -> false | "gen_tests.ml" -> false | e -> Filename.check_suffix e ".ml" diff --git a/ppx_test/errors/pp.ml b/ppx_test/errors/pp.ml index b1c1c38c..d10d27b8 100644 --- a/ppx_test/errors/pp.ml +++ b/ppx_test/errors/pp.ml @@ -3,4 +3,8 @@ external sys_exit : int -> 'a = "caml_sys_exit" let () = at_exit (fun () -> sys_exit 0) +#if OCAML_VERSION >= (4,8,0) +let () = Clflags.(error_style := Some Short) +#endif + let () = Migrate_parsetree.Driver.run_main ()