Skip to content

Commit 4358c74

Browse files
authored
Don't solve for windows by default with portable lockdirs (#12654)
Dune package management doesn't work on windows yet, so exclude windows from the set of platforms we solve for by default with portable lockdirs. Signed-off-by: Stephen Sherratt <[email protected]>
1 parent 1fb4eca commit 4358c74

10 files changed

+4
-25
lines changed

src/dune_pkg/solver_env.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ let popular_platform_envs =
175175
; make ~os:"linux" ~arch:(Some "arm64") ~os_distribution:None ~os_family:None ()
176176
; make ~os:"macos" ~arch:(Some "x86_64") ~os_distribution:None ~os_family:None ()
177177
; make ~os:"macos" ~arch:(Some "arm64") ~os_distribution:None ~os_family:None ()
178-
; make ~os:"win32" ~arch:(Some "x86_64") ~os_distribution:None ~os_family:None ()
179178
]
180179
;;
181180

test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-basic.t

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ Create a package that writes a different value to some files depending on the os
4141
- arch = arm64; os = linux
4242
- arch = x86_64; os = macos
4343
- arch = arm64; os = macos
44-
- arch = x86_64; os = win32
4544

4645
Dependencies on all supported platforms:
4746
- foo.0.0.1
@@ -63,9 +62,7 @@ Create a package that writes a different value to some files depending on the os
6362
((arch x86_64)
6463
(os macos))
6564
((arch arm64)
66-
(os macos))
67-
((arch x86_64)
68-
(os win32)))
65+
(os macos)))
6966

7067
$ cat ${default_lock_dir}/foo.0.0.1.pkg
7168
(version 0.0.1)
@@ -99,13 +96,7 @@ Create a package that writes a different value to some files depending on the os
9996
(run mkdir -p %{share} %{lib}/%{pkg-self:name})
10097
(run touch %{lib}/%{pkg-self:name}/META)
10198
(run sh -c "echo Darwin > %{share}/kernel")
102-
(run sh -c "echo arm64 > %{share}/machine")))))
103-
((((arch x86_64) (os win32)))
104-
((action
105-
(progn
106-
(run mkdir -p %{share} %{lib}/%{pkg-self:name})
107-
(run touch %{lib}/%{pkg-self:name}/META)
108-
(run sh -c "echo x86_64 > %{share}/machine")))))))
99+
(run sh -c "echo arm64 > %{share}/machine")))))))
109100

110101
$ DUNE_CONFIG__ARCH=arm64 dune build
111102
$ cat $pkg_root/$(dune pkg print-digest foo)/target/share/kernel

test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-custom-solver-env.t

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ Solve the project:
6060
5.4.0+solver-env-version-override
6161
- arch = arm64; os = macos; sys-ocaml-version =
6262
5.4.0+solver-env-version-override
63-
- arch = x86_64; os = win32; sys-ocaml-version =
64-
5.4.0+solver-env-version-override
6563

6664
Dependencies on all supported platforms:
6765
- foo.0.0.1

test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-depexts-basic.t

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ Demonstrate various cases representing depexts in lockfiles.
2929
- arch = arm64; os = linux
3030
- arch = x86_64; os = macos
3131
- arch = arm64; os = macos
32-
- arch = x86_64; os = win32
3332

3433
Dependencies on all supported platforms:
3534
- foo.0.0.1

test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-no-solution.t

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ Solver error when solving fails with the same error on all platforms:
3737
- arch = arm64; os = linux
3838
- arch = x86_64; os = macos
3939
- arch = arm64; os = macos
40-
- arch = x86_64; os = win32
4140
...with this error:
4241
Couldn't solve the package dependency formula.
4342
Selected candidates: a.0.0.1 b.0.0.1 foo.dev
@@ -75,7 +74,6 @@ with the platforms where they are relevant:
7574
The dependency solver failed to find a solution for the following platforms:
7675
- arch = x86_64; os = macos
7776
- arch = arm64; os = macos
78-
- arch = x86_64; os = win32
7977
...with this error:
8078
Couldn't solve the package dependency formula.
8179
Selected candidates: a.0.0.1 b.0.0.1 foo.dev

