pkg: `dune pkg lock` raises a code error if you try to name a repository "upstream"
My dune-workspace:
(lang dune 3.15)
(lock_dir
(repositories upstream))
(repository
(name upstream)
(source "git+https://github.com/ocaml/opam-repository"))
Running dune pkg lock gives the error:
Internal error, please report upstream including the contents of _build/log.
Description:
("Map.of_list_exn", { key = "upstream" })
Raised at Stdune__Code_error.raise in file
"otherlibs/stdune/src/code_error.ml", line 10, characters 30-62
Called from Dune__exe__Lock.solve_lock_dir in file "bin/pkg/lock.ml", line
53, characters 4-39
Called from Fiber__Scheduler.exec in file "vendor/fiber/src/scheduler.ml",
line 76, characters 8-11
I must not crash. Uncertainty is the mind-killer. Exceptions are the
little-death that brings total obliteration. I will fully express my cases.
Execution will pass over me and through me. And when it has gone past, I
will unwind the stack along its path. Where the cases are handled there will
be nothing. Only I will remain.
I did notice that also when I wanted to override upstream. What I didn't understand is why during the solve dune is adding upstream and overlay when an user start declaring some repository in the dune-workspace ?
This should be changed to give a proper error message. Dune reserves two repository names at the moment
I did notice that also when I wanted to override
upstream. What I didn't understand is why during the solve dune is addingupstreamandoverlaywhen an user start declaring somerepositoryin the dune-workspace ?
My change was misleading me #10613 when testing it. Of course the config of repositories in dune-workspace overrides the default ones upstream and overlay.
This seems to have been fixed with #12548