Skip to content

Commit aac3d84

Browse files
authored
pkg: repro for gh10670 (#10672)
Signed-off-by: Stephen Sherratt <[email protected]>
1 parent d9acb93 commit aac3d84

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Reproduces https://github.com/ocaml/dune/issues/10670
2+
3+
Dune solves packages with "post" set to false, so the disjunction in
4+
ocaml-base-compiler's dependencies can't be resolved on non-windows
5+
systems.
6+
7+
$ . ./helpers.sh
8+
$ mkrepo
9+
10+
$ cat >dune-workspace << EOF
11+
> (lang dune 3.16)
12+
> (lock_dir
13+
> (path dune.lock)
14+
> (repositories mock)
15+
> (solver_env
16+
> (os linux)))
17+
> EOF
18+
19+
$ mkpkg host-system-other
20+
21+
$ mkpkg system-mingw << EOF
22+
> available: os = "win32"
23+
> EOF
24+
25+
$ mkpkg ocaml-base-compiler << EOF
26+
> depends: [
27+
> (("arch-x86_64" {os = "win32" & arch = "x86_64"} & "system-mingw" &
28+
> "mingw-w64-shims" {os-distribution = "cygwin" & build}) |
29+
> ("arch-x86_32" {os = "win32"} & "ocaml-option-bytecode-only" &
30+
> "system-mingw" &
31+
> "mingw-w64-shims" {os-distribution = "cygwin" & build}) |
32+
> "host-system-other" {os != "win32" & post})
33+
> ]
34+
> EOF
35+
36+
$ solve ocaml-base-compiler
37+
Error: Unable to solve dependencies for the following lock directories:
38+
Lock directory dune.lock:
39+
Can't find all required versions.
40+
Selected: ocaml-base-compiler.0.0.1 x.dev system-mingw
41+
- system-mingw -> (problem)
42+
No usable implementations:
43+
system-mingw.0.0.1: Availability condition not satisfied
44+
[1]

0 commit comments

Comments
 (0)