Alt-Ergo 2.5.2 doesn't compile with `Dune 3.13`
Halbaroth opened this issue · comments
Last week, I noticed that Alt-Ergo 2.5.2
cannot be installed on Marvin with opam
anymore.
It was a fresh installation (the switch was completely new), so I guessed the issue comes from one of the dependencies of Alt-Ergo
.
I didn't find a way to produce any valuable logs with Dune
but I got the same bug on my laptop this afternoon so I started a long bisection with opam
and dune
.
My first guess was correct: the issue comes from the last version of Dune
. It seems this combination of rules produces a deadlock somewhere in Dune 3.13
but everything is fine with older versions:
(executable
(name Main_text)
(public_name alt-ergo)
(package alt-ergo)
(libraries alt_ergo_common)
(link_flags (:include flags.dune))
(modules Main_text)
(promote (until-clean)))
(rule
(target alt-ergo.1)
(action (with-stdout-to %{target} (run alt-ergo --help=groff))))
(install
(files alt-ergo.1)
(section man)
(package alt-ergo))
If I removes the rules to generate and install the manpage, Alt-Ergo
compiles. I believe dune
is stuck in a deadlock.
To solve this issue I have several options:
- For the release
2.5.2
, we can amend the package onopam-repository
to add an upper bound for thedune
version. - We can remove the rule completely. Honestly, no one cares about the man page as we get a similar result with
alt-ergo --help
and I'm not fond of runningAlt-Ergo
while installing it.
It seems the compilation works if we specify the dependency:
(rule
(deps (:bin Main_text.exe))
(target alt-ergo.1)
(action (with-stdout-to %{target} (run %{bin} --help=groff))))
I don't know if it's a bug of Dune
. I open an issue ocaml/dune#9944 for it.
The rule for alt-ergo.1
indeed seems incorrect (although it is a bug in dune
that it gets stuck on it) as it doesn't declare its dependencies — it should be:
(rule
(target alt-ergo.1)
(action (with-stdout-to %{target} (run %{bin:alt-ergo} --help=groff))))
I think that is the patch that should go on opam-repository
for release 2.5.2 (we could also release a version 2.5.3 that fixes the build, which the maintainers of opam-repository
may prefer, not sure).
Re: building the man pages, this is very standard for dune packages, see e.g. opam doing the same thing. Man pages are a standard way to access this information, we shouldn't remove them.
Good news, the very last release of Dune
solved the issue. It means that users can run into this bug only if they have the constraint dune <= 3.13.0
in some packages of their switches.
I think we should publish a release 2.5.3
to be sure everyone can install it.
Ah, so this comment was correct. If only dune 3.13.0 is affected, I don't think we need to do a release — the likelihood of anyone having dune <= 3.13.0
as a dependency is fairly low (and it is a bogus dependency specification anyways).
Ok :)