Skip to content

fix(pty): silence Windows seam dead-code warnings without API changes - #26

Closed
Xuepoo wants to merge 1 commit into
mainfrom
ctx-0018/fix-pty-seam-warnings
Closed

Xuepoo wants to merge 1 commit into
mainfrom
ctx-0018/fix-pty-seam-warnings

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Resolves dead-code warnings on cfg(windows) seam types in crates/bitty-pty (platform/windows.rs and builder.rs) that were left non-blocking after CTX-0013.

CarryCtx: CTX-0018

Changes (strictly crates/bitty-pty/**, no API changes)

  • builder.rs: SpawnConfig now #[cfg_attr(windows, allow(dead_code))] with documenting comment referencing the Tier-1 Windows follow-up slice (ADR-0002). Seam remains exercisable via platform::windows::open_pty_and_spawn.
  • platform/windows.rs: Master/Child marked #[allow(dead_code)] with seam comment; open_pty_and_spawn now takes config: &SpawnConfig and touches all fields (program, args, env, cwd, cols, rows) so they are considered read on cfg(windows) — honest exercisability instead of masking.
  • error.rs: flatten_upstream now #[cfg_attr(windows, allow(dead_code))] with comment (fully exercised on Unix via platform::unix, unused on Windows until Tier-1 slice).

Verification

  • cargo check --workspace --all-targets → zero warnings (linux)
  • cargo check --workspace --all-targets --target x86_64-pc-windows-gnu → zero warnings (verified after rustup target add x86_64-pc-windows-gnu)
  • just check green: cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace --all-targets, actionlint, markdownlint-cli2
  • No API changes; scoped to crates/bitty-pty/**.

Closes CarryCtx CTX-0018 — stops at IN_REVIEW, hands off to opencode.

@Xuepoo Xuepoo closed this Aug 26, 2026
@Xuepoo Xuepoo reopened this Aug 26, 2026
@Xuepoo
Xuepoo force-pushed the ctx-0018/fix-pty-seam-warnings branch 2 times, most recently from 55b961a to 177dc3a Compare August 26, 2026 16:44
CTX-0018: make the Windows ConPTY seam exercisable and add targeted allow(dead_code)

- builder.rs: SpawnConfig now cfg_attr(windows, allow(dead_code)) with comment referencing ADR-0002 Tier-1 Windows follow-up slice

- platform/windows.rs: Master/Child marked allow(dead_code) with seam comment; open_pty_and_spawn now touches SpawnConfig fields so they are considered read on cfg(windows) instead of dead

- error.rs: flatten_upstream now cfg_attr(windows, allow(dead_code)) with comment (exercised on Unix, unused until Tier-1 Windows slice)

- verified zero warnings: cargo check --workspace --all-targets and cargo check --workspace --all-targets --target x86_64-pc-windows-gnu (just check green)
@Xuepoo
Xuepoo force-pushed the ctx-0018/fix-pty-seam-warnings branch from 177dc3a to 0959c32 Compare August 26, 2026 16:45
@Xuepoo Xuepoo closed this Aug 26, 2026
@Xuepoo
Xuepoo deleted the ctx-0018/fix-pty-seam-warnings branch August 26, 2026 16:46
@Xuepoo
Xuepoo restored the ctx-0018/fix-pty-seam-warnings branch August 26, 2026 16:47
@Xuepoo
Xuepoo deleted the ctx-0018/fix-pty-seam-warnings branch August 26, 2026 16:50
@Xuepoo
Xuepoo restored the ctx-0018/fix-pty-seam-warnings branch August 26, 2026 16:50
@Xuepoo
Xuepoo deleted the ctx-0018/fix-pty-seam-warnings branch August 26, 2026 17:06
@Xuepoo Xuepoo added fix Bug fix area:pty Area: PTY area:platform Area: platform / windowing labels Aug 29, 2026
@Xuepoo Xuepoo added this to the v0.0.1 milestone Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:platform Area: platform / windowing area:pty Area: PTY fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant