From 7f8f1250b5349e4bb51fe90ec40e8527c5bcccd8 Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Thu, 31 Jan 2019 14:52:59 +0100 Subject: [PATCH] Upgrade dependencies (jsoo in particular) * the issue with utf8 output in jsoo is now fixed * the linking options changed slightly in the newer version Also changes the Dockerfile to update the opam repository from upstream, as we need very recent versions of some packages. --- Dockerfile | 9 ++++--- learn-ocaml.opam | 10 ++------ learn-ocaml.opam.locked | 55 ++++++++++++++++++++++------------------- src/grader/dune | 4 +-- 4 files changed, 38 insertions(+), 40 deletions(-) diff --git a/Dockerfile b/Dockerfile index d06721ce5..4c25209cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ocaml/opam2:alpine-3.7-ocaml-4.05 as compilation +FROM ocaml/opam2:alpine-3.7 as compilation LABEL Description="learn-ocaml building" Vendor="OCamlPro" WORKDIR learn-ocaml @@ -8,9 +8,9 @@ RUN sudo chown -R opam:nogroup . ENV OPAMYES true RUN echo 'archive-mirrors: [ "https://opam.ocaml.org/cache" ]' >> ~/.opam/config +RUN opam repository set-url default http://opam.ocaml.org RUN opam switch 4.05 RUN echo 'pre-session-commands: ["sudo" "apk" "add" depexts]' >>~/.opam/config -RUN opam update RUN opam install . --deps-only --locked ADD static static @@ -19,11 +19,12 @@ ADD src src ADD scripts scripts ADD Makefile Makefile ADD demo-repository demo-repository -RUN echo "bytelink += [\"-custom\"]" >addflags.ocp +ADD dune-project dune-project +ADD dune dune RUN sudo chown -R opam:nogroup . ENV OPAMVERBOSE 1 -RUN opam install . --destdir /home/opam/install-prefix +RUN opam install . --destdir /home/opam/install-prefix --locked diff --git a/learn-ocaml.opam b/learn-ocaml.opam index 2db9dd5c2..57b068aa7 100644 --- a/learn-ocaml.opam +++ b/learn-ocaml.opam @@ -20,11 +20,11 @@ depends: [ "cohttp-lwt-unix" {>= "1.0.0"} "conf-git" "decompress" {= "0.8.1"} - "dune" {build & = "1.1.1"} + "dune" {build & >= "1.1.1"} "easy-format" {>= "1.3.0" } "ipaddr" {= "2.8.0" } "ezjsonm" - "js_of_ocaml" {>= "3.1.0" & < "3.3"} + "js_of_ocaml" {>= "3.3.0"} "js_of_ocaml-compiler" "js_of_ocaml-lwt" "js_of_ocaml-ppx" @@ -61,9 +61,3 @@ description: """ This contains the binaries forming the engine for the learn-ocaml platform, and the common files. A demo exercise repository is also provided as example. """ -pin-depends: [ - [ - "js_of_ocaml.3.2.0" - "git+https://github.com/AltGr/js_of_ocaml.git#fix-oc-utf8" - ] -] diff --git a/learn-ocaml.opam.locked b/learn-ocaml.opam.locked index 5d362b8ab..eacebe89b 100644 --- a/learn-ocaml.opam.locked +++ b/learn-ocaml.opam.locked @@ -14,43 +14,52 @@ homepage: "https://github.com/ocaml-sf/learn-ocaml" bug-reports: "https://github.com/ocaml-sf/learn-ocaml/issues" depends: [ "base" {= "v0.9.4"} - "base64" {= "2.2.0"} - "cmdliner" {= "1.0.2"} - "cohttp" {= "1.1.0"} - "cohttp-lwt-unix" {= "1.0.2"} + "base64" {= "2.3.0"} + "cmdliner" {= "1.0.3"} + "cohttp" {= "1.1.1"} + "cohttp-lwt" {= "1.1.1"} + "cohttp-lwt-unix" {= "1.2.0"} + "conduit" {= "1.3.0"} + "conduit-lwt" {= "1.3.0"} + "conduit-lwt-unix" {= "1.3.0"} "conf-git" {= "1.0"} "conf-libev" {= "4-11"} + "conf-openssl" {= "1"} + "cstruct" {= "3.3.0"} "decompress" {= "0.8.1"} - "dune" {= "1.1.1"} + "dune" {= "1.6.3"} "easy-format" {= "1.3.1"} - "ezjsonm" {= "0.5.0"} - "ipaddr" {= "2.8.0" } - "js_of_ocaml" {= "3.2.0"} - "js_of_ocaml-compiler" {= "3.2.1"} - "js_of_ocaml-lwt" {= "3.2.1"} - "js_of_ocaml-ppx" {= "3.2.0"} - "js_of_ocaml-toplevel" {= "3.2.0"} - "js_of_ocaml-tyxml" {= "3.2.0"} + "ezjsonm" {= "0.6.0"} + "ipaddr" {= "2.8.0"} + "js_of_ocaml" {= "3.3.0"} + "js_of_ocaml-compiler" {= "3.3.0"} + "js_of_ocaml-lwt" {= "3.3.0"} + "js_of_ocaml-ppx" {= "3.3.0"} + "js_of_ocaml-toplevel" {= "3.3.0"} + "js_of_ocaml-tyxml" {= "3.3.0"} + "jsonm" {= "1.0.1"} "lwt" {= "3.3.0"} "lwt_react" {= "1.1.1"} "lwt_ssl" {= "1.1.2"} - "magic-mime" {= "1.1.0"} - "markup" {= "0.7.6"} + "magic-mime" {= "1.1.1"} + "markup" {= "0.8.0"} "ocaml" {= "4.05.0"} "ocamlfind" {= "1.8.0"} "ocp-indent-nlfork" {= "1.5.3"} "ocp-ocamlres" {= "0.4"} "ocplib-json-typed" {= "0.6"} - "odoc" {build & = "1.3.0"} + "odoc" {= "1.3.0"} "omd" {= "1.3.1"} - "pprint" {= "20171003"} - "ppx_cstruct" {= "3.2.1"} + "pprint" {= "20180528"} + "ppx_cstruct" {= "3.3.0"} "ppx_tools" {= "5.0+4.05.0"} "react" {= "1.2.1"} "reactiveData" {= "0.2.1"} - "tyxml" {= "4.2.0"} + "ssl" {= "0.5.7"} + "tyxml" {= "4.3.0"} + "uri" {= "1.9.7"} "uutf" {= "1.0.1"} - "yojson" {= "1.4.1"} + "yojson" {= "1.5.0"} ] build: [ [make "static"] @@ -65,9 +74,3 @@ description: """ This contains the binaries forming the engine for the learn-ocaml platform, and the common files. A demo exercise repository is also provided as example. """ -pin-depends: [ - [ - "js_of_ocaml.3.2.0" - "git+https://github.com/AltGr/js_of_ocaml.git#fix-oc-utf8" - ] -] diff --git a/src/grader/dune b/src/grader/dune index b84137cae..c1d54fb7f 100644 --- a/src/grader/dune +++ b/src/grader/dune @@ -144,7 +144,7 @@ (modes byte) (libraries js_of_ocaml js_of_ocaml-lwt - js_of_ocaml.syntax + js_of_ocaml-ppx ezjsonm ocplib-json-typed.browser learnocaml_repository @@ -164,7 +164,7 @@ ezjsonm ocplib-json-typed.browser js_of_ocaml - js_of_ocaml.syntax + js_of_ocaml-ppx ocplib_i18n learnocaml_repository learnocaml_report