terminal: Bump sysinfo crate (#39681)

Lukas Wirth and dino created

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Co-authored-by: dino <dinojoaocosta@gmail.com>

Change summary

Cargo.lock                              | 87 ++++++++++----------------
Cargo.toml                              |  2 
crates/remote/src/remote_client.rs      |  6 
crates/remote/src/transport/ssh.rs      |  4 
crates/remote_server/src/unix.rs        |  7 -
crates/system_specs/src/system_specs.rs |  4 
crates/terminal/src/pty_info.rs         |  5 
crates/terminal/src/terminal.rs         |  7 -
tooling/workspace-hack/Cargo.toml       |  8 +-
9 files changed, 55 insertions(+), 75 deletions(-)

Detailed changes

Cargo.lock 🔗

@@ -4722,7 +4722,7 @@ dependencies = [
  "serde_json_lenient",
  "settings",
  "shlex",
- "sysinfo",
+ "sysinfo 0.37.2",
  "task",
  "tasks_ui",
  "telemetry",
@@ -8949,9 +8949,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8"
 
 [[package]]
 name = "libc"
-version = "0.2.172"
+version = "0.2.176"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
+checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174"
 
 [[package]]
 name = "libdbus-sys"
@@ -10535,6 +10535,16 @@ dependencies = [
  "objc2-core-foundation",
 ]
 
+[[package]]
+name = "objc2-io-kit"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "71c1c64d6120e51cd86033f67176b1cb66780c2efe34dec55176f77befd93c0a"
+dependencies = [
+ "libc",
+ "objc2-core-foundation",
+]
+
 [[package]]
 name = "objc2-metal"
 version = "0.3.1"
@@ -13076,7 +13086,7 @@ dependencies = [
  "settings",
  "shellexpand 2.1.2",
  "smol",
- "sysinfo",
+ "sysinfo 0.37.2",
  "task",
  "thiserror 2.0.12",
  "toml 0.8.20",
@@ -15736,7 +15746,21 @@ dependencies = [
  "memchr",
  "ntapi",
  "rayon",
- "windows 0.57.0",
+ "windows 0.54.0",
+]
+
+[[package]]
+name = "sysinfo"
+version = "0.37.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16607d5caffd1c07ce073528f9ed972d88db15dd44023fa57142963be3feb11f"
+dependencies = [
+ "libc",
+ "memchr",
+ "ntapi",
+ "objc2-core-foundation",
+ "objc2-io-kit",
+ "windows 0.61.1",
 ]
 
 [[package]]
@@ -15821,7 +15845,7 @@ dependencies = [
  "pciid-parser",
  "release_channel",
  "serde",
- "sysinfo",
+ "sysinfo 0.37.2",
  "workspace-hack",
 ]
 
@@ -16029,7 +16053,7 @@ dependencies = [
  "serde",
  "settings",
  "smol",
- "sysinfo",
+ "sysinfo 0.37.2",
  "task",
  "theme",
  "thiserror 2.0.12",
@@ -18570,16 +18594,6 @@ dependencies = [
  "windows-targets 0.52.6",
 ]
 
-[[package]]
-name = "windows"
-version = "0.57.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143"
-dependencies = [
- "windows-core 0.57.0",
- "windows-targets 0.52.6",
-]
-
 [[package]]
 name = "windows"
 version = "0.58.0"
@@ -18636,18 +18650,6 @@ dependencies = [
  "windows-targets 0.52.6",
 ]
 
-[[package]]
-name = "windows-core"
-version = "0.57.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d"
-dependencies = [
- "windows-implement 0.57.0",
- "windows-interface 0.57.0",
- "windows-result 0.1.2",
- "windows-targets 0.52.6",
-]
-
 [[package]]
 name = "windows-core"
 version = "0.58.0"
@@ -18684,17 +18686,6 @@ dependencies = [
  "windows-link 0.1.1",
 ]
 
-[[package]]
-name = "windows-implement"
-version = "0.57.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.101",
-]
-
 [[package]]
 name = "windows-implement"
 version = "0.58.0"
@@ -18717,17 +18708,6 @@ dependencies = [
  "syn 2.0.101",
 ]
 
-[[package]]
-name = "windows-interface"
-version = "0.57.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.101",
-]
-
 [[package]]
 name = "windows-interface"
 version = "0.58.0"
@@ -19722,6 +19702,7 @@ dependencies = [
  "wayland-backend",
  "wayland-sys",
  "winapi",
+ "windows 0.61.1",
  "windows-core 0.61.0",
  "windows-numerics",
  "windows-sys 0.48.0",
@@ -20197,7 +20178,7 @@ dependencies = [
  "snippets_ui",
  "supermaven",
  "svg_preview",
- "sysinfo",
+ "sysinfo 0.37.2",
  "system_specs",
  "tab_switcher",
  "task",
@@ -20404,7 +20385,7 @@ dependencies = [
  "rand 0.8.5",
  "screencapturekit",
  "screencapturekit-sys",
- "sysinfo",
+ "sysinfo 0.31.4",
  "tao-core-video-sys",
  "windows 0.61.1",
  "windows-capture",

Cargo.toml 🔗

@@ -654,7 +654,7 @@ strum = { version = "0.27.0", features = ["derive"] }
 subtle = "2.5.0"
 syn = { version = "2.0.101", features = ["full", "extra-traits", "visit-mut"] }
 sys-locale = "0.3.1"
-sysinfo = "0.31.0"
+sysinfo = "0.37.0"
 take-until = "0.2.0"
 tempfile = "3.20.0"
 thiserror = "2.0.12"

crates/remote/src/remote_client.rs 🔗

@@ -331,7 +331,7 @@ impl RemoteClient {
                 let ssh_connection = cx
                     .update(|cx| {
                         cx.update_default_global(|pool: &mut ConnectionPool, cx| {
-                            pool.connect(connection_options.clone(), &delegate, cx)
+                            pool.connect(connection_options.clone(), delegate.clone(), cx)
                         })
                     })?
                     .await
@@ -561,7 +561,7 @@ impl RemoteClient {
             let (ssh_connection, io_task) = match async {
                 let ssh_connection = cx
                     .update_global(|pool: &mut ConnectionPool, cx| {
-                        pool.connect(connection_options, &delegate, cx)
+                        pool.connect(connection_options, delegate.clone(), cx)
                     })?
                     .await
                     .map_err(|error| error.cloned())?;
@@ -987,7 +987,7 @@ impl ConnectionPool {
     pub fn connect(
         &mut self,
         opts: RemoteConnectionOptions,
-        delegate: &Arc<dyn RemoteClientDelegate>,
+        delegate: Arc<dyn RemoteClientDelegate>,
         cx: &mut App,
     ) -> Shared<Task<Result<Arc<dyn RemoteConnection>, Arc<anyhow::Error>>>> {
         let connection = self.connections.get(&opts);

crates/remote/src/transport/ssh.rs 🔗

@@ -270,8 +270,6 @@ impl SshRemoteConnection {
     ) -> Result<Self> {
         use askpass::AskPassResult;
 
-        delegate.set_status(Some("Connecting"), cx);
-
         let url = connection_options.ssh_url();
 
         let temp_dir = tempfile::Builder::new()
@@ -285,6 +283,8 @@ impl SshRemoteConnection {
         let mut askpass =
             askpass::AskPassSession::new(cx.background_executor(), askpass_delegate).await?;
 
+        delegate.set_status(Some("Connecting"), cx);
+
         // Start the master SSH process, which does not do anything except for establish
         // the connection and keep it open, allowing other ssh commands to reuse it
         // via a control socket.

crates/remote_server/src/unix.rs 🔗

@@ -988,10 +988,9 @@ fn is_new_version(version: &str) -> bool {
 }
 
 fn is_file_in_use(file_name: &OsStr) -> bool {
-    let info =
-        sysinfo::System::new_with_specifics(sysinfo::RefreshKind::new().with_processes(
-            sysinfo::ProcessRefreshKind::new().with_exe(sysinfo::UpdateKind::Always),
-        ));
+    let info = sysinfo::System::new_with_specifics(sysinfo::RefreshKind::nothing().with_processes(
+        sysinfo::ProcessRefreshKind::nothing().with_exe(sysinfo::UpdateKind::Always),
+    ));
 
     for process in info.processes().values() {
         if process

crates/system_specs/src/system_specs.rs 🔗

@@ -36,7 +36,7 @@ impl SystemSpecs {
         let release_channel = ReleaseChannel::global(cx);
         let os_name = telemetry::os_name();
         let system = System::new_with_specifics(
-            RefreshKind::new().with_memory(MemoryRefreshKind::everything()),
+            RefreshKind::nothing().with_memory(MemoryRefreshKind::everything()),
         );
         let memory = system.total_memory();
         let architecture = env::consts::ARCH;
@@ -79,7 +79,7 @@ impl SystemSpecs {
         let os_name = telemetry::os_name();
         let os_version = telemetry::os_version();
         let system = System::new_with_specifics(
-            RefreshKind::new().with_memory(MemoryRefreshKind::everything()),
+            RefreshKind::nothing().with_memory(MemoryRefreshKind::everything()),
         );
         let memory = system.total_memory();
         let architecture = env::consts::ARCH;

crates/terminal/src/pty_info.rs 🔗

@@ -89,11 +89,11 @@ pub struct PtyProcessInfo {
 
 impl PtyProcessInfo {
     pub fn new(pty: &Pty) -> PtyProcessInfo {
-        let process_refresh_kind = ProcessRefreshKind::new()
+        let process_refresh_kind = ProcessRefreshKind::nothing()
             .with_cmd(UpdateKind::Always)
             .with_cwd(UpdateKind::Always)
             .with_exe(UpdateKind::Always);
-        let refresh_kind = RefreshKind::new().with_processes(process_refresh_kind);
+        let refresh_kind = RefreshKind::nothing().with_processes(process_refresh_kind);
         let system = System::new_with_specifics(refresh_kind);
 
         PtyProcessInfo {
@@ -112,6 +112,7 @@ impl PtyProcessInfo {
         let pid = self.pid_getter.pid()?;
         if self.system.refresh_processes_specifics(
             sysinfo::ProcessesToUpdate::Some(&[pid]),
+            true,
             self.refresh_kind,
         ) == 1
         {

crates/terminal/src/terminal.rs 🔗

@@ -466,16 +466,15 @@ impl TerminalBuilder {
 
         let shell_params = match shell.clone() {
             Shell::System => {
-                #[cfg(target_os = "windows")]
-                {
+                if cfg!(windows) {
                     Some(ShellParams::new(
                         util::shell::get_windows_system_shell(),
                         None,
                         None,
                     ))
+                } else {
+                    None
                 }
-                #[cfg(not(target_os = "windows"))]
-                None
             }
             Shell::Program(program) => Some(ShellParams::new(program, None, None)),
             Shell::WithArguments {

tooling/workspace-hack/Cargo.toml 🔗

@@ -296,7 +296,7 @@ livekit-runtime = { git = "https://github.com/zed-industries/livekit-rust-sdks",
 naga = { version = "25", features = ["msl-out", "wgsl-in"] }
 nix-b73a96c0a5f6a7d9 = { package = "nix", version = "0.29", features = ["fs", "pthread", "signal", "user"] }
 objc2 = { version = "0.6" }
-objc2-core-foundation = { version = "0.3", default-features = false, features = ["CFArray", "CFCGTypes", "CFData", "CFDate", "CFDictionary", "CFRunLoop", "CFString", "CFURL", "objc2", "std"] }
+objc2-core-foundation = { version = "0.3", default-features = false, features = ["CFArray", "CFBase", "CFCGTypes", "CFData", "CFDate", "CFDictionary", "CFError", "CFNumber", "CFPlugInCOM", "CFRunLoop", "CFString", "CFURL", "CFUUID", "objc2", "std"] }
 objc2-foundation = { version = "0.3", default-features = false, features = ["NSArray", "NSAttributedString", "NSBundle", "NSCoder", "NSData", "NSDate", "NSDictionary", "NSEnumerator", "NSError", "NSGeometry", "NSNotification", "NSNull", "NSObjCRuntime", "NSObject", "NSProcessInfo", "NSRange", "NSRunLoop", "NSString", "NSURL", "NSUndoManager", "NSValue", "objc2-core-foundation", "std"] }
 objc2-metal = { version = "0.3" }
 object = { version = "0.36", default-features = false, features = ["archive", "read_core", "unaligned", "write"] }
@@ -326,7 +326,7 @@ livekit-runtime = { git = "https://github.com/zed-industries/livekit-rust-sdks",
 naga = { version = "25", features = ["msl-out", "wgsl-in"] }
 nix-b73a96c0a5f6a7d9 = { package = "nix", version = "0.29", features = ["fs", "pthread", "signal", "user"] }
 objc2 = { version = "0.6" }
-objc2-core-foundation = { version = "0.3", default-features = false, features = ["CFArray", "CFCGTypes", "CFData", "CFDate", "CFDictionary", "CFRunLoop", "CFString", "CFURL", "objc2", "std"] }
+objc2-core-foundation = { version = "0.3", default-features = false, features = ["CFArray", "CFBase", "CFCGTypes", "CFData", "CFDate", "CFDictionary", "CFError", "CFNumber", "CFPlugInCOM", "CFRunLoop", "CFString", "CFURL", "CFUUID", "objc2", "std"] }
 objc2-foundation = { version = "0.3", default-features = false, features = ["NSArray", "NSAttributedString", "NSBundle", "NSCoder", "NSData", "NSDate", "NSDictionary", "NSEnumerator", "NSError", "NSGeometry", "NSNotification", "NSNull", "NSObjCRuntime", "NSObject", "NSProcessInfo", "NSRange", "NSRunLoop", "NSString", "NSURL", "NSUndoManager", "NSValue", "objc2-core-foundation", "std"] }
 objc2-metal = { version = "0.3" }
 object = { version = "0.36", default-features = false, features = ["archive", "read_core", "unaligned", "write"] }
@@ -357,7 +357,7 @@ livekit-runtime = { git = "https://github.com/zed-industries/livekit-rust-sdks",
 naga = { version = "25", features = ["msl-out", "wgsl-in"] }
 nix-b73a96c0a5f6a7d9 = { package = "nix", version = "0.29", features = ["fs", "pthread", "signal", "user"] }
 objc2 = { version = "0.6" }
-objc2-core-foundation = { version = "0.3", default-features = false, features = ["CFArray", "CFCGTypes", "CFData", "CFDate", "CFDictionary", "CFRunLoop", "CFString", "CFURL", "objc2", "std"] }
+objc2-core-foundation = { version = "0.3", default-features = false, features = ["CFArray", "CFBase", "CFCGTypes", "CFData", "CFDate", "CFDictionary", "CFError", "CFNumber", "CFPlugInCOM", "CFRunLoop", "CFString", "CFURL", "CFUUID", "objc2", "std"] }
 objc2-foundation = { version = "0.3", default-features = false, features = ["NSArray", "NSAttributedString", "NSBundle", "NSCoder", "NSData", "NSDate", "NSDictionary", "NSEnumerator", "NSError", "NSGeometry", "NSNotification", "NSNull", "NSObjCRuntime", "NSObject", "NSProcessInfo", "NSRange", "NSRunLoop", "NSString", "NSURL", "NSUndoManager", "NSValue", "objc2-core-foundation", "std"] }
 objc2-metal = { version = "0.3" }
 object = { version = "0.36", default-features = false, features = ["archive", "read_core", "unaligned", "write"] }
@@ -387,7 +387,7 @@ livekit-runtime = { git = "https://github.com/zed-industries/livekit-rust-sdks",
 naga = { version = "25", features = ["msl-out", "wgsl-in"] }
 nix-b73a96c0a5f6a7d9 = { package = "nix", version = "0.29", features = ["fs", "pthread", "signal", "user"] }
 objc2 = { version = "0.6" }
-objc2-core-foundation = { version = "0.3", default-features = false, features = ["CFArray", "CFCGTypes", "CFData", "CFDate", "CFDictionary", "CFRunLoop", "CFString", "CFURL", "objc2", "std"] }
+objc2-core-foundation = { version = "0.3", default-features = false, features = ["CFArray", "CFBase", "CFCGTypes", "CFData", "CFDate", "CFDictionary", "CFError", "CFNumber", "CFPlugInCOM", "CFRunLoop", "CFString", "CFURL", "CFUUID", "objc2", "std"] }
 objc2-foundation = { version = "0.3", default-features = false, features = ["NSArray", "NSAttributedString", "NSBundle", "NSCoder", "NSData", "NSDate", "NSDictionary", "NSEnumerator", "NSError", "NSGeometry", "NSNotification", "NSNull", "NSObjCRuntime", "NSObject", "NSProcessInfo", "NSRange", "NSRunLoop", "NSString", "NSURL", "NSUndoManager", "NSValue", "objc2-core-foundation", "std"] }
 objc2-metal = { version = "0.3" }
 object = { version = "0.36", default-features = false, features = ["archive", "read_core", "unaligned", "write"] }
@@ -609,6 +609,7 @@ tokio-socks = { version = "0.5", features = ["futures-io"] }
 tokio-stream = { version = "0.1", features = ["fs"] }
 tower = { version = "0.5", default-features = false, features = ["timeout", "util"] }
 winapi = { version = "0.3", default-features = false, features = ["cfg", "commapi", "consoleapi", "evntrace", "fileapi", "handleapi", "impl-debug", "impl-default", "in6addr", "inaddr", "ioapiset", "knownfolders", "minwinbase", "minwindef", "namedpipeapi", "ntsecapi", "objbase", "processenv", "processthreadsapi", "shlobj", "std", "synchapi", "sysinfoapi", "timezoneapi", "winbase", "windef", "winerror", "winioctl", "winnt", "winreg", "winsock2", "winuser"] }