5b50279851
The new version of ocplib-resto : - uses jbuilder ; - is functorized over `Json_encoding` rather than `Json_repr` ; - handles query parameters ; - handles HTTP methods (GET, POST, DELETE, PUT, PATCH) ; - replaces `custom_service` by a more generic trailer argument ; - replaces generic answer `(code, body)` by a more ad-hoc sum type (allowing distinct encoding for success and error) ; - includes a minimal HTTP-server based on Cohttp (includings CORS and media type negotiation). - adds a function `Directory.transparent_lookup` to lookup/call a service handler without serializing the various parameters (path, query, request body). As a first consequences in Tezos, this patch allows binary communication between the client and the node. This patch tries to be minimal inside the tezos source code and therefore it introduces a minimal compatibility layer in `RPC.ml`. This code should be removed as soon as possible.
30 lines
739 B
Bash
Executable File
30 lines
739 B
Bash
Executable File
#! /bin/sh
|
|
|
|
script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
|
|
src_dir="$(dirname "$script_dir")"
|
|
|
|
. "$script_dir/version.sh"
|
|
|
|
if [ "$(ocaml -vnum)" != "$ocaml_version" ]; then
|
|
echo ;
|
|
echo " Unexpected compiler version ($(ocaml -vnum))";
|
|
echo " You should use ocaml-$ocaml_version.";
|
|
echo ;
|
|
exit 1;
|
|
fi
|
|
|
|
set -e
|
|
set -x
|
|
|
|
opam pin --yes add --no-action --dev-repo sodium
|
|
opam pin --yes add --no-action --dev-repo ocp-ocamlres
|
|
opam pin --yes add --no-action --dev-repo ocplib-json-typed
|
|
## Force opam to take account of the new `tezos-deps.opam`
|
|
opam pin --yes remove tezos
|
|
opam pin --yes add --no-action tezos $src_dir
|
|
|
|
opam list --installed depext || opam install depext
|
|
opam depext tezos
|
|
|
|
opam install tezos --deps-only
|