Skip to content

build(deps): use the published block crate - #559

Merged
Tryanks merged 1 commit into
mainfrom
build/drop-vendored-block
Sep 30, 2026
Merged

Tryanks merged 1 commit into
mainfrom
build/drop-vendored-block

Conversation

@Tryanks

@Tryanks Tryanks commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Removes vendor/block and the [patch.crates-io] entry that swapped it in.

History

The vendored copy came in with #459 ("Restore paired sessions and Preview after Wi-Fi changes"), unrelated to that PR's subject. block 0.1.6 declares _NSConcreteStackBlock with an uninhabited type, which rustc's uninhabited_static lint says a future Rust will reject. The copy replaced that declaration, spelled out extern "C", and restored the crate's test utilities.

Why it goes

  • Tcode's code never uses block. It reaches the build only transitively, through GPUI's Apple dependencies: cocoa, cocoa-foundation, and core-graphics2 via core-video.
  • The problem is entirely in the upstream crate. Patching it is a fork of a dependency, which Principle 9 rules out. Tcode carries the problem until those dependencies move on.
  • Today the published crate only produces a future-incompatibility report from Cargo ("block v0.1.6 will be rejected by a future version of Rust"). Lints in registry dependencies are capped, so nothing fails, even with -D warnings.

Cargo.lock now takes block 0.1.6 from crates.io; its checksum matches the one recorded in the removed PATCH.md.

Checks run (macOS arm64, rustc 1.98.1)

  • cargo fmt --all --check, cargo clippy --workspace --all-targets --locked -- -D warnings, cargo machete: pass.
  • RUSTFLAGS='-D warnings' cargo check -p tcode-ios --target aarch64-apple-ios-sim --locked: pass. The future-incompatibility report is printed, not an error.
  • cargo nextest run --workspace --locked: 975 passed, 2 failed. The two failures were tcode-traverse transport tests that timed out after 20s; they don't depend on block, and all 8 transport tests pass on rerun.

🤖 Generated with Claude Code

The vendored block 0.1.6 patched an upstream declaration Tcode never
uses: block reaches the build only through GPUI's Cocoa, Core Video and
Metal dependencies. The published crate builds with warnings denied; its
uninhabited extern static shows only as a future-incompatibility report,
which Tcode carries until those dependencies move on.
@Tryanks
Tryanks merged commit 6e7218d into main Sep 30, 2026
7 checks passed
@Tryanks
Tryanks deleted the build/drop-vendored-block branch September 30, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant