Skip to content

Enable unreachable_pub lint in the scheduler - #1141

Open
56steve wants to merge 1 commit into
google:mainfrom
56steve:enable-unreachable-pub-scheduler
Open

Enable unreachable_pub lint in the scheduler#1141
56steve wants to merge 1 commit into
google:mainfrom
56steve:enable-unreachable-pub-scheduler

Conversation

@56steve

@56steve 56steve commented Aug 27, 2026

Copy link
Copy Markdown

What

Enables the rust.unreachable_pub lint for the wasefire-scheduler crate:

  • Removes scheduler from the unreachable_pub exclusion list in scripts/sync.sh.
  • Adds rust.unreachable_pub = "warn" to crates/scheduler/Cargo.toml (matching the ordering sync.sh generates).
  • Restricts crate-internal items to pub(crate) across the call, event, applet, perf, and protocol modules. The crate's public API (lib.rs) is unchanged.
  • Adds a CHANGELOG entry.

Why

Continues the incremental work of #565 ("Fix all lints currently disabled in scripts/sync.sh"), following #1139 which enabled the same lint for the interpreter.

Verification

Ran the full feature/target matrix from crates/scheduler/test.sh on host:

  • cargo check --lib for: host wasm,std,log; i686-unknown-linux-gnu native,std(,log); thumbv7em-none-eabi wasm/pulley/native, each with and without defmtall report zero unreachable_pub warnings.
  • cargo test --lib --features=_test,full-api,wasm,std passes.
  • cargo clippy and cargo fmt --check pass.

Note: the full Linux CI suite (scripts/ci.sh) was not run locally.

Removes the scheduler from the unreachable_pub exclusion list in
scripts/sync.sh, adds the lint to crates/scheduler/Cargo.toml, and
restricts crate-internal items to pub(crate). The crate's public API
(lib.rs) is unchanged.

Continues the incremental work of google#565, following google#1139 (interpreter).

Verified on host: cargo check across all feature/target combinations from
crates/scheduler/test.sh (host wasm/std, i686 native, and thumbv7em
wasm/pulley/native with and without defmt) reports zero unreachable_pub
warnings; cargo test --lib, cargo clippy, and cargo fmt --check pass.
@56steve
56steve requested a review from ia0 as a code owner August 27, 2026 13:10

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enables the unreachable_pub lint for the scheduler crate. It updates the configuration in Cargo.toml and scripts/sync.sh, documents the change in CHANGELOG.md, and refactors numerous public items across the scheduler codebase to use restricted visibility (such as pub(crate) or pub(super)) where appropriate. There are no review comments, and I have no additional feedback to provide.

@ia0

ia0 commented Aug 27, 2026

Copy link
Copy Markdown
Member

By the way, thanks for the PRs. I'm currently on vacation, but will review them when I'm back (some time end of next week).

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.

2 participants