Skip to content

Publish feature-gated Rust crate with package-level MI_PPROF-off and DHAT proof #243

Description

@zackees

Problem

Published mimalloc-pprof 0.9.4 cannot compile sampled pprof out. Its package metadata has no features and packaged build.rs unconditionally defines MI_PPROF=1; default-features = false therefore does not produce MI_PPROF=OFF.

Issue #239 and PR #240 implement selection in the repository, but reld needs a published immutable version proven from the registry download. The current v0.9.4 tag was created after registry publication and points at later DHAT-containing source, so it cannot prove the old archive contents.

Required release

Publish 0.9.5 after #240 is merged and reconciled with current main.

This is package/release correctness and makes no performance claim.

RED -> GREEN acceptance

RED, using the actual registry archive for exactly 0.9.4 in a clean environment:

  1. Record checksum and extracted feature table.
  2. Prove the feature table is empty.
  3. Prove packaged build.rs defines MI_PPROF=1 despite disabling defaults.

Do not substitute a tag or checkout.

GREEN, after publishing exactly 0.9.5, download afresh through the registry and inspect/build that download, not a path or git dependency:

  1. Prove metadata has default = ["pprof"] and pprof = [].
  2. A clean consumer pinned to =0.9.5 with defaults disabled compiles native code with MI_PPROF=0.
  3. There, prof::start(...) returns false and its public API links.
  4. Default features compile with MI_PPROF=1 and sampled profiling starts in a smoke process.
  5. Both builds retain internal DHAT: Rust API links, dhat::start() succeeds in isolation, exact stats observe a known allocation, and DHAT v2 JSON is emitted.
  6. Package contents include DHAT implementation/bindings and feature-aware build script, reading nothing from the maintainer checkout.
  7. Record exact version, checksum, release/tag commit, commands, and output in a closing comment.

Use fresh target/package caches or otherwise prove native configurations did not reuse stale cc artifacts.

Downstream gate

reld must not externalize to 0.9.4 while claiming pprof is compiled out. Wait for and pin exactly:

mimalloc-pprof = { version = "=0.9.5", default-features = false }

Retain the verified registry checksum in its lockfile.

Related: zackees/reld#92, zackees/reld#93, zackees/reld#94, #239, #240.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions