Skip to content

Remove redb::io, and make the Io error variants require std - #1638

Merged
cberner merged 1 commit into
masterfrom
claude/sweet-hypatia-m4vct7-remove-io
Nov 8, 2026
Merged

cberner merged 1 commit into
masterfrom
claude/sweet-hypatia-m4vct7-remove-io

Conversation

@cberner

@cberner cberner commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Step 3 of 3: removes redb::io, following #1636 and #1637 (both merged). Rebased onto master; the tree is unchanged.

  • Io variants are std-only. The Io variants of BackendError, StorageError and Error, and their From<std::io::Error> / From<BackendError> for std::io::Error impls, now exist only with std (cfg(not(redb_no_std))). They hold std::io::Error directly. All three enums are #[non_exhaustive], so a variant that appears when another crate turns on std can't break a downstream match. Without experimental-api-5, std is always on, so 4.x users see no change.
  • src/io.rs is deleted, along with the stand-in io::Error and its tests. Without std, a backend reports failures with BackendError::Other (from Add BackendError::Other for backend failures that are not I/O errors #1637).
  • The invalid_input/invalid_data helpers are now crate-private constructors on BackendError. With std they build the same io::Error kinds as before; without std the kind is dropped, as it was before.
  • The no_std regression crate now also runs a backend whose sync_data returns BackendError::Other, and checks that create_with_backend reports it as StorageError::Backend.
  • README and CHANGELOG no_std notes are updated.

After this, the remaining flag-removal work for this area is mechanical: replace the BackendIoError alias from #1636 with BackendError and drop its useless_conversion allows.

Checked:

  • cargo fmt.
  • clippy --all --all-targets, with and without --all-features, on Linux, Windows and macOS.
  • clippy for thumbv7em (no_std), with and without logging.
  • cargo check for wasm32-unknown-unknown (3 feature sets) and wasm32-wasip1.
  • cargo doc.
  • cargo test --all-features, and cargo test with default features.
  • The no_std regression crate.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ALhxet6NP69dCfAUv8TAhR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T21:27:34.965710Z b0c1fbc New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cberner
cberner force-pushed the claude/sweet-hypatia-m4vct7-backend-error-other branch from 65fe436 to 054f88b Compare November 8, 2026 19:49
@cberner
cberner force-pushed the claude/sweet-hypatia-m4vct7-remove-io branch from 4550996 to 50d0567 Compare November 8, 2026 19:49
Base automatically changed from claude/sweet-hypatia-m4vct7-backend-error-other to master November 8, 2026 21:26
Without std, redb exposed a stand-in io::Error so that BackendError::Io
had something to hold. Now that BackendError::Other can carry any error,
the Io variants of BackendError, StorageError and Error, and their
io::Error conversions, exist only with std and hold std::io::Error
directly. The stand-in and the redb::io module are removed. All three
enums are non_exhaustive, so the extra variant with std cannot break a
downstream match.

The no_std regression crate also checks that a backend's Other error
reaches the caller.

Assisted-by: Claude Code
Claude-Session: https://claude.ai/code/session_01ALhxet6NP69dCfAUv8TAhR
@cberner
cberner force-pushed the claude/sweet-hypatia-m4vct7-remove-io branch from 50d0567 to b0c1fbc Compare November 8, 2026 21:26
@cberner
cberner merged commit 337dbeb into master Nov 8, 2026
5 checks passed
@cberner
cberner deleted the claude/sweet-hypatia-m4vct7-remove-io branch November 8, 2026 21:37
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