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: add repro for gh11265 #11266

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions test/blackbox-tests/test-cases/pkg/gh11265.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Package conflicts are ignored when dune-projects contains multiple conflicts

$ . ./helpers.sh
$ mkrepo
$ mkpkg bar

A package which depends on a single package and also conflicts with the same package:
$ solve_project << EOF
> (lang dune 3.11)
> (package
> (name foo)
> (allow_empty)
> (depends bar)
> (conflicts bar))
> EOF
Error: Unable to solve dependencies for the following lock directories:
Lock directory dune.lock:
Couldn't solve the package dependency formula.
Selected candidates: foo.dev
- bar -> (problem)
foo dev requires conflict with all versions
Rejected candidates:
bar.0.0.1: Incompatible with restriction: conflict with all versions
[1]

Now add an additional conflict on a non-existant package "baz". Dune will choose the package "bar" despite it being a conflict:
$ solve_project << EOF
> (lang dune 3.11)
> (package
> (name foo)
> (allow_empty)
> (depends bar)
> (conflicts bar baz))
> EOF
Solution for dune.lock:
- bar.0.0.1

Loading