diff --git a/benchs/benchs.ml b/benchs/benchs.ml index a37efa84..ba519e6b 100644 --- a/benchs/benchs.ml +++ b/benchs/benchs.ml @@ -577,7 +577,7 @@ module Nested = struct done *) - let[@inline] int64_as_varint = varint + let int64_as_varint = varint let int_as_varint i e = (varint[@inlined]) (Int64.of_int i) e diff --git a/dune b/dune index a4c65f08..0bcf1ad1 100644 --- a/dune +++ b/dune @@ -1,4 +1,4 @@ (env (_ - (flags -bin-annot -annot -safe-string - -keep-locs -no-alias-deps -w A-4-42-41-48))) + (flags -bin-annot -annot -safe-string -strict-sequence + -keep-locs -no-alias-deps -w A-4-42-41-48-70))) diff --git a/dune-project b/dune-project index a15213d9..f364fd12 100644 --- a/dune-project +++ b/dune-project @@ -1,3 +1,3 @@ -(lang dune 1.11) +(lang dune 2.0) (name ocaml-protoc) (allow_approximate_merlin) diff --git a/ocaml-protoc.opam b/ocaml-protoc.opam index e418e057..75346cb4 100644 --- a/ocaml-protoc.opam +++ b/ocaml-protoc.opam @@ -4,6 +4,9 @@ version: "2.1" synopsis: "Protobuf compiler for OCaml" description: "Protobuf compiler for OCaml" maintainer: "Maxime Ransan " +post-messages: [ +"The runtime library is now called \"pbrt\"." +] authors:[ "Maxime Ransan " ] @@ -19,7 +22,8 @@ build: [ ] depends: [ "ocaml" {>="4.03.0"} - "dune" {>="1.11"} + "dune" {>="2.0"} "stdlib-shims" + "pbrt" {= version} "odoc" {with-doc} ] diff --git a/pbrt.opam b/pbrt.opam new file mode 100644 index 00000000..389d450f --- /dev/null +++ b/pbrt.opam @@ -0,0 +1,31 @@ +opam-version: "2.0" +name: "pbrt" +version: "2.1" +synopsis: "Runtime library for Protobuf tooling" +description: "Runtime library for Protobuf tooling" +maintainer: "Maxime Ransan " +post-messages: [ +"Pbrt: runtime library for ocaml-protoc. + +A shim library named \"ocaml-protoc\" still exists, to ease the +migration." +] +authors:[ + "Maxime Ransan " +] +homepage: "https://github.com/mransan/ocaml-protoc" +bug-reports:"https://github.com/mransan/ocaml-protoc/issues" +dev-repo:"git+https://github.com/mransan/ocaml-protoc.git" +license: "MIT" +build: [ + ["dune" "subst"] {dev} + ["dune" "build" "@install" "-p" name "-j" jobs] + ["dune" "runtest" "-p" name "-j" jobs] {with-test} + ["dune" "build" "@doc" "-p" name "-j" jobs] {with-doc} +] +depends: [ + "ocaml" {>="4.03.0"} + "dune" {>="1.11"} + "stdlib-shims" + "odoc" {with-doc} +] diff --git a/src/ocaml-protoc/dune b/src/ocaml-protoc/dune index a6d78d9f..ac14d63a 100644 --- a/src/ocaml-protoc/dune +++ b/src/ocaml-protoc/dune @@ -1,10 +1,18 @@ -(executable +(executable (name ocaml_protoc) (public_name ocaml-protoc) - (modules + (package ocaml-protoc) + (modules ocaml_protoc ocaml_protoc_cmdline - ocaml_protoc_compilation - ocaml_protoc_generation) + ocaml_protoc_compilation + ocaml_protoc_generation) (libraries compiler_lib) ) + +(library + (synopsis "Shim to depend on pbrt") + (name ocaml_protoc) + (public_name ocaml-protoc) + (modules) + (libraries (re_export pbrt))) diff --git a/src/runtime/dune b/src/runtime/dune index 95003b6a..82b7aa0c 100644 --- a/src/runtime/dune +++ b/src/runtime/dune @@ -1,8 +1,6 @@ (library (name pbrt) - (public_name ocaml-protoc) + (public_name pbrt) ; we need to increase -inline, so that the varint encoder/decoder can ; be remembered by the inliner. - (ocamlopt_flags :standard -inline 100) - (wrapped false) -) + (ocamlopt_flags :standard -inline 100))