Skip to content

refactor!: remove madsim support and runtime adapter - #1368

Open
MrCroxx wants to merge 1 commit into
mainfrom
codex/remove-madsim
Open

MrCroxx wants to merge 1 commit into
mainfrom
codex/remove-madsim

Conversation

@MrCroxx

@MrCroxx MrCroxx commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Foyer now depends directly on upstream Tokio. Remove the simulation runtime dependency, the foyer-tokio adapter crate, runtime-selection features, conditional compilation, CI job, xtask command, and related changelog references.

Breaking change: remove runtime-tokio and runtime-madsim-tokio. Consumers should remove these feature selections; Tokio is used automatically, including with default-features = false.

Validation:

  • Default and no-default-features workspace nextest runs with strict_assertions: 113 passed and 1 skipped each.
  • Workspace doctests: 4 passed.
  • Clippy across all workspace targets with strict assertions, serde, tracing, clap, and deadlock; tokio-console checked separately.
  • Rust 1.91.0 minimum-version check for foyer without default features; isolated checks for common, memory, and storage crates.
  • Stable/nightly formatting, TOML formatting, typos, cargo-machete, and license headers.
  • Repository and resolved dependency graph checked for remaining simulation/runtime-adapter references.

The benchmark's existing tracing and tokio-console setup functions cannot be enabled together, so those configurations were checked separately as in CI.

Downstream simulation compatibility: RisingWave currently locks foyer 0.22.3 and enables runtime-madsim-tokio. Its existing locked build is unaffected, but migrating to this change requires a downstream simulation adapter. Removing the feature selection alone leaves foyer using real Tokio: a focused test reproduced Spawner::current() panicking inside a madsim runtime. A crates.io patch alias cannot replace the tokio package with madsim-tokio; a same-name forwarding shim also creates a dependency cycle because madsim itself depends on Tokio. The pinned madsim runtime additionally lacks shutdown_background(), which foyer now calls unconditionally.

Signed-off-by: MrCroxx <mrcroxx.cs@gmail.com>
@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
foyer-common/src/spawn.rs 74.00% <ø> (ø)
foyer-storage/src/io/engine/mod.rs 95.71% <ø> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
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