Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,115 changes: 456 additions & 659 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion crates/fbuild-build-arm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tar = { workspace = true }
zip = { workspace = true }
tree-sitter = { workspace = true }
tree-sitter-cpp = { workspace = true }
zccache = { git = "https://github.com/zackees/zccache", rev = "4b13676bb3a76c87d2272b2d9ccb76e821734762" }
zccache = { git = "https://github.com/zackees/zccache", rev = "a16f10e2c3813f0582e0e51eb3b9932c727435f1" }

[dev-dependencies]
filetime = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/fbuild-build-engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tar = { workspace = true }
zip = { workspace = true }
tree-sitter = { workspace = true }
tree-sitter-cpp = { workspace = true }
zccache = { git = "https://github.com/zackees/zccache", rev = "4b13676bb3a76c87d2272b2d9ccb76e821734762" }
zccache = { git = "https://github.com/zackees/zccache", rev = "a16f10e2c3813f0582e0e51eb3b9932c727435f1" }

[dev-dependencies]
filetime = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/fbuild-build-esp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tar = { workspace = true }
zip = { workspace = true }
tree-sitter = { workspace = true }
tree-sitter-cpp = { workspace = true }
zccache = { git = "https://github.com/zackees/zccache", rev = "4b13676bb3a76c87d2272b2d9ccb76e821734762" }
zccache = { git = "https://github.com/zackees/zccache", rev = "a16f10e2c3813f0582e0e51eb3b9932c727435f1" }

[dev-dependencies]
filetime = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/fbuild-build-mcu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tar = { workspace = true }
zip = { workspace = true }
tree-sitter = { workspace = true }
tree-sitter-cpp = { workspace = true }
zccache = { git = "https://github.com/zackees/zccache", rev = "4b13676bb3a76c87d2272b2d9ccb76e821734762" }
zccache = { git = "https://github.com/zackees/zccache", rev = "a16f10e2c3813f0582e0e51eb3b9932c727435f1" }

[dev-dependencies]
filetime = { workspace = true }
Expand Down
10 changes: 4 additions & 6 deletions crates/fbuild-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ tree-sitter-cpp = { workspace = true }
# child processes) was deleted in the same PR; there is no
# `--no-default-features` escape hatch.
#
# Pinned at zccache 1.12.14 (`4b13676`, the same revision soldr's
# `_vender/zccache` submodule uses). Bumps 1.12.11 -> 1.12.14 to pick
# up the embedded-path fixes: #950 (journal compile outcomes on the
# embedded path), #955/#957/#958 (daemon-deadlock/full-codegen fix +
# `run_cpu_blocking`), and #948 (mimalloc as sole allocator).
zccache = { git = "https://github.com/zackees/zccache", rev = "4b13676bb3a76c87d2272b2d9ccb76e821734762" }
# Pinned at zccache 1.12.17 (`a16f10e`), matching soldr's
# `_vender/zccache` submodule so both embedded services speak the same
# shared-broker protocol.
zccache = { git = "https://github.com/zackees/zccache", rev = "a16f10e2c3813f0582e0e51eb3b9932c727435f1" }

[dev-dependencies]
filetime = { workspace = true }
Expand Down
19 changes: 15 additions & 4 deletions crates/fbuild-cli/src/cli/clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

use crate::daemon_client::{self, BuildRequest, DaemonClient};
use crate::output;
use fbuild_core::process_identity::{pid_exe_stem_matches, pid_is_alive, terminate_pid, wait_for_pid_exit};
use fbuild_core::process_identity::{
pid_exe_stem_matches, pid_is_alive, terminate_pid, wait_for_pid_exit,
};
use fbuild_paths::daemon_ownership::{self, DAEMON_EXE_STEM, RootOwnershipGuard, SpawnLockGuard};
use std::future::Future;
use std::io;
Expand Down Expand Up @@ -323,7 +325,10 @@ fn should_signal_legacy_pid(is_alive: bool, exe_stem_matches: bool) -> bool {
}

