Skip to content

Commit 82e165e

Browse files
committed
Fix the duplicate focus_moved_to that broke every non-macOS target
CI has been red since 14:05 and I never looked, because a billing failure made every job die in 2-3 seconds and I read that as infrastructure noise. Making the repo public let the jobs actually run, and they immediately found a real break. `focus_moved_to` had two definitions: one unconditional, one gated `cfg(not(target_os = "macos"))`. On macOS only the first compiled, so everything looked fine locally. On every other target both existed and the build failed with E0428. Nine of the fifteen failing jobs were this one error: all four Linux targets, both Windows targets, the Linux check job, MSRV, and repro. Fixed by keeping the single definition whose BODY is cfg'd, which is the shape the rest of this file already uses. My first attempt gated the definition instead, and scripts/ci-check-cfg.sh correctly rejected it: the call site in pipeline.rs is ungated, so that only moved the breakage. That script caught this locally in seconds. I had run it earlier and it passed, so the regression arrived with the frontmost_app fallback edit and went unnoticed because I stopped re-running it after every change.
1 parent 9f93217 commit 82e165e

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

‎crates/outloud/src/inject.rs‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,13 +1003,6 @@ fn focus_changed(targeted: Option<&str>, current: Option<&str>) -> Option<String
10031003
Some(now.to_string())
10041004
}
10051005

1006-
/// Non-macOS builds have no accessibility layer to ask, so they cannot tell
1007-
/// whether focus moved and must not pretend otherwise.
1008-
#[cfg(not(target_os = "macos"))]
1009-
pub fn focus_moved_to(_targeted: Option<&str>) -> Option<String> {
1010-
None
1011-
}
1012-
10131006
/// Paste `text` at the caret, adding the separating space the join needs.
10141007
///
10151008
/// For destinations that accept neither an AXValue write nor synthetic

0 commit comments

Comments
 (0)