diff --git a/.travis.yml b/.travis.yml index f7284e2..40c905c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ env: global: - PACKAGE="uri" - POST_INSTALL_HOOK="opam --yes depext -yui react ssl lwt" + - PINS="uri-sexp:." - REVDEPS="cohttp git github irmin syndic" matrix: - DISTRO=centos OCAML_VERSION=4.04 diff --git a/CHANGES.md b/CHANGES.md index 56cc80c..10c2355 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +v2.2.1 - +-------- + +* Move `Uri_sexp` to its own package `uri-sexp`. (#134 @Julow) + v2.2.0 2019-01-31 ----------------- diff --git a/README.md b/README.md index 8426bd9..6cd0539 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Once installed, there are three ocamlfind packages available for your use: - `uri` - the base `Uri` module - `uri.top` - the toplevel printers for use with [utop](https://github.com/diml/utop) -- `uri.sexp` - provides converters to and from s-expressions (via a `Uri_sexp.t` type alias) +- `uri-sexp` - provides converters to and from s-expressions (via a `Uri_sexp.t` type alias) - `uri.services` - the `Uri_services` module that provides the equivalent of *[services(5)](http://man7.org/linux/man-pages/man5/services.5.html)* - `uri.services_full` - the `Uri_services_full` module that provides a complete copy of the `/etc/services` file. This is quite large and normally not needed. diff --git a/lib/dune b/lib/dune index 2df9c5b..04d27dc 100644 --- a/lib/dune +++ b/lib/dune @@ -1,19 +1,19 @@ (library - (name uri) - (public_name uri) - (wrapped (transition "Please switch to using Uri.Re instead of Uri_re")) - (modules uri uri_re) - (libraries re.posix stringext)) + (name uri) + (public_name uri) + (wrapped (transition "Please switch to using Uri.Re instead of Uri_re")) + (modules uri uri_re) + (libraries re.posix stringext)) (library - (name uri_sexp) - (public_name uri.sexp) - (modules uri_sexp) - (preprocess (pps ppx_sexp_conv)) - (libraries sexplib0 uri)) + (name uri_sexp) + (public_name uri-sexp) + (modules uri_sexp) + (preprocess (pps ppx_sexp_conv)) + (libraries sexplib0 uri)) (library - (name uri_top) - (public_name uri.top) - (modules uri_top) - (libraries uri compiler-libs)) + (name uri_top) + (public_name uri.top) + (modules uri_top) + (libraries uri compiler-libs)) diff --git a/lib/uri.ml b/lib/uri.ml index dcd58a3..3c2f013 100644 --- a/lib/uri.ml +++ b/lib/uri.ml @@ -599,12 +599,12 @@ let of_string s = * into a Pct.encoded and return an optional type (None if * the component is not present in the Uri *) let get_opt_encoded s n = - try Some (Pct.cast_encoded (Re.get s n)) + try Some (Pct.cast_encoded (Re.Group.get s n)) with Not_found -> None in let get_opt s n = try - let pct = Pct.cast_encoded (Re.get s n) in + let pct = Pct.cast_encoded (Re.Group.get s n) in Some (Pct.decode pct) with Not_found -> None in diff --git a/lib_test/dune b/lib_test/dune index eefbb64..9cbceba 100644 --- a/lib_test/dune +++ b/lib_test/dune @@ -1,6 +1,10 @@ (executables (names test_runner) - (libraries uri uri.sexp uri_services oUnit sexplib0)) + (modules test_runner uri_sexp) + (preprocess (pps ppx_sexp_conv)) + (libraries uri uri_services oUnit sexplib0)) + +(rule (copy# ../lib/uri_sexp.ml uri_sexp.ml)) (alias (name runtest) diff --git a/uri-sexp.opam b/uri-sexp.opam new file mode 100644 index 0000000..8ea08b2 --- /dev/null +++ b/uri-sexp.opam @@ -0,0 +1,24 @@ +opam-version: "2.0" +maintainer: "anil@recoil.org" +authors: ["Anil Madhavapeddy" "David Sheets" "Rudi Grinberg"] +license: "ISC" +tags: ["url" "uri" "org:mirage" "org:xapi-project"] +homepage: "https://github.com/mirage/ocaml-uri" +bug-reports: "https://github.com/mirage/ocaml-uri/issues" +dev-repo: "git+https://github.com/mirage/ocaml-uri.git" +doc: "https://mirage.github.io/ocaml-uri/" +synopsis: "An RFC3986 URI/URL parsing library" +description: """ +ocaml-uri with sexp support +""" +depends: [ + "uri" + "dune" {build & >= "1.2.0"} + "ppx_sexp_conv" {build & >= "v0.9.0"} + "sexplib0" +] +build: [ + ["dune" "subst"] {pinned} + ["dune" "build" "-p" name "-j" jobs] + ["dune" "runtest" "-p" name "-j" jobs] {with-test} +] diff --git a/uri.opam b/uri.opam index d71a7c6..ad22d91 100644 --- a/uri.opam +++ b/uri.opam @@ -16,9 +16,8 @@ depends: [ "ocaml" {>= "4.04.0"} "dune" {build & >= "1.2.0"} "ounit" {with-test & >= "1.0.2"} - "ppx_sexp_conv" {build & >= "v0.9.0"} + "ppx_sexp_conv" {with-test & >= "v0.9.0"} "re" {>= "1.7.2"} - "sexplib0" "stringext" {>= "1.4.0"} ] build: [