Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compatibility with ppx_sexp_conv > v0.11.0 #381

Merged
merged 1 commit into from
Aug 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions myocamlbuild.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
open Ocamlbuild_plugin

let runtime_deps_of_ppx ppx =
(Findlib.query "ppx_sexp_conv").dependencies
|> List.filter_opt (fun { Findlib.name; _ } ->
if name = ppx || name = "ppx_deriving" then
None
else
Some name)

let () = dispatch (function
| After_rules ->
let meta = "pkg/META" in
let meta_in = meta ^ ".in" in
rule meta ~dep:meta_in ~prod:meta (fun _ _ ->
let deps = String.concat " " (runtime_deps_of_ppx "ppx_sexp_conv") in
Echo([String.subst "PPX_SEXP_CONV_RUNTIME" deps
(Pathname.read meta_in)],
meta))
| _ -> ())
3 changes: 2 additions & 1 deletion opam
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ depends: [
"ocamlfind" {build}
"ocamlbuild" {build}
"topkg" {build}
"ppx_sexp_conv" {build & < "v0.11.0"}
"ppx_sexp_conv"
"ppx_deriving" {build}
"ppx_cstruct" {build & >= "3.0.0"}
"result"
Expand All @@ -48,6 +48,7 @@ conflicts: [
"mirage-net-xen" {<"1.3.0"}
"mirage-types" {<"3.0.0"}
"sexplib" {= "v0.9.0"}
"ppx_sexp_conv" {= "v0.11.0"}
"ptime" {< "0.8.1"}
]

Expand Down
2 changes: 1 addition & 1 deletion pkg/META → pkg/META.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version = "%%VERSION_NUM%%"
description = "Transport layer security (TLS 1.x) purely in OCaml"
requires = "cstruct sexplib result nocrypto x509"
requires = "cstruct sexplib result nocrypto x509 PPX_SEXP_CONV_RUNTIME"
archive(byte) = "tls.cma"
plugin(byte) = "tls.cma"
archive(native) = "tls.cmxa"
Expand Down