Skip to content

Commit 223d1c5

Browse files
committed
Downgrade MSRV to 1.63
This is the version currently available in Debian stable and should be a reasonable choice. Also check in the CI that everything still compiles with that version and fixed Cargo.lock files that use older dependency versions than what cargo would select by itself.
1 parent fa533bd commit 223d1c5

File tree

6 files changed

+177
-46
lines changed

6 files changed

+177
-46
lines changed

.github/workflows/ci.yml

+48-42
Original file line numberDiff line numberDiff line change
@@ -211,36 +211,39 @@ jobs:
211211
- name: cd lib/macro && cargo +stable semver-checks check-release
212212
run: cargo +stable semver-checks check-release
213213
working-directory: lib/macro
214-
- run: rustup install 1.70
215-
- name: cd lib && cargo +1.70 build
216-
run: cargo +1.70 build
214+
- run: rustup install 1.63
215+
- run: mv lib/Cargo.lock.msrv lib/Cargo.lock
216+
- run: mv lib/macro/internal/Cargo.lock.msrv lib/macro/internal/Cargo.lock
217+
- run: mv lib/macro/Cargo.lock.msrv lib/macro/Cargo.lock
218+
- name: cd lib && cargo +1.63 build
219+
run: cargo +1.63 build
217220
working-directory: lib
218-
- name: cd lib && cargo +1.70 build --release
219-
run: cargo +1.70 build --release
221+
- name: cd lib && cargo +1.63 build --release
222+
run: cargo +1.63 build --release
220223
working-directory: lib
221-
- name: cd lib && cargo +1.70 build --no-default-features --features=alloc
222-
run: cargo +1.70 build --no-default-features --features=alloc
224+
- name: cd lib && cargo +1.63 build --no-default-features --features=alloc
225+
run: cargo +1.63 build --no-default-features --features=alloc
223226
working-directory: lib
224-
- name: cd lib && cargo +1.70 build --release --no-default-features --features=alloc
225-
run: cargo +1.70 build --release --no-default-features --features=alloc
227+
- name: cd lib && cargo +1.63 build --release --no-default-features --features=alloc
228+
run: cargo +1.63 build --release --no-default-features --features=alloc
226229
working-directory: lib
227-
- name: cd lib && cargo +1.70 build --no-default-features
228-
run: cargo +1.70 build --no-default-features
230+
- name: cd lib && cargo +1.63 build --no-default-features
231+
run: cargo +1.63 build --no-default-features
229232
working-directory: lib
230-
- name: cd lib && cargo +1.70 build --release --no-default-features
231-
run: cargo +1.70 build --release --no-default-features
233+
- name: cd lib && cargo +1.63 build --release --no-default-features
234+
run: cargo +1.63 build --release --no-default-features
232235
working-directory: lib
233-
- name: cd lib/macro/internal && cargo +1.70 build
234-
run: cargo +1.70 build
236+
- name: cd lib/macro/internal && cargo +1.63 build
237+
run: cargo +1.63 build
235238
working-directory: lib/macro/internal
236-
- name: cd lib/macro/internal && cargo +1.70 build --release
237-
run: cargo +1.70 build --release
239+
- name: cd lib/macro/internal && cargo +1.63 build --release
240+
run: cargo +1.63 build --release
238241
working-directory: lib/macro/internal
239-
- name: cd lib/macro && cargo +1.70 build
240-
run: cargo +1.70 build
242+
- name: cd lib/macro && cargo +1.63 build
243+
run: cargo +1.63 build
241244
working-directory: lib/macro
242-
- name: cd lib/macro && cargo +1.70 build --release
243-
run: cargo +1.70 build --release
245+
- name: cd lib/macro && cargo +1.63 build --release
246+
run: cargo +1.63 build --release
244247
working-directory: lib/macro
245248
windows:
246249
runs-on: windows-latest
@@ -320,34 +323,37 @@ jobs:
320323
- name: cd bin && cargo +stable build --release
321324
run: cargo +stable build --release
322325
working-directory: bin
323-
- run: rustup install 1.70
324-
- name: cd lib && cargo +1.70 build
325-
run: cargo +1.70 build
326+
- run: rustup install 1.63
327+
- run: mv lib/Cargo.lock.msrv lib/Cargo.lock
328+
- run: mv lib/macro/internal/Cargo.lock.msrv lib/macro/internal/Cargo.lock
329+
- run: mv lib/macro/Cargo.lock.msrv lib/macro/Cargo.lock
330+
- name: cd lib && cargo +1.63 build
331+
run: cargo +1.63 build
326332
working-directory: lib
327-
- name: cd lib && cargo +1.70 build --release
328-
run: cargo +1.70 build --release
333+
- name: cd lib && cargo +1.63 build --release
334+
run: cargo +1.63 build --release
329335
working-directory: lib
330-
- name: cd lib && cargo +1.70 build --no-default-features --features=alloc
331-
run: cargo +1.70 build --no-default-features --features=alloc
336+
- name: cd lib && cargo +1.63 build --no-default-features --features=alloc
337+
run: cargo +1.63 build --no-default-features --features=alloc
332338
working-directory: lib
333-
- name: cd lib && cargo +1.70 build --release --no-default-features --features=alloc
334-
run: cargo +1.70 build --release --no-default-features --features=alloc
339+
- name: cd lib && cargo +1.63 build --release --no-default-features --features=alloc
340+
run: cargo +1.63 build --release --no-default-features --features=alloc
335341
working-directory: lib
336-
- name: cd lib && cargo +1.70 build --no-default-features
337-
run: cargo +1.70 build --no-default-features
342+
- name: cd lib && cargo +1.63 build --no-default-features
343+
run: cargo +1.63 build --no-default-features
338344
working-directory: lib
339-
- name: cd lib && cargo +1.70 build --release --no-default-features
340-
run: cargo +1.70 build --release --no-default-features
345+
- name: cd lib && cargo +1.63 build --release --no-default-features
346+
run: cargo +1.63 build --release --no-default-features
341347
working-directory: lib
342-
- name: cd lib/macro/internal && cargo +1.70 build
343-
run: cargo +1.70 build
348+
- name: cd lib/macro/internal && cargo +1.63 build
349+
run: cargo +1.63 build
344350
working-directory: lib/macro/internal
345-
- name: cd lib/macro/internal && cargo +1.70 build --release
346-
run: cargo +1.70 build --release
351+
- name: cd lib/macro/internal && cargo +1.63 build --release
352+
run: cargo +1.63 build --release
347353
working-directory: lib/macro/internal
348-
- name: cd lib/macro && cargo +1.70 build
349-
run: cargo +1.70 build
354+
- name: cd lib/macro && cargo +1.63 build
355+
run: cargo +1.63 build
350356
working-directory: lib/macro
351-
- name: cd lib/macro && cargo +1.70 build --release
352-
run: cargo +1.70 build --release
357+
- name: cd lib/macro && cargo +1.63 build --release
358+
run: cargo +1.63 build --release
353359
working-directory: lib/macro

lib/Cargo.lock.msrv

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/macro/Cargo.lock.msrv

+58
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/macro/internal/Cargo.lock.msrv

+50
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@
151151
#![warn(missing_debug_implementations)]
152152
#![warn(missing_docs)]
153153
#![warn(unreachable_pub)]
154-
#![warn(unsafe_op_in_unsafe_fn)]
155154
#![warn(unused_results)]
156155
#![warn(clippy::pedantic)]
157156
#![allow(clippy::enum_glob_use)]
@@ -304,7 +303,7 @@ impl core::fmt::Display for DecodeKind {
304303
DecodeKind::Trailing => "non-zero trailing bits",
305304
DecodeKind::Padding => "invalid padding length",
306305
};
307-
write!(f, "{description}")
306+
write!(f, "{}", description)
308307
}
309308
}
310309

@@ -1565,7 +1564,7 @@ impl core::fmt::Display for SpecificationError {
15651564
Duplicate(c) => write!(f, "{:?} has conflicting definitions", c as char),
15661565
ExtraPadding => write!(f, "unnecessary padding"),
15671566
WrapLength => write!(f, "invalid wrap width or separator length"),
1568-
WrapWidth(x) => write!(f, "wrap width not a multiple of {x}"),
1567+
WrapWidth(x) => write!(f, "wrap width not a multiple of {}", x),
15691568
FromTo => write!(f, "translate from/to length mismatch"),
15701569
Undefined(c) => write!(f, "{:?} is undefined", c as char),
15711570
}

xtask/src/main.rs

+14-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ enum Toolchain {
3232
#[strum(serialize = "stable")]
3333
Stable,
3434

35-
#[strum(serialize = "1.70")]
35+
#[strum(serialize = "1.63")]
3636
Msrv,
3737
}
3838

@@ -371,6 +371,19 @@ impl Flags {
371371
run: Some(format!("rustup install {}", actions[0].toolchain)),
372372
..Default::default()
373373
});
374+
375+
if actions[0].toolchain == Toolchain::Msrv {
376+
for dir in Dir::iter().filter(|x| x.is_published() && x != &Dir::Bin) {
377+
job.steps.push(WorkflowStep {
378+
run: Some(format!(
379+
"mv {}/Cargo.lock.msrv {}/Cargo.lock",
380+
dir, dir
381+
)),
382+
..Default::default()
383+
});
384+
}
385+
}
386+
374387
let components: BTreeSet<_> = actions
375388
.iter()
376389
.filter_map(|x| match x.task {

0 commit comments

Comments
 (0)