Kappa-Dev/KappaTools

Dune installs latest yojson; tools require yojson 1.7.0

Closed this issue · 4 comments

Trying to install the latest commit that's passing per the CI tasks (b4fd715), I get the following compilation error:

$ opam pin add kappa-library git+https://github.com/Kappa-Dev/KappaTools.git#b4fd71520d42cbcc052fa5d15e57f2371a8a7710
[...]
$ opam pin add kappa-binaries git+https://github.com/Kappa-Dev/KappaTools.git#b4fd71520d42cbcc052fa5d15e57f2371a8a7710
[...]
$ opam pin add kappa-agents git+https://github.com/Kappa-Dev/KappaTools.git#b4fd71520d42cbcc052fa5d15e57f2371a8a7710
[...]
$ opam pin add kappa-server git+https://github.com/Kappa-Dev/KappaTools.git#b4fd71520d42cbcc052fa5d15e57f2371a8a7710
[NOTE] Package kappa-server is currently pinned to git+https://github.com/Kappa-Dev/KappaTools.git (version 4.1~dev).
[kappa-server.4.1~dev] synchronised (git+https://github.com/Kappa-Dev/KappaTools.git#b4fd71520d42cbcc052fa5d15e57f2371a8a7710)
kappa-server is now pinned to git+https://github.com/Kappa-Dev/KappaTools.git#b4fd71520d42cbcc052fa5d15e57f2371a8a7710 (version 4.1~dev)

The following actions will be performed:
  ∗ install kappa-library  4.1~dev* [required by kappa-agents, kappa-binaries]
  ∗ install kappa-binaries 4.1~dev* [required by kappa-server]
  ∗ install kappa-agents   4.1~dev* [required by kappa-server]
  ∗ install kappa-server   4.1~dev*
===== ∗ 4 =====
Do you want to continue? [Y/n] y

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of kappa-library.4.1~dev failed at "dune build -p kappa-library -j 11".

#=== ERROR while compiling kappa-library.4.1~dev ==============================#
# context     2.1.2 | linux/x86_64 | ocaml.4.14.0 | pinned(git+https://github.com/Kappa-Dev/KappaTools.git#b4fd71520d42cbcc052fa5d15e57f2371a8a7710#b4fd7152)
# path        ~/.opam/default/.opam-switch/build/kappa-library.4.1~dev
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p kappa-library -j 11
# exit-code   1
# env-file    ~/.opam/log/kappa-library-2906-215c19.env
# output-file ~/.opam/log/kappa-library-2906-215c19.out
### output ###
# 11 | val write_to_channel: (Bi_outbuf.t -> 'a -> unit) -> out_channel -> 'a -> unit
# [...]
# Error: Unbound module Bi_outbuf
# (cd _build/default && /home/hmedina/.opam/default/bin/ocamlc.opt -w -40 -w @a -g -bin-annot -I core/dataStructures/.kappa_generic_toolset.objs/byte -I /home/hmedina/.opam/default/lib/camlp-streams -I /home/hmedina/.opam/default/lib/logs -I /home/hmedina/.opam/default/lib/result -I /home/hmedina/.opam/default/lib/seq -I /home/hmedina/.opam/default/lib/stdlib-shims -I /home/hmedina/.opam/defaul[...]
# File "core/dataStructures/nbr.mli", line 65, characters 14-25:
# 65 | val write_t : Bi_outbuf.t -> t -> unit
#                    ^^^^^^^^^^^
# Error: Unbound module Bi_outbuf
# (cd _build/default && /home/hmedina/.opam/default/bin/ocamlc.opt -w -40 -w @a -g -bin-annot -I core/dataStructures/.kappa_generic_toolset.objs/byte -I /home/hmedina/.opam/default/lib/camlp-streams -I /home/hmedina/.opam/default/lib/logs -I /home/hmedina/.opam/default/lib/result -I /home/hmedina/.opam/default/lib/seq -I /home/hmedina/.opam/default/lib/stdlib-shims -I /home/hmedina/.opam/defaul[...]
# File "core/dataStructures/locality.mli", line 44, characters 21-32:
# 44 | val write_position : Bi_outbuf.t -> position -> unit
#                           ^^^^^^^^^^^
# Error: Unbound module Bi_outbuf



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build kappa-library 4.1~dev
└─
╶─ No changes have been performed
[NOTE] Pinning command successful, but your installed packages may be out of sync.

Ubuntu 20.04

Why is this commit passing on the GitHub tasks, but failing for me?

Moreover, the Bi_outbuf call seem to request the biniou module, which is not declared in the core/dataStructures/dune file. Including it after the other libraries throws a litany of other type errors, apparently out of a mismatch between the Buffer.t and the Bi_outbuf.t types.

Is biniou a required package?

feret commented

Hi Hector,

Biniou used to be included in Json.
This is why it was not required.

Now the packages are separated.
I need to figure out out to fix this (this is not enough to change the dependences).
Either I replace Biniou element by simple buffers, or I have to implement many thing to rewrite the JsonUtil module to work with Biniou.

I will try.

Best.
Jérôme.

Hi Jerome, from YoJson's release log, the last release that still had biniou was 1.7.0; is there a way of telling Dune to use a specific library version? I'm not seeing that in the library stanza reference which seems very odd to me.

In any case, downgrading to yojson 1.7.0 via $ opam install "yojson<2.0", allowed the tools to compile.

Since this is an issue of dependency versioning, I'll update the issue's title to reflect this.