Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg: dune pkg lock raises a code error if you try to name a repository "upstream" #10605

Open
gridbugs opened this issue Jun 4, 2024 · 3 comments

Comments

@gridbugs
Copy link
Collaborator

gridbugs commented Jun 4, 2024

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.
@moyodiallo
Copy link
Collaborator

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 ?

@rgrinberg
Copy link
Member

This should be changed to give a proper error message. Dune reserves two repository names at the moment

@moyodiallo
Copy link
Collaborator

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 ?

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.

moyodiallo added a commit to moyodiallo/dune that referenced this issue Jun 10, 2024
Signed-off-by: Alpha DIALLO <moyodiallo@gmail.com>
@moyodiallo moyodiallo added the bug label Jun 10, 2024
moyodiallo added a commit to moyodiallo/dune that referenced this issue Jun 11, 2024
Signed-off-by: Alpha DIALLO <moyodiallo@gmail.com>
moyodiallo added a commit to moyodiallo/dune that referenced this issue Jun 11, 2024
Signed-off-by: Alpha DIALLO <moyodiallo@gmail.com>
moyodiallo added a commit to moyodiallo/dune that referenced this issue Jun 13, 2024
Signed-off-by: Alpha DIALLO <moyodiallo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants