Skip to content

Commit f717cd6

Browse files
authored
dprint: Fix build failure with Rust ≥ 1.89.0 (#436967)
2 parents 0a96f90 + db1c469 commit f717cd6

File tree

2 files changed

+168
-1
lines changed

2 files changed

+168
-1
lines changed

pkgs/by-name/dp/dprint/package.nix

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ rustPlatform.buildRustPackage (finalAttrs: {
2424
hash = "sha256-Lt6CzSzppu5ULhzYN5FTCWtWK3AA4/8jRzXgQkU4Tco=";
2525
};
2626

27-
cargoHash = "sha256-1opQaR3vbm/DpDY5oQ1VgA4nf0nCBknxfgOSPZQbtV4=";
27+
cargoPatches = [
28+
# Upgrade wasmer to 6.1.0-rc.3 to fix build failure with Rust ≥ 1.89.0
29+
# https://github.com/dprint/dprint/pull/1021
30+
./upgrade-wasmer.patch
31+
];
32+
33+
cargoHash = "sha256-RUWyR1Yr9G2xBMigDa9+LQyaU5on85xkRQYTLH9JOPg=";
2834

2935
nativeBuildInputs = [ installShellFiles ];
3036

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
From 379cf407bfc07380dad24aefb2db40f6852f32ed Mon Sep 17 00:00:00 2001
2+
From: Anders Kaseorg <[email protected]>
3+
Date: Mon, 25 Aug 2025 18:01:57 -0700
4+
Subject: [PATCH] Upgrade wasmer to 6.1.0-rc.3
5+
6+
Signed-off-by: Anders Kaseorg <[email protected]>
7+
---
8+
Cargo.lock | 41 ++++++++++++++++++++--------------------
9+
crates/dprint/Cargo.toml | 4 ++--
10+
2 files changed, 22 insertions(+), 23 deletions(-)
11+
12+
diff --git a/Cargo.lock b/Cargo.lock
13+
index 9a1bc870..bff2c81b 100644
14+
--- a/Cargo.lock
15+
+++ b/Cargo.lock
16+
@@ -455,9 +455,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
17+
18+
[[package]]
19+
name = "corosensei"
20+
-version = "0.2.1"
21+
+version = "0.2.2"
22+
source = "registry+https://github.com/rust-lang/crates.io-index"
23+
-checksum = "ad067b451c08956709f8762dba86e049c124ea52858e3ab8d076ba2892caa437"
24+
+checksum = "5d1ea1c2a2f898d2a6ff149587b8a04f41ee708d248c723f01ac2f0f01edc0b3"
25+
dependencies = [
26+
"autocfg",
27+
"cfg-if",
28+
@@ -776,18 +776,18 @@ dependencies = [
29+
30+
[[package]]
31+
name = "derive_more"
32+
-version = "1.0.0"
33+
+version = "2.0.1"
34+
source = "registry+https://github.com/rust-lang/crates.io-index"
35+
-checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05"
36+
+checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678"
37+
dependencies = [
38+
"derive_more-impl",
39+
]
40+
41+
[[package]]
42+
name = "derive_more-impl"
43+
-version = "1.0.0"
44+
+version = "2.0.1"
45+
source = "registry+https://github.com/rust-lang/crates.io-index"
46+
-checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22"
47+
+checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3"
48+
dependencies = [
49+
"proc-macro2",
50+
"quote",
51+
@@ -3256,16 +3256,15 @@ dependencies = [
52+
53+
[[package]]
54+
name = "wasmer"
55+
-version = "6.0.1"
56+
+version = "6.1.0-rc.3"
57+
source = "registry+https://github.com/rust-lang/crates.io-index"
58+
-checksum = "f25dccc6251837449135914ee1978731c2c3df9fc727088eb7e098736c0f15d1"
59+
+checksum = "1e588d83a5ac7eb5e6af54ac4d34183442e4dd2a7358d2a11793b17c03b7df0b"
60+
dependencies = [
61+
"bindgen",
62+
"bytes",
63+
"cfg-if",
64+
"cmake",
65+
- "derive_more 1.0.0",
66+
- "idna_adapter",
67+
+ "derive_more 2.0.1",
68+
"indexmap",
69+
"js-sys",
70+
"more-asserts",
71+
@@ -3278,7 +3277,6 @@ dependencies = [
72+
"target-lexicon",
73+
"thiserror 1.0.61",
74+
"tracing",
75+
- "ureq",
76+
"wasm-bindgen",
77+
"wasmer-compiler",
78+
"wasmer-compiler-cranelift",
79+
@@ -3292,9 +3290,9 @@ dependencies = [
80+
81+
[[package]]
82+
name = "wasmer-compiler"
83+
-version = "6.0.1"
84+
+version = "6.1.0-rc.3"
85+
source = "registry+https://github.com/rust-lang/crates.io-index"
86+
-checksum = "6f35baeb0d5b20710b5b9c59477dbf813b1ac53da33ee46cb22f8c4190e3986e"
87+
+checksum = "c9542eb21b9a0f7811101e26e40e360a9ac02d093e3089c8fa62dfa102478edb"
88+
dependencies = [
89+
"backtrace",
90+
"bytes",
91+
@@ -3323,9 +3321,9 @@ dependencies = [
92+
93+
[[package]]
94+
name = "wasmer-compiler-cranelift"
95+
-version = "6.0.1"
96+
+version = "6.1.0-rc.3"
97+
source = "registry+https://github.com/rust-lang/crates.io-index"
98+
-checksum = "6d657a96003ce3f54a3cbbf681fcd782b983f9362c97cfbbe243cbf66790e004"
99+
+checksum = "a69f548bcccd4791b2647e0d748eb8ddd4d0856233778867c8b0db3781a82ca1"
100+
dependencies = [
101+
"cranelift-codegen",
102+
"cranelift-entity",
103+
@@ -3343,9 +3341,9 @@ dependencies = [
104+
105+
[[package]]
106+
name = "wasmer-derive"
107+
-version = "6.0.1"
108+
+version = "6.1.0-rc.3"
109+
source = "registry+https://github.com/rust-lang/crates.io-index"
110+
-checksum = "62b57be80a67de03c2a02d697bfd763e097546b11f0020cf9930ebaa4f8cf965"
111+
+checksum = "8db532c73814748214276f878b8382a8885769fdd86d0bee2792c438b0d28c62"
112+
dependencies = [
113+
"proc-macro-error2",
114+
"proc-macro2",
115+
@@ -3355,9 +3353,9 @@ dependencies = [
116+
117+
[[package]]
118+
name = "wasmer-types"
119+
-version = "6.0.1"
120+
+version = "6.1.0-rc.3"
121+
source = "registry+https://github.com/rust-lang/crates.io-index"
122+
-checksum = "1b8424d15f5c19a8df972fc9367d75ba3b87af63b279208d50a32e9a298d944b"
123+
+checksum = "81b900743ecb272e8e8a760a42e069f19d158d9fd03c6ac256026407bdc91833"
124+
dependencies = [
125+
"bytecheck 0.6.11",
126+
"enum-iterator",
127+
@@ -3375,9 +3373,9 @@ dependencies = [
128+
129+
[[package]]
130+
name = "wasmer-vm"
131+
-version = "6.0.1"
132+
+version = "6.1.0-rc.3"
133+
source = "registry+https://github.com/rust-lang/crates.io-index"
134+
-checksum = "faabfffefc6fc350bb5b07301f05ba604a18c3d2d97c6354183f15792577056d"
135+
+checksum = "40956bcf167d5bed1a940649f638e2d610e5a066863b4ab6c1ab1341fef97a9a"
136+
dependencies = [
137+
"backtrace",
138+
"cc",
139+
@@ -3394,6 +3392,7 @@ dependencies = [
140+
"memoffset",
141+
"more-asserts",
142+
"region",
143+
+ "rustversion",
144+
"scopeguard",
145+
"thiserror 1.0.61",
146+
"wasmer-types",
147+
diff --git a/crates/dprint/Cargo.toml b/crates/dprint/Cargo.toml
148+
index 44d107d4..af733e83 100644
149+
--- a/crates/dprint/Cargo.toml
150+
+++ b/crates/dprint/Cargo.toml
151+
@@ -58,8 +58,8 @@ webpki-roots = "=0.26.7"
152+
# patch version increases of rkyv may cause panics when deserializing
153+
# data serialized with older versions
154+
rkyv = "=0.8.10"
155+
-wasmer = "=6.0.1"
156+
-wasmer-compiler = "=6.0.1"
157+
+wasmer = "=6.1.0-rc.3"
158+
+wasmer-compiler = "=6.1.0-rc.3"
159+
160+
[target.'cfg(windows)'.dependencies]
161+
winreg = "=0.55.0"

0 commit comments

Comments
 (0)