Skip to content

Rename misleading serde feature to iter-ext#15

Merged
paberr merged 2 commits intomainfrom
fix/rename-serde-feature
Mar 8, 2026
Merged

Rename misleading serde feature to iter-ext#15
paberr merged 2 commits intomainfrom
fix/rename-serde-feature

Conversation

@paberr
Copy link
Owner

@paberr paberr commented Mar 8, 2026

Summary

  • The serde feature flag was misleading: the serde crate is an unconditional dependency, and the feature only gated the iter_ext module (par_map/try_par_map). Renamed to iter-ext to accurately describe what it controls.
  • Fixed inaccurate doc comments on run_bytes/try_run_bytes that referenced a non-existent serde feature gate.
  • Added #[cfg_attr(not(feature = "iter-ext"), allow(dead_code))] on WebWorkerFn::func to suppress the dead-code warning when iter-ext is disabled (the field is only used in try_par_map's fallback path).

Breaking change: Users with features = ["serde"] need to update to features = ["iter-ext"] (or just use default features).

Test plan

  • cargo +nightly clippy --all-features — passes
  • cargo +nightly clippy --no-default-features --features codec-postcard — no dead_code warning
  • cargo +nightly clippy --no-default-features --features iter-ext,codec-pot — passes
  • cargo test --doc --all-features — passes
  • cargo +nightly fmt --all -- --check — passes

paberr added 2 commits March 8, 2026 22:12
The `serde` feature flag was misleading: the serde crate is an
unconditional dependency, and the feature only gated the `iter_ext`
module (par_map/try_par_map). Rename it to `iter-ext` to accurately
reflect what it controls.

Also fix inaccurate doc comments on run_bytes/try_run_bytes that
referenced the non-existent serde feature gate.
…ate runs

- Use matrix include with named codec variants (postcard/pot) for
  readable job names instead of raw cargo flags
- Add codec matrix to integration tests via npm scripts (test:pot)
- Set workspace dep to default-features = false so test crate can
  switch codecs independently
- Only trigger on push to main + all PRs (avoids duplicate runs)
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR renames the misleading serde feature flag to iter-ext (since serde is an unconditional dependency and the feature only gated the iterator extensions), and updates docs/CI/test scaffolding accordingly.

Changes:

  • Rename feature gate from serde to iter-ext for the iter_ext module (par_map / try_par_map) and update references across the repo.
  • Fix documentation/comments that incorrectly referenced a serde feature gate, and suppress a dead_code lint when iter-ext is disabled.
  • Extend the test harness/CI to exercise builds/tests with codec-pot (including new npm scripts + a test job matrix).

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/package.json Adds :pot build/test scripts to run Playwright tests against a codec-pot build.
test/Cargo.toml Adds feature flags to toggle wasmworker codec features from wasm-pack/CI.
src/webworker/worker.rs Removes inaccurate doc guidance about enabling a non-existent serde feature.
src/pool/mod.rs Same doc fix for WebWorkerPool::run_bytes.
src/lib.rs Gates iter_ext module behind feature = "iter-ext".
src/func.rs Suppresses dead_code warning for WebWorkerFn::func when iter-ext is off.
demo/Cargo.toml Updates demo’s wasmworker dependency feature list (currently incomplete for demo usage).
README.md Updates user-facing docs to describe iter-ext and removes references to a serde feature flag.
Cargo.toml Renames feature serde -> iter-ext and adjusts workspace dependency defaults.
.github/workflows/test.yml Updates CI feature matrices and adds postcard/pot test matrix for npm tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@paberr paberr merged commit aeeec14 into main Mar 8, 2026
11 checks passed
@paberr paberr deleted the fix/rename-serde-feature branch March 8, 2026 22:57
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