ocaml-top
ocaml-top copied to clipboard
Is it possible to install ocaml-top with recent ocaml compilers as stated in opam file?
It's not possible to install ocaml-top.1.1.5 with ocaml.4.14.0:
$ opam install ocaml-top
[ERROR] Package conflict!
* No agreement on the version of ocaml:
- (invariant) → ocaml-base-compiler = 4.14.0 → ocaml = 4.14.0
- ocaml-top → ocaml < 4.02.4
>>> You can temporarily relax the switch invariant with `--update-invariant' <<<
* No agreement on the version of ocaml-base-compiler:
- (invariant) → ocaml-base-compiler = 4.14.0
- ocaml-top → ocaml < 4.02.4 → ocaml-base-compiler < 3.07+1
* Missing dependency:
- ocaml-top → ocp-build < 1.99.8-beta
no matching version
* Missing dependency:
- ocaml-top → ocaml < 4.02.4 → ocaml-variants → ocaml-beta
unmet availability conditions: 'enable-ocaml-beta-repository'
No solution found, exiting
While opam file seems fine (ocaml 4.02.0 or newer):
(...)
depends "ocaml" {>= "4.02.0"}
"jbuilder" {>= "1.0+beta7"}
"ocp-pp" {build}
"lablgtk" {>= "2.16.0"}
"conf-gtksourceview" {= "2"}
"ocp-indent" {>= "1.4.0"}
"ocp-index" {>= "1.0.0"}
Using suggested --update-invariant forces to downgrade to ocaml.4.10.2 which is not what I want:
$ opam install ocaml-top --update-invariant
The following actions will be performed:
∗ install conf-gtk2 1 [required by lablgtk]
∗ install conf-gtksourceview 2 [required by ocaml-top]
↘ downgrade ocaml-base-compiler 4.14.0 to 4.10.2 [required by ocaml]
↘ downgrade ocaml-config 2 to 1 [required by ocaml]
↘ downgrade ocaml 4.14.0 to 4.10.2 [required by ocaml-top]
∗ install ocp-pp 1.99.19-beta [required by ocaml-top]
∗ install jbuilder 1.0+beta20.2 [required by ocaml-top]
...
∗ install camlp-streams 5.0.1 [required by lablgtk]
...
∗ install lablgtk 2.18.13 [required by ocaml-top]
...
∗ install ocp-index 1.3.4 [required by ocaml-top]
...
↘ downgrade pcre 7.5.0 to 7.4.6 [uses ocaml]
...
∗ install ocaml-top 1.1.5
How to fix that? Is it an ocaml-top issue or an opam issue (because opam says the contrary of what is in the opam file : "< 4.02.4")? Thanks.
ocaml.4.10.0
$ opam install ocaml-top
(...)
#=== ERROR while compiling ocaml-top.1.1.5 ====================================#
# context 2.1.4 | linux/x86_64 | ocaml-base-compiler.4.10.0 | https://opam.ocaml.org#6e9750a9
# path ~/.opam/4.10.0/.opam-switch/build/ocaml-top.1.1.5
# command ~/.opam/opam-init/hooks/sandbox.sh build jbuilder build -p ocaml-top
# exit-code 1
# env-file ~/.opam/log/ocaml-top-473751-d2718a.env
# output-file ~/.opam/log/ocaml-top-473751-d2718a.out
### output ###
# [...]
# 206 | let s = Pervasives.input_line ic in
# ^^^^^^^^^^^^^^^^^^^^^
# Alert deprecated: module Stdlib.Pervasives
# Use Stdlib instead.
#
# If you need to stay compatible with OCaml < 4.07, you can use the
# stdlib-shims library: https://github.com/ocaml/stdlib-shims
# File "src/completion.ml", line 231, characters 21-26:
# 231 | setup_completion index buf view
# ^^^^^
# Error: This expression has type qualify:bool -> LibIndex.t
# but an expression was expected of type LibIndex.t
Same error with ocaml.4.09.1 and 4.08.1 .
Finally, it (still) works with 4.07.1:
$ opam install ocaml-top
[NOTE] Package ocaml-top is already installed (current version is 1.1.5).
The programmer should find the cause of that type error.
?
If you don't want people to use your software with recent compilers, what do you think about removing it from the opam repository?...
I don't know why but ocaml-top now launches with Ocaml 4.14.1 .
It looks like version 1.2.0 (Feb 9, 2023) fixed the trouble, isn't it ? Thanks.