Home My Page Projects Dose: library and tools
Summary Activity Tracker Lists SCM Files

[#20808] Incompatibility with OCaml 4.04.0+beta2

Date:
2016-09-16 12:38
Priority:
3
State:
Open
Submitted by:
Damien Doligez (doligez)
Assigned to:
Nobody (None)
Summary:
Incompatibility with OCaml 4.04.0+beta2

Detailed description
When trying to compile dose.3.4.2 (or any other version of dose or dose3 except
dose.3.1.2) with 4.04.0+beta2, I get:

File "algo/algo.cmx", line 1:
Error: The implementation (obtained by packing)
does not match the interface algo/algo.mli:
...
In module Defaultgraphs.SyntacticDependencyGraph.G:
Type declarations do not match:
type t =
Graph.Imperative.Digraph.ConcreteBidirectionalLabeled(Defaultgraphs.SyntacticDependencyGraph.PkgV)(Defaultgraphs.SyntacticDependencyGraph.PkgE).t
is not included in
type t =
Graph.Imperative.Digraph.ConcreteBidirectionalLabeled(PkgV)(PkgE).t


The error doesn't occur on OCaml 4.03.0.

Leo White has investigated the problem, and here's what he found:

> I've found the issue. The problem is that `dose` creates a pack
> using an interface that depends on `ocamlgraph`, but does not
> include `ocamlgraph` in the search path of the `-pack` command.
>
> Situations like this, where a transitive dependency is omitted
> from the search path are partially supported, so I've written a
> fix for the particular problem that this hit:
>
> https://github.com/ocaml/ocaml/pull/813
>
> The problem was not actually caused by GPR#708, it just happend
> to be revealed by it.
>
> But really the `dose` maintainers should fix their build system
> to not unnecessarily rely on such a fragile feature of the
> compiler.

We have not yet decided whether we will change the OCaml compiler by
merging GPR#813 (thus restoring compatibility) but in any case I would
suggest that you follow Leo's advice and fix the dose3 build to avoid
future problems.

-- Damien

No Comments Have Been Posted

No Changes Have Been Made to This Item