Open maxRN opened 2 days ago
It used to work before with the same configuration, I just upgraded the nightly dune. After some investigation, the regressions started appearing in version nightly-2024-10-22.
Output of dune --version
:
"Dune Developer Preview: build 2024-10-22T02:16:49Z, git revision
bd29b159396e41b256deec430ae08cbf5b70ce77"
Thanks for reporting! :+1: Do you have a pointer to the project you are trying to build or a reproducible step to get the error?
This looks like a regression caused by #11022. Can you post your depopts so we can build a reproduction case?
As a short-term fix, you need to simplify the optional dependencies, to be only a list of packages that don't use &
.
I can take a look since I introduced the issue.
Here's a link to a reproduction repository: https://github.com/maxrn/dune-pkg-repro
Just simplified the example, cohttp-unix-lwt seems to be causing problems.
EDIT: Minimal dune-project
file:
(lang dune 3.17)
(name pkg_repro)
(package
(name pkg_repro)
(synopsis "A short synopsis")
(description "A longer description")
(depends
cohttp-lwt-unix
))
Thanks. Do you mind repro'ing with dune in main? This PR should improve the error message.
Internal error, please report upstream including the contents of _build/log.
Description:
("invalid depopts",
{ depopts =
Or
[ Or [ Atom ("tls-lwt", Empty); Atom ("lwt_ssl", Empty) ]
; Atom ("launchd", Empty)
]
})
Raised at Stdune__Code_error.raise in file
"otherlibs/stdune/src/code_error.ml", line 10, characters 30-62
Called from Dune_pkg__Opam_solver.resolve_depopts in file
"src/dune_pkg/opam_solver.ml", line 565, characters 3-21
Called from Dune_pkg__Opam_solver.opam_package_to_lock_file_pkg in file
"src/dune_pkg/opam_solver.ml", line 645, characters 6-48
Called from Stdlib__List.rev_map.rmap_f in file "list.ml", line 105,
characters 22-25
Called from Stdune__List.map in file "otherlibs/stdune/src/list.ml"
(inlined), line 5, characters 19-33
Called from Dune_pkg__Opam_solver.solve_lock_dir.(fun) in file
"src/dune_pkg/opam_solver.ml", line 856, characters 8-277
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.
with latest dune nightly
"Dune Developer Preview: build 2024-11-01T02:24:10Z, git revision
3ac95e5f1dfa4738faa197330a64555bbaec5421"
Let me know if you need the _build/log
as well.
Expected Behavior
dune doesn't crash and the lock dir is generated.
Actual Behavior
dune crashes.
Reproduction
Output of
_build/log
https://gist.github.com/maxRN/27b87ae926eece0f98c54780547bd6eb
Specifications
Version of
dune
(output ofdune --version
):"Dune Developer Preview: build 2024-10-30T02:16:37Z, git revision d84d83a4becd373549757d907ba4e4d5434c5e0f"
Version of
ocaml
(output ofocamlc --version
): nonenothing
Operating system (distribution and version): MacOS Sonoma 15.1
Additional information
I'm using the dune developer preview.
dune
with the--verbose
flag): https://gist.github.com/maxRN/397e812820c48daf518a579c321d6ed1