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

ERROR while compiling ocaml-top.1.1.5 (ocaml 4.10.0 or 4.09.1) #75

Open MdeLv opened 2 years ago

MdeLv commented 2 years ago

debian 11 ocaml.4.10.0 or 4.09.1

ocaml.4.10.0: a simple 'opam update --upgrade' broke the installed and working ocaml-top. ocaml.4.09.1: a 'opam install ocaml-top' returned the same compilation error.

ocaml [ERROR] The compilation of ocaml-top failed at "/home/test/.opam/opam-init/hooks/sandbox.sh build jbuilder build -p ocaml-top".

#=== ERROR while compiling ocaml-top.1.1.5 ====================================#
# context     2.0.7 | linux/x86_64 | ocaml-base-compiler.4.09.1 | https://opam.ocaml.org#ac0ed9ef
# path        ~/.opam/4.09.1/.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-26984-5d2f01.env
# output-file ~/.opam/log/ocaml-top-26984-5d2f01.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

ocaml.4.14.0

$ opam install ocaml-top
The following dependencies couldn't be met:
  - ocaml-top → ocaml < 4.06.0
      base of this switch (use `--unlock-base' to force)
  - ocaml-top → ocp-build (< 1.99.8-beta | < 1.99.8-beta)
      no matching version
  - ocaml-top → ocp-pp → typerex-build → ocaml < 4.05.0
      base of this switch (use `--unlock-base' to force)
  - ocaml-top → ocp-pp → ocaml < 4.11
      base of this switch (use `--unlock-base' to force)
$ cat ocaml-top.opam #1.15
opam-version: "1.2"
version: "1.1.5"
maintainer: "contact@ocamlpro.com"
tags: [ "org:ocamlpro" "gui" "teaching" "toplevel" ]
authors: "Louis Gesbert <louis.gesbert@ocamlpro.com>"
homepage: "http://www.typerex.org/ocaml-top.html"
dev-repo: "https://github.com/OCamlPro/ocaml-top.git"
bug-reports: "https://github.com/OCamlPro/ocaml-top/issues"
license: "GPL-3"
available: [ ocaml-version >= "4.02.0" ]
build: ["jbuilder" "build" "-p" name]
depends: [
  "jbuilder"
  "ocp-pp"
  "lablgtk" {>= "2.16.0"}
  "conf-gtksourceview" {= "2"}
  "ocp-indent" {>= "1.4.0"}
  "ocp-index" {>= "1.0.0"}

Where does that "- ocaml-top → ocaml < 4.06.0" come from?...

Is there a quick and simple way to fix or to workaround that? Thanks.