Skip to content

Commit 13d972e

Browse files
authored
Don't solve for windows arm64 by default (#12641)
Windows arm64 is not widely used. Currently generating portable lockdirs requires running the solver for each of a configurable list of platforms. Removing windows arm64 from the default platform list will speed up solving for most users by avoiding generating a solution that few people will be able to use. Signed-off-by: Stephen Sherratt <[email protected]>
1 parent 04d4952 commit 13d972e

8 files changed

+3
-28
lines changed

src/dune_pkg/solver_env.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ let popular_platform_envs =
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 ()
178178
; make ~os:"win32" ~arch:(Some "x86_64") ~os_distribution:None ~os_family:None ()
179-
; make ~os:"win32" ~arch:(Some "arm64") ~os_distribution:None ~os_family:None ()
180179
]
181180
;;
182181

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ Create a package that writes a different value to some files depending on the os
4242
- arch = x86_64; os = macos
4343
- arch = arm64; os = macos
4444
- arch = x86_64; os = win32
45-
- arch = arm64; os = win32
4645

4746
Dependencies on all supported platforms:
4847
- foo.0.0.1
@@ -66,8 +65,6 @@ Create a package that writes a different value to some files depending on the os
6665
((arch arm64)
6766
(os macos))
6867
((arch x86_64)
69-
(os win32))
70-
((arch arm64)
7168
(os win32)))
7269

7370
$ cat ${default_lock_dir}/foo.0.0.1.pkg
@@ -108,13 +105,7 @@ Create a package that writes a different value to some files depending on the os
108105
(progn
109106
(run mkdir -p %{share} %{lib}/%{pkg-self:name})
110107
(run touch %{lib}/%{pkg-self:name}/META)
111-
(run sh -c "echo x86_64 > %{share}/machine")))))
112-
((((arch arm64) (os win32)))
113-
((action
114-
(progn
115-
(run mkdir -p %{share} %{lib}/%{pkg-self:name})
116-
(run touch %{lib}/%{pkg-self:name}/META)
117-
(run sh -c "echo arm64 > %{share}/machine")))))))
108+
(run sh -c "echo x86_64 > %{share}/machine")))))))
118109

119110
$ DUNE_CONFIG__ARCH=arm64 dune build
120111
$ 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
@@ -62,8 +62,6 @@ Solve the project:
6262
5.4.0+solver-env-version-override
6363
- arch = x86_64; os = win32; sys-ocaml-version =
6464
5.4.0+solver-env-version-override
65-
- arch = arm64; os = win32; sys-ocaml-version =
66-
5.4.0+solver-env-version-override
6765

6866
Dependencies on all supported platforms:
6967
- 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
@@ -30,7 +30,6 @@ Demonstrate various cases representing depexts in lockfiles.
3030
- arch = x86_64; os = macos
3131
- arch = arm64; os = macos
3232
- arch = x86_64; os = win32
33-
- arch = arm64; os = win32
3433

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

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ to solve for macos, linux, and windows by default.
4848
- arch = x86_64; os = linux
4949
- arch = arm64; os = linux
5050
- arch = x86_64; os = win32
51-
- arch = arm64; os = win32
5251

5352
See the log or run with --verbose for more details. Configure platforms to
5453
solve for in the dune-workspace file.
@@ -76,14 +75,6 @@ The log file will contain errors about the package being unavailable.
7675
# - foo -> (problem)
7776
# No usable implementations:
7877
# foo.0.0.1: Availability condition not satisfied
79-
# Failed to find package solution for platform:
80-
# - arch = arm64
81-
# - os = win32
82-
# Couldn't solve the package dependency formula.
83-
# Selected candidates: x.dev
84-
# - foo -> (problem)
85-
# No usable implementations:
86-
# foo.0.0.1: Availability condition not satisfied
8778

8879
The lockdir will contain a list of the platforms where solving succeeded.
8980
$ cat ${default_lock_dir}/lock.dune

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
@@ -60,7 +60,6 @@ A package that conditionally depends on packages depending on the OS:
6060
- arch = x86_64; os = macos
6161
- arch = arm64; os = macos
6262
- arch = x86_64; os = win32
63-
- arch = arm64; os = win32
6463

6564
Dependencies on all supported platforms:
6665
- foo.0.0.1
@@ -82,13 +81,13 @@ A package that conditionally depends on packages depending on the OS:
8281
Build the project as if we were on linux and confirm that only the linux-specific dependency is installed:
8382
$ 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
8483
$ ls $pkg_root/
85-
foo.0.0.1-2703cce578216454b58a01492e99e039
84+
foo.0.0.1-f25d4bdb5ae54b8ba819b6837709d5bc
8685
linux-only.0.0.1-f1f7456a7bf1c70f9203f8caadf79f6d
8786

8887
$ dune clean
8988

9089
Build the project as if we were on macos and confirm that only the macos-specific dependency is installed:
9190
$ 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
9291
$ ls $pkg_root/
93-
foo.0.0.1-c5f5594e192bc07c61ccef9d837bd2c0
92+
foo.0.0.1-03f41d0caa9112c45e024836d778d225
9493
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
@@ -77,7 +77,6 @@ Solve the project. The solution will contain extra files for both versions of fo
7777
- arch = x86_64; os = macos
7878
- arch = arm64; os = macos
7979
- arch = x86_64; os = win32
80-
- arch = arm64; os = win32
8180

8281
Dependencies on all supported platforms:
8382
- 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
@@ -61,7 +61,6 @@ Define a package bar which conditionally depends on different versions of foo:
6161
- arch = x86_64; os = macos
6262
- arch = arm64; os = macos
6363
- arch = x86_64; os = win32
64-
- arch = arm64; os = win32
6564

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

0 commit comments

Comments
 (0)