diff --git a/Cargo.lock b/Cargo.lock index 351ca9422..2e83f3370 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -779,9 +779,9 @@ dependencies = [ [[package]] name = "ctor" -version = "1.0.1" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7335955a5f85f95f3188623240e081e7b2059a8ad1bae68944b7cfdd718fb10" +checksum = "2d83cb7e7a873830708d6b02a78cd36a592c6fa14bf267b68725103b85c0d77f" dependencies = [ "link-section", "linktime-proc-macro", @@ -1908,15 +1908,15 @@ dependencies = [ [[package]] name = "link-section" -version = "0.13.1" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2c24837c4fd5ab6a31d64133eae954f5199247523cf29586117e85245c0dd3" +checksum = "5ee1a0d6e252afe82e7bc2db42fba60e02ddf3b1accaf8cb21d96e34ba61f3d4" [[package]] name = "linktime-proc-macro" -version = "0.1.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44cd706ff0d503ee32b2071166510ca27e281228de10cd3aa8d35ff94560f81" +checksum = "348d0075b1fc163b26d72a7f75fc5141daf2fd1bdf128d873cbaf6785d495bdf" [[package]] name = "linux-raw-sys" diff --git a/crates/fspy/src/windows/mod.rs b/crates/fspy/src/windows/mod.rs index 8081e1298..71a44739d 100644 --- a/crates/fspy/src/windows/mod.rs +++ b/crates/fspy/src/windows/mod.rs @@ -66,8 +66,15 @@ impl SpyImpl { Ok(Self { ansi_dll_path_with_nul: ansi_dll_path_with_nul.into() }) } - #[expect(clippy::unused_async, reason = "async signature required by SpyImpl trait")] - pub(crate) async fn spawn( + pub(crate) fn spawn( + &self, + command: Command, + cancellation_token: CancellationToken, + ) -> std::future::Ready> { + std::future::ready(self.spawn_inner(command, cancellation_token)) + } + + fn spawn_inner( &self, mut command: Command, cancellation_token: CancellationToken, diff --git a/crates/fspy_benchmark/src/main.rs b/crates/fspy_benchmark/src/main.rs index c4567104a..91a899e1e 100644 --- a/crates/fspy_benchmark/src/main.rs +++ b/crates/fspy_benchmark/src/main.rs @@ -198,7 +198,7 @@ fn sorted(values: impl Iterator) -> Vec { values } -fn quantile(sorted: &[f64], numerator: usize, denominator: usize) -> f64 { +const fn quantile(sorted: &[f64], numerator: usize, denominator: usize) -> f64 { sorted[sorted.len() * numerator / denominator] } diff --git a/crates/fspy_preload_unix/src/lib.rs b/crates/fspy_preload_unix/src/lib.rs index 42bf9e9cb..6c4e10b3e 100644 --- a/crates/fspy_preload_unix/src/lib.rs +++ b/crates/fspy_preload_unix/src/lib.rs @@ -1,7 +1,5 @@ // Compile as an empty crate on non-unix targets and on musl (where seccomp -// alone handles access tracking). Guarding the feature gate keeps rustc from -// warning about unused features on those targets. -#![cfg_attr(all(unix, not(target_env = "musl")), feature(c_variadic))] +// alone handles access tracking). #[cfg(all(unix, not(target_env = "musl")))] mod client; diff --git a/crates/fspy_preload_unix/src/macros/linux.rs b/crates/fspy_preload_unix/src/macros/linux.rs index 72881d62a..20cca08c8 100644 --- a/crates/fspy_preload_unix/src/macros/linux.rs +++ b/crates/fspy_preload_unix/src/macros/linux.rs @@ -10,7 +10,15 @@ macro_rules! intercept { } } #[cfg(not(test))] // Don't interpose on the test binary + #[expect( + clippy::allow_attributes, + reason = "runtime symbol lint applies only to compiler-known libc symbols" + )] const _: () = { + #[allow( + invalid_runtime_symbol_definitions, + reason = "naked assembly trampoline forwards the original ABI without a Rust signature" + )] #[unsafe(naked)] #[unsafe(export_name = ::core::concat!(::core::stringify!($name), 64))] pub unsafe extern "C" fn interpose_fn() { @@ -55,7 +63,15 @@ macro_rules! intercept_inner { const _: $fn_sig = $crate::libc::$name; #[cfg(not(test))] // Don't interpose on the test binary + #[expect( + clippy::allow_attributes, + reason = "runtime symbol lint applies only to compiler-known libc symbols" + )] const _: () = { + #[allow( + invalid_runtime_symbol_definitions, + reason = "naked assembly trampoline forwards the original ABI without a Rust signature" + )] #[unsafe(naked)] #[unsafe(export_name = ::core::stringify!($name))] pub unsafe extern "C" fn interpose_fn() { diff --git a/crates/fspy_shared/src/ipc/channel/shm_io.rs b/crates/fspy_shared/src/ipc/channel/shm_io.rs index 62d927cd5..a36d5e0f6 100644 --- a/crates/fspy_shared/src/ipc/channel/shm_io.rs +++ b/crates/fspy_shared/src/ipc/channel/shm_io.rs @@ -170,7 +170,7 @@ impl ShmWriter { // Try to atomically claim the space // Different writers only share the header, not each other's content. so relaxed ordering is sufficient. let current_end = - atomic_header.fetch_update(Ordering::Relaxed, Ordering::Relaxed, |current_end| { + atomic_header.try_update(Ordering::Relaxed, Ordering::Relaxed, |current_end| { let new_end = roundup_to_align_frame_header(current_end + frame_with_header_size); // Check if we have enough space @@ -193,14 +193,14 @@ impl ShmWriter { // Successfully claimed the space, now write the data - // SAFETY: The atomic fetch_update above guaranteed that `size_of::() + current_end` + // SAFETY: The atomic try_update above guaranteed that `size_of::() + current_end` // is within the shared memory bounds, so this pointer arithmetic stays within the allocation. let frame_start = unsafe { shm_ptr.add(/* shm header */ size_of::() + current_end) }; // SAFETY: `frame_start` is properly aligned to `i32` (ensured by `roundup_to_align_frame_header`) - // and points within the shared memory allocation (bounds checked by the atomic fetch_update). + // and points within the shared memory allocation (bounds checked by the atomic try_update). let frame_header = unsafe { AtomicI32::from_ptr(frame_start.cast()) }; // Mark as partially written with positive size diff --git a/crates/preload_test_lib/src/lib.rs b/crates/preload_test_lib/src/lib.rs index 6b6dbdc9c..50afcc3b6 100644 --- a/crates/preload_test_lib/src/lib.rs +++ b/crates/preload_test_lib/src/lib.rs @@ -12,7 +12,6 @@ //! `dlsym(RTLD_NEXT, …)`, so fspy still sees the real accesses and can //! track them as cache inputs. #![cfg(target_os = "linux")] -#![feature(c_variadic)] use std::{ ffi::{CStr, c_char, c_int}, diff --git a/crates/vite_powershell/src/lib.rs b/crates/vite_powershell/src/lib.rs index 2819cdf35..739214818 100644 --- a/crates/vite_powershell/src/lib.rs +++ b/crates/vite_powershell/src/lib.rs @@ -27,10 +27,11 @@ use vite_path::{AbsolutePath, AbsolutePathBuf}; pub const POWERSHELL_PREFIX: &[&str] = &["-NoProfile", "-NoLogo", "-ExecutionPolicy", "Bypass", "-File"]; -/// Cached location of the `PowerShell` host. Prefers cross-platform -/// `pwsh.exe` when present, falling back to the Windows built-in -/// `powershell.exe`. Returns `None` on non-Windows or when neither host -/// is on `PATH`. +/// Cached location of the `PowerShell` host. +/// +/// Prefers cross-platform `pwsh.exe` when present, falling back to the +/// Windows built-in `powershell.exe`. Returns `None` on non-Windows or when +/// neither host is on `PATH`. /// /// Cached as `Arc` so callers that want shared ownership /// (e.g. `vite_task_plan`'s plan-time rewrite) can do `Arc::clone(host)` diff --git a/crates/vite_task/src/session/execute/fingerprint.rs b/crates/vite_task/src/session/execute/fingerprint.rs index 11173d40e..4c5ea2d1d 100644 --- a/crates/vite_task/src/session/execute/fingerprint.rs +++ b/crates/vite_task/src/session/execute/fingerprint.rs @@ -381,7 +381,7 @@ fn determine_folder_change_kind<'a>( } /// Check if a directory entry should be ignored in fingerprinting -fn should_ignore_entry(name: &[u8]) -> bool { +const fn should_ignore_entry(name: &[u8]) -> bool { matches!(name, b"." | b".." | b".DS_Store") || name.eq_ignore_ascii_case(b"dist") } diff --git a/crates/vite_task_graph/src/lib.rs b/crates/vite_task_graph/src/lib.rs index 72dc950ac..38bc239c1 100644 --- a/crates/vite_task_graph/src/lib.rs +++ b/crates/vite_task_graph/src/lib.rs @@ -118,7 +118,7 @@ pub enum TaskGraphLoadError { specifier: Str, task_display: TaskDisplay, #[source] - error: SpecifierLookupError, + error: Box, }, #[error("`cache` can only be set in the workspace root config, but found in {package_path}")] @@ -434,7 +434,7 @@ impl IndexedTaskGraph { ) .map_err(|error| { TaskGraphLoadError::DependencySpecifierLookupError { - error, + error: Box::new(error), specifier: specifier.clone(), task_display: me.display_task(from_node_index), } diff --git a/crates/vite_task_plan/src/lib.rs b/crates/vite_task_plan/src/lib.rs index 512f1c87b..83353b6e0 100644 --- a/crates/vite_task_plan/src/lib.rs +++ b/crates/vite_task_plan/src/lib.rs @@ -251,7 +251,6 @@ const fn resolve_cache_with_override( /// # Errors /// Returns an error if the program is not found or path fingerprinting fails. #[tracing::instrument(level = "debug", skip_all)] -#[expect(clippy::result_large_err, reason = "Error is large for diagnostics")] pub fn plan_synthetic( workspace_path: &Arc, cwd: &Arc, diff --git a/crates/vite_task_plan/src/plan.rs b/crates/vite_task_plan/src/plan.rs index c6e8c430a..674679076 100644 --- a/crates/vite_task_plan/src/plan.rs +++ b/crates/vite_task_plan/src/plan.rs @@ -461,7 +461,6 @@ pub enum ParentCacheConfig { /// env config and merges in any additional envs the synthetic command needs. /// - If there is no parent (top-level invocation), the synthetic task's own /// [`UserCacheConfig`] is resolved with defaults. -#[expect(clippy::result_large_err, reason = "Error is large for diagnostics")] fn resolve_synthetic_cache_config( parent: ParentCacheConfig, synthetic_cache_config: UserCacheConfig, @@ -542,7 +541,6 @@ fn resolve_synthetic_cache_config( } } -#[expect(clippy::result_large_err, reason = "Error is large for diagnostics")] pub fn plan_synthetic_request( workspace_path: &Arc, prefix_envs: &BTreeMap, @@ -594,7 +592,6 @@ fn strip_prefix_for_cache( } } -#[expect(clippy::result_large_err, reason = "Error is large for diagnostics")] #[expect( clippy::needless_pass_by_value, reason = "program_path ownership is needed for Arc construction" @@ -901,7 +898,6 @@ pub async fn plan_query_request( /// /// Returns `Ok(None)` if the variable is not set. /// Returns `Err` if the variable is set but cannot be parsed as a positive integer. -#[expect(clippy::result_large_err, reason = "Error type is shared across all plan functions")] fn concurrency_limit_from_env( envs: &FxHashMap, Arc>, ) -> Result, Error> { diff --git a/crates/vite_tui/src/app.rs b/crates/vite_tui/src/app.rs index 31b328208..2defe2131 100644 --- a/crates/vite_tui/src/app.rs +++ b/crates/vite_tui/src/app.rs @@ -227,7 +227,7 @@ impl App { } match action { Action::Tick => { - self.last_tick_key_events.drain(..); + self.last_tick_key_events.clear(); } Action::Quit => self.should_quit = true, Action::Suspend => self.should_suspend = true, diff --git a/rust-toolchain.toml b/rust-toolchain.toml index c42b17fcc..bdd8f8fc8 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -2,5 +2,5 @@ # Needed nightly features: # - cargo `Z-bindeps` to build and embed preload shared libraries as dependencies of fspy # - `windows_process_extensions_main_thread_handle` to get the main thread handle for Detours injection -channel = "nightly-2026-06-07" +channel = "nightly-2026-08-02" profile = "default"