From 5fa953eddded2448b6b90a36e29ee57d41ba4cc7 Mon Sep 17 00:00:00 2001 From: Vladislav Kuzmin <67874880+principalwater@users.noreply.github.com> Date: Fri, 27 Nov 2026 01:06:41 +0300 Subject: [PATCH] fix(ci): scope Unix-only integration test declarations for Windows Clippy (#6259) Windows Clippy (-D warnings) built two integration-test declarations whose only users are Unix-only tests: tsc_errors in language_smoke.rs (used by the TypeScript project-errors test) and the file-level Duration import in plugin_workbench.rs (used by the PTY run-output test). Scope tsc_errors to unix and move the import into the Unix-only test. Fixes #6258 Co-authored-by: principalwater <67874880+principalwater@users.noreply.github.com> --- crates/ide-host/tests/language_smoke.rs | 1 + crates/ide-host/tests/plugin_workbench.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ide-host/tests/language_smoke.rs b/crates/ide-host/tests/language_smoke.rs index 903cdaef3b..ba52c2a213 100644 --- a/crates/ide-host/tests/language_smoke.rs +++ b/crates/ide-host/tests/language_smoke.rs @@ -697,6 +697,7 @@ async fn typescript() { } /// The latest `tsc` diagnostics of `path` (Problems › TypeScript Project Errors), `None` before any. +#[cfg(unix)] fn tsc_errors(events: &Events, path: &Path) -> Option> { events.lock().unwrap().iter().rev().find_map(|e| match e { IdeEvent::Diagnostics { path: p, source, items } if source == "tsc" && **p == *path => { diff --git a/crates/ide-host/tests/plugin_workbench.rs b/crates/ide-host/tests/plugin_workbench.rs index 74496ba8ca..740241431b 100644 --- a/crates/ide-host/tests/plugin_workbench.rs +++ b/crates/ide-host/tests/plugin_workbench.rs @@ -6,7 +6,6 @@ use ide_host::{Host, HostConfig}; use ide_plugin::TextQuery; use std::path::PathBuf; use std::sync::Arc; -use std::time::Duration; struct Harness { host: Arc, @@ -510,6 +509,7 @@ async fn plugin_run_output_mode_executes_pty_and_pipes_with_input_exit_and_stop( use ide_host::plugins::{Consent, PluginEvent, PluginHost, WindowRequest}; use ide_plugin::{Invocation, Limits}; use std::os::unix::fs::PermissionsExt; + use std::time::Duration; let f = Harness::new(); f.host.set_project_trust(&f.root, true, false).await.unwrap();