Open readyready15728 opened 2 years ago
ADDENDUM: I tried forcing 4.12.1 too in the two .opam
files then tossing out the .locked
files before another attempt at compiling the switch. No dice. I tried 4.12.2 once again and here's what happened:
<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
Switch invariant: ["ocaml" {>= "4.05.0"}]
[ERROR] Could not determine which packages to install for this switch:
* Missing dependency:
- ocaml = 4.12.2
no matching version
Switch initialisation failed: clean up? ('n' will leave the switch partially installed) [Y/n] Y
ADDENDUM 2: I'm trying the previously described attempted fix with "ocaml" {>= "4.12"}
and it has succeeded. Not sure if that is what is desired though.
Hi @readyready15728, sorry for late reply, and thanks a lot for your thourough bug report!
My understanding is that:
4.12.*
indeed, see this line:
learn-ocaml.opam.locked
, by definition of the locked feature, one can only enforce one version of each specified dependency, so, only one point release.cf. the line you had spotted:
As a result:
opam switch create . --deps-only --locked
with opam switch create . --deps-only
(without --locked
)--locked
if the switch does not exist at all (and thereby, no conflicting ocaml), but to remove --locked
if the switch already contains something…documentation
task;ocaml
4.12 :)As of now, I have no idea about any of that my good dude. I'm just someone working through the CS3110 course from Cornell. Just glad I unearthed the error and made a little progress towards solving it.
This is an opam error, not a learn-ocaml issue. The ocaml
package is only a virtual package depending on one of ocaml-base-compiler
, ocaml-system
, etc. ; here it seems you have ocaml-variants.4.12.1+trunk
getting installed which is wrong, you want ocaml-base-compiler
. Please check your opam version, run opam update
to make sure package definitions are up-to-date, try again and report to ocaml/opam-repository if the issue persists.
Bug description
Pretty self-explanatory, doesn't compile because of a slightly wrong OCaml version.
To reproduce
Steps to reproduce the behavior:
git clone
the repo.opam switch create . --deps-only --locked
.Expected behavior
For the switch to compile.
Optional screenshots
I'd prefer to give you text which is probably easier to work with and will do so below.
Current configuration
CHANGELOG.md
says version 0.13.1.Additional context
Here is probably the "meat":
There's a little afterwards which I'll include as well:
I noticed there are logs too although the
.out
file doesn't tell me anything that you haven't already seen re: the version mismatch. I'll give you the.env
stuff though:eval (opam env)
sans dollar sign is correct because I'm using fish FWIW. I wish I could offer more detail including steps towards the fix but I'm obviously just a learner. I attempted monkeying around with some of the opam configuration files attempting to force the slightly newer OCaml version rather than what appears to specifying "any 4.12 version" but that ended up going nowhere. Sorry about that.