esy / esy

package.json workflow for native development with Reason/OCaml
http://esy.sh
Other
845 stars 93 forks source link

Inconsistent state despite removing `~/.esy`, `_esy`, `node_modules`, and `esy.lock` #1092

Open Mbodin opened 4 years ago

Mbodin commented 4 years ago

esy version: 0.6.4 Operating System: Ubuntu 18.04.4

Issue: I am working on this small repository: https://github.com/Mbodin/dune-bug/tree/91d1f7039685e9bb5777e19e2335f9f75284b797 After a lot of work with esy, I reached an inconsistent state. To solve the inconsistent state, I removed the folders ~/.esy, _esy, node_modules, and esy.lock. Unfortunately, esy then complained with the error message shown below. Is there another folder that I should have removed? 😕​

Package.json https://github.com/Mbodin/dune-bug/blob/91d1f7039685e9bb5777e19e2335f9f75284b797/package.json

Actual behavior:

$ esy
info esy 0.6.4 (using package.json)
info checking https://github.com/ocaml/opam-repository for updates...
info checking https://github.com/esy-ocaml/esy-opam-override for updates...
info resolving esy packages: done                         
esy: internal error, uncaught exception:
     (Failure
       "2 inconsistent state: found a package not in the cudf version map @opam/ocaml@opam:4.9.0")
     Raised at file "stdlib.ml", line 29, characters 17-33
     Called from file "esy-solve/Universe.re", line 468, characters 8-124
     Called from file "esy-solve/Universe.re", line 514, characters 25-46
     Called from file "list.ml", line 92, characters 20-23
     Called from file "esy-solve/Universe.re", line 532, characters 18-73
     Called from file "list.ml", line 121, characters 24-34
     Called from file "esy-solve/Universe.re", line 537, characters 6-17
     Called from file "list.ml", line 121, characters 24-34
     Called from file "esy-solve/Universe.re", line 669, characters 6-32
     Called from file "list.ml", line 110, characters 12-15
     Called from file "map.ml", line 295, characters 20-25
     Called from file "map.ml", line 295, characters 10-18
     Called from file "map.ml", line 295, characters 10-18
     Called from file "esy-solve/Universe.re", line 692, characters 2-107
     Called from file "esy-solve/Solver.re", line 636, characters 4-59
     Called from file "esy-solve/Solver.re", line 1028, characters 6-228
     Called from file "src/core/lwt.ml", line 1867, characters 23-26
     Re-raised at file "src/core/lwt.ml", line 2999, characters 20-29
     Called from file "src/unix/lwt_main.ml", line 26, characters 8-18
     Called from file "esy-lib/Cli.re", line 263, characters 9-28
     Called from file "cmdliner_term.ml", line 25, characters 19-24
     Called from file "cmdliner.ml", line 25, characters 27-34
     Called from file "cmdliner.ml", line 116, characters 32-39

Expected behavior: I would have expected that removing these folders would have made esy fresh as new.

andreypopp commented 4 years ago

Hi, this is not the bug with caching so removing any caches won't solve it. It's a bug with dependency solver. cc @zindel (as you've touched the solver code recently) any clues on that?

Mbodin commented 4 years ago

Thanks for the answer ☺

As an additional note, running the following commands did not change the behaviour:

$ sudo npm uninstall -g esy
$ sudo npm install -g esy@latest