test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-partial-solve.t

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ to solve for macos, linux, and windows by default.
4747
Platforms with no solution:
4848
- arch = x86_64; os = linux
4949
- arch = arm64; os = linux
50-
- arch = x86_64; os = win32
5150

5251
See the log or run with --verbose for more details. Configure platforms to
5352
solve for in the dune-workspace file.
@@ -57,7 +56,6 @@ The log file will contain errors about the package being unavailable.
5756
# The dependency solver failed to find a solution for the following platforms:
5857
# - arch = x86_64; os = linux
5958
# - arch = arm64; os = linux
60-
# - arch = x86_64; os = win32
6159
# ...with this error:
6260
# Couldn't solve the package dependency formula.
6361
# Selected candidates: x.dev

test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-platform-dependant-dependencies.t

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ A package that conditionally depends on packages depending on the OS:
5959
- arch = arm64; os = linux
6060
- arch = x86_64; os = macos
6161
- arch = arm64; os = macos
62-
- arch = x86_64; os = win32
6362

6463
Dependencies on all supported platforms:
6564
- foo.0.0.1
@@ -81,13 +80,13 @@ A package that conditionally depends on packages depending on the OS:
8180
Build the project as if we were on linux and confirm that only the linux-specific dependency is installed:
8281
$ DUNE_CONFIG__OS=linux DUNE_CONFIG__ARCH=arm64 DUNE_CONFIG__OS_FAMILY=debian DUNE_CONFIG__OS_DISTRIBUTION=ubuntu DUNE_CONFIG__OS_VERSION=24.11 dune build
8382
$ ls $pkg_root/
84-
foo.0.0.1-f25d4bdb5ae54b8ba819b6837709d5bc
83+
foo.0.0.1-9b0ae1f26c9a79e6ae8bca96ec389858
8584
linux-only.0.0.1-f1f7456a7bf1c70f9203f8caadf79f6d
8685

8786
$ dune clean
8887

8988
Build the project as if we were on macos and confirm that only the macos-specific dependency is installed:
9089
$ DUNE_CONFIG__OS=macos DUNE_CONFIG__ARCH=x86_64 DUNE_CONFIG__OS_FAMILY=homebrew DUNE_CONFIG__OS_DISTRIBUTION=homebrew DUNE_CONFIG__OS_VERSION=15.3.1 dune build
9190
$ ls $pkg_root/
92-
foo.0.0.1-03f41d0caa9112c45e024836d778d225
91+
foo.0.0.1-dace34542257af51bf0bfc5cd45a7ece
9392
macos-only.0.0.1-45b66a146d607b34b06be6c1cafeeb83

test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-platform-dependant-version-extra-files.t

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ Solve the project. The solution will contain extra files for both versions of fo
7676
- arch = arm64; os = linux
7777
- arch = x86_64; os = macos
7878
- arch = arm64; os = macos
79-
- arch = x86_64; os = win32
8079

8180
Dependencies on all supported platforms:
8281
- bar.0.0.1

test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-platform-dependant-version.t

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ Define a package bar which conditionally depends on different versions of foo:
6060
- arch = arm64; os = linux
6161
- arch = x86_64; os = macos
6262
- arch = arm64; os = macos
63-
- arch = x86_64; os = win32
6463

6564
Dependencies on all supported platforms:
6665
- bar.0.0.1

test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-validation.t

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ Solve dependencies:
3636
- arch = arm64; os = linux
3737
- arch = x86_64; os = macos
3838
- arch = arm64; os = macos
39-
- arch = x86_64; os = win32
4039

4140
Dependencies on all supported platforms:
4241
- a.0.0.1

0 commit comments

Comments
 (0)