OCamlPro / ocaml-top

A simple cross-platform OCaml code editor built for top-level evaluation.
http://typerex.org/ocaml-top.html
GNU General Public License v3.0
64 stars 8 forks source link

"opam install ocaml-top" fail due to typing error #63

Closed MoiMagnus closed 6 years ago

MoiMagnus commented 6 years ago

I just update my ocaml version to 4.06.0, and I have this:

opam install ocaml-top The following actions will be performed: ∗ install ocaml-top 1.1.4 =-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [ocaml-top] Archive in cache =-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [ERROR] The compilation of ocaml-top failed at "jbuilder build -p ocaml-top". === ERROR while installing ocaml-top.1.1.4 =================================== opam-version 1.2.2 os linux command jbuilder build -p ocaml-top path /home/marc/.opam/4.06.0/build/ocaml-top.1.1.4 compiler 4.06.0 exit-code 1 env-file /home/marc/.opam/4.06.0/build/ocaml-top.1.1.4/ocaml-top-8936-1872ec.env stdout-file /home/marc/.opam/4.06.0/build/ocaml-top.1.1.4/ocaml-top-8936-1872ec.out stderr-file /home/marc/.opam/4.06.0/build/ocaml-top.1.1.4/ocaml-top-8936-1872ec.err stderr [...] ocamlc src/sigint_unix.o ocamlopt src/tools.{cmx,o} (exit 2) (cd _build/default && /home/marc/.opam/4.06.0/bin/ocamlopt.opt -w -40 -g -I /home/marc/.opam/4.06.0/lib/ocaml -I /home/marc/.opam/4.06.0/lib/ocaml/threads -no-alias-deps -I src -o src/tools.cmx -c -impl src/tools.ml) File "src/tools.ml", line 95, characters 18-31: Warning 3: deprecated: String.create Use Bytes.create instead. File "src/tools.ml", line 104, characters 16-17: Error: This expression has type string -> 'a but an expression was expected of type bytes -> 'b Type string is not compatible with type bytes =-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The following actions failed ∗ install ocaml-top 1.1.4 No changes have been performed

Reading the files, it seems that there is a Byte.to_string missing in "tool.ml".

MoiMagnus commented 6 years ago

I've checked, correcting few lines in "tool.ml" is not sufficient, the confusion byte/string is trough all the files of ocaml-top. I would be surprised if I'm the first to have this problem. It is probably due to one of the ocaml version between 4.02.0 and 4.06.0 breaking the compatibility string/bytes

vrotaru commented 6 years ago

This was fixed in master. You can clone the repo and do a

opam pin add .

in cloned repository, to install it

MoiMagnus commented 6 years ago

Thank you