async fn terminate_legacy_pid_if_verified(pid: u32) {
let verified = should_signal_legacy_pid(pid_is_alive(pid), pid_exe_stem_matches(pid, DAEMON_EXE_STEM));
let verified = should_signal_legacy_pid(
pid_is_alive(pid),
pid_exe_stem_matches(pid, DAEMON_EXE_STEM),
);
if !verified {
return;
}
Expand Down Expand Up @@ -547,7 +552,10 @@ mod tests {
parse_status_json_daemon_pid(r#"{"daemon_pid": 4321}"#),
Some(4321)
);
assert_eq!(parse_status_json_daemon_pid(r#"{"daemon_pid": null}"#), None);
assert_eq!(
parse_status_json_daemon_pid(r#"{"daemon_pid": null}"#),
None
);
assert_eq!(parse_status_json_daemon_pid(r#"{}"#), None);
assert_eq!(parse_status_json_daemon_pid("not json"), None);
}
Expand All @@ -570,7 +578,10 @@ mod tests {
fn recycled_or_unrelated_pid_is_never_signalled() {
let own_pid = std::process::id();
assert!(pid_is_alive(own_pid));
assert!(!pid_exe_stem_matches(own_pid, "definitely-not-fbuild-daemon"));
assert!(!pid_exe_stem_matches(
own_pid,
"definitely-not-fbuild-daemon"
));
assert!(!should_signal_legacy_pid(
pid_is_alive(own_pid),
pid_exe_stem_matches(own_pid, "definitely-not-fbuild-daemon")
Expand Down
1 change: 1 addition & 0 deletions crates/fbuild-core/src/process_identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ pub fn pid_executable_path(pid: u32) -> Option<PathBuf> {

#[cfg(all(unix, not(target_os = "linux")))]
pub fn pid_executable_path(pid: u32) -> Option<PathBuf> {
// allow-direct-spawn: portable BSD/macOS `ps` fallback; this module resolves process identity.
let output = std::process::Command::new("/bin/ps")
.args(["-p", &pid.to_string(), "-o", "comm="])
.output()
Expand Down
1 change: 1 addition & 0 deletions crates/fbuild-paths/src/daemon_ownership.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ mod tests {
let path = temp.path().join("root-owner.lock");

let run_probe = |expected: &str| {
// allow-direct-spawn: test helper re-executes this test binary to model another process.
let output = std::process::Command::new(std::env::current_exe().unwrap())
.args([
"--ignored",
Expand Down
4 changes: 2 additions & 2 deletions crates/fbuild-serial/src/ports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ mod imp {
use serialport::{SerialPortInfo, SerialPortType, UsbPortInfo};
use windows_sys::Win32::Devices::DeviceAndDriverInstallation::{
CM_Get_DevNode_Status, CM_Get_Device_IDW, CM_Get_Parent, CR_NO_SUCH_DEVINST, CR_SUCCESS,
DICS_FLAG_GLOBAL, DIGCF_ALLCLASSES, DIGCF_PRESENT, DIREG_DEV, HDEVINFO,
MAX_DEVICE_ID_LEN, SP_DEVINFO_DATA, SPDRP_CLASS, SPDRP_FRIENDLYNAME, SPDRP_HARDWAREID,
DICS_FLAG_GLOBAL, DIGCF_ALLCLASSES, DIGCF_PRESENT, DIREG_DEV, HDEVINFO, MAX_DEVICE_ID_LEN,
SP_DEVINFO_DATA, SPDRP_CLASS, SPDRP_FRIENDLYNAME, SPDRP_HARDWAREID,
SPDRP_LOCATION_INFORMATION, SPDRP_MFG, SetupDiClassGuidsFromNameW,
SetupDiDestroyDeviceInfoList, SetupDiEnumDeviceInfo, SetupDiGetClassDevsW,
SetupDiGetDeviceInstanceIdW, SetupDiGetDeviceRegistryPropertyW, SetupDiOpenDevRegKey,
Expand Down
Loading