Repository navigation
chore: 0.2.0 publish prep — package hygiene and loom as a dev-dependency - #7
Merged
Merged
Conversation
The 0.2.0 section was dated 2026-06-12, when the work was authored. The release ships today, and that date travels inside the published tarball.
Both are contributor-workflow files with no meaning to a consumer of the crate. 28 files -> 26.
…he lib As a `[target.'cfg(loom)'.dependencies]` entry, loom was resolved into the lockfile of every crate depending on rt-ring: 30 extra packages (loom, generator, the tracing-subscriber tree, cc, windows-sys). None were ever compiled — the cfg is never set downstream — but they were recorded and fetched by cargo fetch, cargo vendor, and offline mirrors, which is a poor showing for a crate whose selling point is having no runtime dependencies. A downstream lockfile goes from 32 packages to 2. Dev-dependencies don't propagate, but they also aren't linkable from the plainly-compiled library, and sync.rs needs loom::sync::atomic in the library itself. Unit tests are the exception: there the lib is compiled with --test, where dev-deps resolve. So the loom tests move from tests/ into src/loom_tests/. This is the arrangement tokio uses for the same reason. Costs, both accepted: non-test builds under --cfg loom (cargo build, cargo clippy --lib) no longer resolve, and the loom runner is now cargo test --lib. CI is unaffected — the clippy job doesn't set the cfg.
hasanzakeri
added a commit
that referenced
this pull request
Oct 8, 2026
chore: 0.2.0 publish prep — package hygiene and loom as a dev-dependency
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.
Pre-publish cleanup for 0.2.0, found while reviewing
cargo publish --dry-run.Three independent changes, one per commit.
1.
docs(changelog)— date 0.2.0 to its actual release dateThe section was dated 2026-06-12, when the work was authored. The release ships today, and that date travels inside the published tarball.
2.
chore(package)— keepMakefileand.gitignoreout of the crateContributor-workflow files with no meaning to a consumer. Packaged file count 28 → 26.
3.
refactor(loom)— makelooma dev-dependencyThe substantive one. As a
[target.'cfg(loom)'.dependencies]entry, loom was resolved into the lockfile of every crate depending on rt-ring. Measured with a throwaway crate depending on rt-ring:Cargo.lockgenerator, thetracing-subscribertree,cc,windows-sys, …rt-ringNone of those were ever compiled —
cfg(loom)is never set downstream — but they were recorded and fetched bycargo fetch,cargo vendor, and offline CI mirrors. Poor showing for a crate whose selling point is having no runtime dependencies; the README's claim is now literally true in a consumer's lockfile.Dev-dependencies don't propagate to consumers. They also aren't linkable from the plainly-compiled library, and
sync.rsneedsloom::sync::atomicin the library itself. Unit tests are the exception — there the lib is compiled with--test, where dev-deps resolve — so the loom tests move fromtests/intosrc/loom_tests/. This is the arrangement tokio uses, for the same reason.Git tracked both files as renames, so the move reviews as a diff.
Accepted cost: non-test builds under
--cfg loom(cargo build,cargo clippy --lib) no longer resolve — off the--testcompilation there is no loom to link, failing withE0433atsrc/sync.rs:6. Documented in the CHANGELOG,src/loom_tests/mod.rs, andCargo.toml. tokio has the identical limitation. CI is unaffected: the clippy job doesn't set the cfg, and the loom job now runscargo test --lib.Verification
RUSTFLAGS="--cfg loom" cargo test --lib— 4 loom tests pass asloom_tests::spsc::*/loom_tests::broadcast::*cargo test --all-targets— 59 pass;cargo test --doc— 15 passcargo clippy --all-targets -- -D warnings,cargo fmt --check— cleanRUSTDOCFLAGS="-D warnings" cargo doc --no-deps— cleancargo publish --dry-run— clean, 27 files, 41.3 KiB compressedWatch the Loom job. Its invocation changed (
--test loom_spsc --test broadcast_loom→--lib) and that's the one change I could only exercise locally.No public API change;
0.2.0remains unpublished, so nothing here is breaking relative to a released version.