Enable unreachable_pub lint in the scheduler - #1141
Open
56steve wants to merge 1 commit into
Open
Conversation
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.
Contributor
There was a problem hiding this comment.
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.
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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Enables the
rust.unreachable_publint for thewasefire-schedulercrate:schedulerfrom theunreachable_pubexclusion list inscripts/sync.sh.rust.unreachable_pub = "warn"tocrates/scheduler/Cargo.toml(matching the orderingsync.shgenerates).pub(crate)across thecall,event,applet,perf, andprotocolmodules. The crate's public API (lib.rs) is unchanged.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.shon host:cargo check --libfor: hostwasm,std,log;i686-unknown-linux-gnunative,std(,log);thumbv7em-none-eabiwasm/pulley/native, each with and withoutdefmt— all report zerounreachable_pubwarnings.cargo test --lib --features=_test,full-api,wasm,stdpasses.cargo clippyandcargo fmt --checkpass.Note: the full Linux CI suite (
scripts/ci.sh) was not run locally.