Skip to content

Remove the paste crate dependency - #189

Merged
BusyJay merged 1 commit into
mainfrom
busyjay/remove-paste-crate
Sep 25, 2026
Merged

BusyJay merged 1 commit into
mainfrom
busyjay/remove-paste-crate

Conversation

@BusyJay

@BusyJay BusyJay commented Sep 25, 2026 •

Copy link
Copy Markdown
Member
  • jemalloc-ctl: pass generated names explicitly in every option! invocation instead of relying on implicit identifier concatenation; public API names are unchanged.

  • roundtrip bench: name generated #[bench] fns via std's macro_metavar_expr_concat (${concat(...)}), the official successor of concat_idents/paste; the bench is already nightly-only.

Summary by CodeRabbit

  • Chores
    • Removed the unmaintained paste crate from the allocator packages.
  • Refactor
    • Updated allocator control declarations while preserving their supported operations and behavior.
    • Kept generated names and the public API unchanged, except for renamed statistics and thread allocation counter identifiers.
  • Tests
    • Added named checks for allocator controls.
  • Documentation
    • Updated the Unreleased changelog to reflect these changes.

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: cfd33b33-ab3e-4291-a9d8-2e86b340e82f

📥 Commits

Reviewing files that changed from the base of the PR and between 3c6b6ba and 1a9ed5f.

📒 Files selected for processing (12)
  • CHANGELOG.md
  • jemalloc-ctl/Cargo.toml
  • jemalloc-ctl/src/arenas.rs
  • jemalloc-ctl/src/config.rs
  • jemalloc-ctl/src/lib.rs
  • jemalloc-ctl/src/macros.rs
  • jemalloc-ctl/src/opt.rs
  • jemalloc-ctl/src/profiling.rs
  • jemalloc-ctl/src/stats.rs
  • jemalloc-ctl/src/thread.rs
  • jemallocator/Cargo.toml
  • jemallocator/benches/roundtrip.rs
💤 Files with no reviewable changes (2)
  • jemalloc-ctl/Cargo.toml
  • jemallocator/Cargo.toml

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The change removes paste from the jemalloc-ctl and jemallocator manifests. jemalloc-ctl macros and declarations now use explicit identifiers. The roundtrip benchmarks use Rust macro metavariable concatenation to generate benchmark names.

Changes

paste replacement

Layer / File(s) Summary
Explicit jemalloc-ctl macro identifiers
jemalloc-ctl/src/macros.rs, jemalloc-ctl/Cargo.toml
The macros accept explicit MIB types, MIB identifiers, and test names instead of deriving identifiers with paste. The manifest removes paste.
Explicit option identifiers
jemalloc-ctl/src/arenas.rs, jemalloc-ctl/src/config.rs, jemalloc-ctl/src/lib.rs, jemalloc-ctl/src/opt.rs, jemalloc-ctl/src/profiling.rs, jemalloc-ctl/src/stats.rs, jemalloc-ctl/src/thread.rs
Option declarations specify MIB and test identifiers. Thread counter identifiers change to allocatedp and deallocatedp. Existing keys, types, and supported operations remain as described in the change summaries.
Benchmark name generation
jemallocator/benches/roundtrip.rs, jemallocator/Cargo.toml, CHANGELOG.md
The benchmark macros generate names with ${concat(...)} and accept literal size and alignment values. The jemallocator manifest removes paste, and the changelog records the changes.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 1a9ed

The dependency removal appears ready to merge after normal checks; the benchmark change does not introduce a supported workflow failure.

Architecture Summary

Architecture risk: 🔵 Low · up to 1a9ed

The change affects 3 systems.

Changed systems: jemalloc-ctl, jemallocator, CHANGELOG.md

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — jemalloc-ctl (service) was modified; 9 changed files map to changed impact.
  • observed — jemallocator (service) was modified; 2 changed files map to changed impact.
  • observed — CHANGELOG.md (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in CHANGELOG.md: Added an Unreleased changelog entry describing the paste dependency removal, explicit MIB type and test-name arguments for option!, unchanged generated names and public API, and use of macro_metavar_expr_concat in nightly-gated allocator benchmarks.
  • observed — Modified behavior in jemalloc-ctl/Cargo.toml: The paste = "1" dependency was removed.
  • observed — Modified behavior in jemalloc-ctl/src/arenas.rs: The read-only arenas.narenas control is now declared as narenas_mib rather than narenas, and narenas_read_test is added.
  • observed — Modified behavior in jemalloc-ctl/src/config.rs: The malloc_conf option now names its MIB identifier malloc_conf_mib and adds malloc_conf_read_test to its test configuration; the r operation setting is unchanged.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 9 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: removing the paste crate dependency.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 9 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@BusyJay
BusyJay force-pushed the busyjay/remove-paste-crate branch from a474da9 to 191b377 Compare September 25, 2026 09:04
- jemalloc-ctl: pass generated names explicitly in every option! invocation instead of relying on implicit identifier concatenation; public API names are unchanged.

Signed-off-by: Jay Lee <busyjaylee@gmail.com>
@BusyJay
BusyJay force-pushed the busyjay/remove-paste-crate branch from 191b377 to 1a9ed5f Compare September 25, 2026 09:07
@BusyJay
BusyJay merged commit 66b124b into main Sep 25, 2026
12 checks passed
@BusyJay
BusyJay deleted the busyjay/remove-paste-crate branch September 25, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant