Skip to content

Commit f2fdb1e

Browse files
authored
chore: bump MSRV to 1.85 (#325)
This patch bumps our MSRV to 1.85. The HACKING policy says that we target the version in debian stable, which has now risen to 1.85. 1.85 also happens to be the exact version we need to pick up rmp-serde 1.3.1, which I hope will address the RUSTSEC-2024-0436 warning that cargo deny is throwing.
1 parent 7f6a6dd commit f2fdb1e

8 files changed

Lines changed: 45 additions & 27 deletions

File tree

Cargo.lock

Lines changed: 25 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

HACKING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ send patches you don't understand.
1919
### Install a rust toolchain
2020

2121
If you have not already done so, install a rust toolchain.
22-
The minimum rust version for shpool is `1.74.0`, so make sure that
22+
The minimum rust version for shpool is `1.85.0`, so make sure that
2323
`cargo --version` reports that version or higher before attempting
2424
to build shpool. The easiest way to install an up to date
2525
rust toolchain is with [`rustup`](https://rustup.rs/),

libshpool/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "libshpool"
33
version = "0.9.4"
4-
edition = "2021"
4+
edition = "2024"
55
repository = "https://github.com/shell-pool/shpool"
66
authors = ["Ethan Pailes <pailes@google.com>"]
77
readme = "README.md"
@@ -13,7 +13,7 @@ disconnects.
1313
'''
1414
license = "Apache-2.0"
1515
keywords = ["tmux", "tty", "terminal", "shell", "persistence"]
16-
rust-version = "1.74"
16+
rust-version = "1.85"
1717

1818
[features]
1919
test_hooks = [] # for internal testing only, don't enable this feature

libshpool/src/daemon/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ pub fn run(
4545
) -> anyhow::Result<()> {
4646
if let Ok(daemonize) = env::var(consts::AUTODAEMONIZE_VAR) {
4747
if daemonize == "true" {
48-
env::remove_var(consts::AUTODAEMONIZE_VAR); // avoid looping
48+
// Safety: this is executing before we have forked any threads,
49+
// so we are still in single-threaded mode, therefore it is safe
50+
// to mutate the global env.
51+
unsafe {
52+
env::remove_var(consts::AUTODAEMONIZE_VAR); // avoid looping
53+
}
4954

5055
let pid_file = socket.with_file_name("daemonized-shpool.pid");
5156

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
2-
channel = "1.74.0"
2+
channel = "1.85.0"
33
components = ["rust-docs", "rust-src", "rust-analyzer"]
44
profile = "minimal"

shpool-protocol/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "shpool-protocol"
33
version = "0.3.3"
4-
edition = "2021"
4+
edition = "2024"
55
authors = ["Ethan Pailes <pailes@google.com>"]
66
repository = "https://github.com/shell-pool/shpool"
77
readme = "../README.md"
@@ -11,7 +11,7 @@ You almost certainly don't need to use it directly.
1111
'''
1212
license = "Apache-2.0"
1313
keywords = ["tmux", "tty", "terminal", "shell", "persistence"]
14-
rust-version = "1.74"
14+
rust-version = "1.85"
1515

1616
[dependencies]
1717
anyhow = "1"

shpool/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "shpool"
33
version = "0.9.4"
4-
edition = "2021"
4+
edition = "2024"
55
authors = ["Ethan Pailes <pailes@google.com>"]
66
repository = "https://github.com/shell-pool/shpool"
77
readme = "../README.md"
@@ -11,7 +11,7 @@ sessions to gracefully handle network disconnects.
1111
'''
1212
license = "Apache-2.0"
1313
keywords = ["tmux", "tty", "terminal", "shell", "persistence"]
14-
rust-version = "1.74"
14+
rust-version = "1.85"
1515

1616
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1717

shpool/tests/kill.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ fn empty() -> anyhow::Result<()> {
3737
)
3838
.context("starting daemon proc")?;
3939

40-
env::remove_var("SHPOOL_SESSION_NAME");
40+
// Safety: I think this is actually wrong because tests can run
41+
// in parallel. It hasn't ever caused a problem in practice though,
42+
// and this is just a test, so I think it's fine.
43+
unsafe {
44+
env::remove_var("SHPOOL_SESSION_NAME");
45+
}
4146

4247
let out = daemon_proc.kill(vec![])?;
4348
assert!(!out.status.success());

0 commit comments

Comments
 (0)