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

dune pkg lock fails when pinned repo has a tag with the same name as a branch #11113

Open
huwaireb opened this issue Nov 11, 2024 · 1 comment

Comments

@huwaireb
Copy link

Expected Behavior

Running dune pkg lock succeeds.

Actual Behavior

Instead, it fails with the following

Internal error, please report upstream including the contents of _build/log.
Description:
  ("Map.of_list_exn", { key = "v0.9.5.0" })
Raised at Stdune__Code_error.raise in file
  "otherlibs/stdune/src/code_error.ml", line 10, characters 30-62
Called from Dune_pkg__Rev_store.remote.(fun).f.(fun) in file
  "src/dune_pkg/rev_store.ml", line 793, characters 26-66
Called from Fiber__Core.O.(>>|).(fun) in file "vendor/fiber/src/core.ml",
  line 253, characters 36-41
Called from Fiber__Scheduler.exec in file "vendor/fiber/src/scheduler.ml",
  line 76, characters 8-11
Re-raised at Stdune__Exn.raise_with_backtrace in file
  "otherlibs/stdune/src/exn.ml" (inlined), line 38, characters 27-56
Called from Stdune__Exn_with_backtrace.reraise in file
  "otherlibs/stdune/src/exn_with_backtrace.ml", line 20, characters 33-71
Called from Fiber__Scheduler.exec in file "vendor/fiber/src/scheduler.ml",
  line 76, characters 8-11
Re-raised at Stdune__Exn.raise_with_backtrace in file
  "otherlibs/stdune/src/exn.ml" (inlined), line 38, characters 27-56
Called from Stdune__Exn_with_backtrace.reraise in file
  "otherlibs/stdune/src/exn_with_backtrace.ml", line 20, characters 33-71
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.

Reproduction

(pin
 (url "git+https://github.com/FStarLang/FStar.git")
 (package
  (name fstar)))

(package (name repro) (depends fstar))

Specifications

  • Version of dune (output of dune --version): n/a, off head, commit f7af2d0
  • Version of ocaml (output of ocamlc --version): 4.14.2
  • Operating system (distribution and version): MacOS Sequoia 15.0.1

Additional information

Contents of _build/log

# dune pkg lock
# OCAMLPARAM: unset
# Shared cache: enabled
# Shared cache location: /Users/rmu/.cache/dune/db
# Workspace root: /Users/rmu/Projects/ae.dev71/yap/implementation
# Auto-detected concurrency: 12
$ /nix/store/4axvrmlyszz77x66am0damj6pz4jh683-coreutils-9.5/bin/uname -m > /tmp/dune_e70ac3_output
$ /nix/store/4axvrmlyszz77x66am0damj6pz4jh683-coreutils-9.5/bin/uname -s > /tmp/dune_13a133_output
$ /usr/bin/sw_vers -productVersion > /tmp/dune_ca7e7b_output
$ /nix/store/h75ikbc9x19sqjaqljkigfa95qms4mi7-ocaml-4.14.2/bin/ocamlc -vnum > /tmp/dune_dd769a_output
$ (cd /Users/rmu/.cache/dune/git-repo && /etc/profiles/per-user/rmu/bin/git ls-remote https://github.com/ocaml-dune/opam-overlays.git) > /tmp/dune_25f023_output
$ (cd /Users/rmu/.cache/dune/git-repo && /etc/profiles/per-user/rmu/bin/git cat-file -e 9bad4501e6dd4feb7b61b48d29812241d1d711f9)
$ (cd /Users/rmu/.cache/dune/git-repo && /etc/profiles/per-user/rmu/bin/git ls-tree -z --long -r 9bad4501e6dd4feb7b61b48d29812241d1d711f9) > /tmp/dune_68e8fe_output
$ (cd /Users/rmu/.cache/dune/git-repo && /etc/profiles/per-user/rmu/bin/git cat-file -e 9bad4501e6dd4feb7b61b48d29812241d1d711f9:.gitmodules)
[128]
$ (cd /Users/rmu/.cache/dune/git-repo && /etc/profiles/per-user/rmu/bin/git ls-remote https://github.com/ocaml/opam-repository.git) > /tmp/dune_c12960_output
$ (cd /Users/rmu/.cache/dune/git-repo && /etc/profiles/per-user/rmu/bin/git cat-file -e f2ad0ff0828e004becfa81125abd41bc53e42d56)
$ (cd /Users/rmu/.cache/dune/git-repo && /etc/profiles/per-user/rmu/bin/git ls-tree -z --long -r f2ad0ff0828e004becfa81125abd41bc53e42d56) > /tmp/dune_a5a1b8_output
$ (cd /Users/rmu/.cache/dune/git-repo && /etc/profiles/per-user/rmu/bin/git cat-file -e f2ad0ff0828e004becfa81125abd41bc53e42d56:.gitmodules)
[128]
$ (cd /Users/rmu/.cache/dune/git-repo && /etc/profiles/per-user/rmu/bin/git ls-remote https://github.com/FStarLang/FStar.git) > /tmp/dune_b219e1_output
Leonidas-from-XIV added a commit to Leonidas-from-XIV/dune that referenced this issue Nov 13, 2024
Building the FStar repo fails because the branch and tag are named the
same, as reported in ocaml#11113.

This simplifies the setup into a test-case.

Signed-off-by: Marek Kubica <[email protected]>
@Leonidas-from-XIV
Copy link
Collaborator

Leonidas-from-XIV commented Nov 13, 2024

Thanks for the report! I've looked into this and the issue is not the size of ls-remote but the fact that the repo has a tag that is the same as the name of a branch (v0.9.5.0). I'll update the title of the issue accordingly.

I've created a repro case in #11120.

@Leonidas-from-XIV Leonidas-from-XIV changed the title Large ls-remote outputs result in an Internal Error when calling dune pkg lock. dune pkg lock fails when pinned repo has a tag with the same name as a branch Nov 13, 2024
Leonidas-from-XIV added a commit to Leonidas-from-XIV/dune that referenced this issue Nov 13, 2024
Building the FStar repo fails because the branch and tag are named the
same, as reported in ocaml#11113.

This simplifies the setup into a test-case.

Signed-off-by: Marek Kubica <[email protected]>
Leonidas-from-XIV added a commit to Leonidas-from-XIV/dune that referenced this issue Nov 13, 2024
Building the FStar repo fails because the branch and tag are named the
same, as reported in ocaml#11113.

This simplifies the setup into a test-case.

Signed-off-by: Marek Kubica <[email protected]>
Leonidas-from-XIV added a commit that referenced this issue Nov 13, 2024
Building the FStar repo fails because the branch and tag are named the
same, as reported in #11113.

This simplifies the setup into a test-case.

Signed-off-by: Marek Kubica <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants