Skip to content

Upgrade mea to asyncband - #2553

Merged
j178 merged 2 commits into
j178:masterfrom
mingcheng:refactor/migrate-from-mea-to-asyncband
Aug 14, 2026
Merged

Upgrade mea to asyncband#2553
j178 merged 2 commits into
j178:masterfrom
mingcheng:refactor/migrate-from-mea-to-asyncband

Conversation

@mingcheng

Copy link
Copy Markdown
Contributor

Summary

  • update cargo manifests and workspace dependencies
  • replace mea import paths with asyncband equivalents
  • update macports portfile checksums for the renamed crate

ref fast/asyncband#149

- update cargo manifests and workspace dependencies
- replace mea import paths with asyncband equivalents
- update macports portfile checksums for the renamed crate

Signed-off-by: mingcheng <mingcheng@apache.org>
@mingcheng
mingcheng requested a review from j178 as a code owner August 14, 2026 15:54
Copilot AI lite review requested due to automatic review settings August 14, 2026 15:54
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.63%. Comparing base (9323894) to head (0e8d223).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2553   +/-   ##
=======================================
  Coverage   93.63%   93.63%           
=======================================
  Files         134      134           
  Lines       28842    28842           
=======================================
  Hits        27006    27006           
  Misses       1836     1836           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 refactors the codebase to replace the mea crate with the renamed/replacement asyncband crate, updating dependency manifests, Rust import paths, and MacPorts vendored-crate checksums to keep builds consistent across packaging targets.

Changes:

  • Swap workspace dependency from mea to asyncband (including Cargo.lock regeneration).
  • Update Rust imports to use asyncband::{once, semaphore} instead of mea::{once, semaphore}.
  • Update the MacPorts Portfile crate list to include asyncband and drop mea.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
scripts/macports/Portfile Adds asyncband crate checksum entry and removes mea to keep MacPorts vendoring in sync with Cargo deps.
crates/prek/src/languages/python/python.rs Switches OnceMap import to asyncband::once::OnceMap.
crates/prek/src/languages/node/installer.rs Switches OnceMap import to asyncband::once::OnceMap.
crates/prek/src/languages/haskell.rs Switches OnceCell import to asyncband::once::OnceCell.
crates/prek/src/cli/run/run.rs Switches Semaphore import to asyncband::semaphore::Semaphore.
crates/prek/src/cli/run/install.rs Switches OnceCell/Semaphore imports to asyncband.
crates/prek/Cargo.toml Replaces the mea dependency with asyncband at the crate level.
Cargo.toml Replaces the workspace mea dependency with asyncband (version bump to 0.6.7).
Cargo.lock Adds asyncband package entry and removes mea; updates prek dependency list accordingly.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6d9b123521

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread scripts/macports/Portfile Outdated
@tisonkun

Copy link
Copy Markdown
Contributor

To provide more context, the mea crate is under the process of donating to the ASF (@apache).

You can find more details at https://cwiki.apache.org/confluence/spaces/INCUBATOR/pages/446071349/Asyncband+Proposal.

With some helpful feedback we decided to rebrand mea as asyncbrand. I'm still maintaining this crate.

@prek-ci-bot

prek-ci-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

📦 Cargo Bloat Comparison

Binary size change: +0.33% (30.3 MiB → 30.4 MiB)

Expand for cargo-bloat output

Head Branch Results

 File  .text     Size             Crate Name
 1.1%   2.2% 332.0KiB        aws_lc_sys aws_lc_0_43_0_aes_gcm_encrypt_avx512
 1.1%   2.2% 332.0KiB        aws_lc_sys aws_lc_0_43_0_aes_gcm_decrypt_avx512
 0.2%   0.5%  71.8KiB              prek <prek::cli::Command as clap_builder::derive::Subcommand>::augment_subcommands
 0.2%   0.4%  57.8KiB              prek prek::run::{closure#0}
 0.2%   0.4%  55.0KiB              prek <<prek::config::Config as serde_core::de::Deserialize>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::<<serde_saphyr::de::deserializer::YamlDeserializer as serde_core::de::Deserializer>::deserialize_map::MA>
 0.2%   0.3%  49.4KiB annotate_snippets annotate_snippets::renderer::render::render
 0.1%   0.3%  38.7KiB              prek prek::cli::run::run::run::{closure#0}
 0.1%   0.2%  34.2KiB              prek <prek::cli::RunOptions as clap_builder::derive::Args>::augment_args
 0.1%   0.2%  32.9KiB              prek <prek::languages::golang::installer::GoInstaller>::install::{closure#0}
 0.1%   0.2%  32.8KiB              prek <prek::languages::ruby::installer::RubyInstaller>::install::{closure#0}
 0.1%   0.2%  30.9KiB     granit_parser <granit_parser::scanner::Scanner<granit_parser::input::str::StrInput>>::fetch_more_tokens
 0.1%   0.2%  30.5KiB     granit_parser <granit_parser::scanner::Scanner<granit_parser::input::str::StrInput>>::fetch_more_tokens
 0.1%   0.2%  28.6KiB    cargo_metadata <&mut serde_json::de::Deserializer<serde_json::read::StrRead> as serde_core::de::Deserializer>::deserialize_struct::<<cargo_metadata::Package as serde_core::de::Deserialize>::deserialize::__Visitor>
 0.1%   0.2%  28.0KiB        aws_lc_sys aws_lc_0_43_0_edwards25519_scalarmuldouble_alt
 0.1%   0.2%  27.5KiB        aws_lc_sys aws_lc_0_43_0_edwards25519_scalarmuldouble
 0.1%   0.2%  27.5KiB              prek <prek::languages::mise::installer::MiseInstaller>::download::{closure#0}
 0.1%   0.2%  27.2KiB              prek <<prek::config::RemoteHook as serde_core::de::Deserialize>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::<<serde_saphyr::de::deserializer::YamlDeserializer as serde_core::de::Deserializer>::deserialize_map::MA>
 0.1%   0.2%  26.3KiB              prek prek::cli::try_repo::try_repo::{closure#0}
 0.1%   0.2%  24.9KiB               xml <xml::reader::parser::PullParser>::dispatch_token
 0.1%   0.2%  24.8KiB              prek <prek::cli::Command as clap_builder::derive::FromArgMatches>::from_arg_matches_mut
43.1%  88.6%  13.1MiB                   And 26743 smaller methods. Use -n N to show more.
48.7% 100.0%  14.8MiB                   .text section size, the file size is 30.4MiB

Base Branch Results

 File  .text     Size             Crate Name
 1.1%   2.2% 332.0KiB        aws_lc_sys aws_lc_0_43_0_aes_gcm_encrypt_avx512
 1.1%   2.2% 332.0KiB        aws_lc_sys aws_lc_0_43_0_aes_gcm_decrypt_avx512
 0.3%   0.6%  85.7KiB              prek <prek::cli::Command as clap_builder::derive::Subcommand>::augment_subcommands
 0.2%   0.4%  57.3KiB              prek prek::run::{closure#0}
 0.2%   0.4%  55.0KiB              prek <<prek::config::Config as serde_core::de::Deserialize>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::<<serde_saphyr::de::deserializer::YamlDeserializer as serde_core::de::Deserializer>::deserialize_map::MA>
 0.2%   0.3%  49.4KiB annotate_snippets annotate_snippets::renderer::render::render
 0.1%   0.3%  39.3KiB              prek prek::cli::run::run::run::{closure#0}
 0.1%   0.2%  34.3KiB              prek <prek::cli::RunOptions as clap_builder::derive::Args>::augment_args
 0.1%   0.2%  32.7KiB              prek <prek::languages::ruby::installer::RubyInstaller>::install::{closure#0}
 0.1%   0.2%  30.9KiB     granit_parser <granit_parser::scanner::Scanner<granit_parser::input::str::StrInput>>::fetch_more_tokens
 0.1%   0.2%  30.5KiB     granit_parser <granit_parser::scanner::Scanner<granit_parser::input::str::StrInput>>::fetch_more_tokens
 0.1%   0.2%  28.6KiB    cargo_metadata <&mut serde_json::de::Deserializer<serde_json::read::StrRead> as serde_core::de::Deserializer>::deserialize_struct::<<cargo_metadata::Package as serde_core::de::Deserialize>::deserialize::__Visitor>
 0.1%   0.2%  28.0KiB        aws_lc_sys aws_lc_0_43_0_edwards25519_scalarmuldouble_alt
 0.1%   0.2%  27.5KiB        aws_lc_sys aws_lc_0_43_0_edwards25519_scalarmuldouble
 0.1%   0.2%  27.2KiB              prek <<prek::config::RemoteHook as serde_core::de::Deserialize>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::<<serde_saphyr::de::deserializer::YamlDeserializer as serde_core::de::Deserializer>::deserialize_map::MA>
 0.1%   0.2%  27.0KiB              prek <prek::languages::mise::installer::MiseInstaller>::download::{closure#0}
 0.1%   0.2%  26.5KiB              prek prek::cli::try_repo::try_repo::{closure#0}
 0.1%   0.2%  24.9KiB               xml <xml::reader::parser::PullParser>::dispatch_token
 0.1%   0.2%  24.4KiB              prek <prek::languages::node::installer::NodeInstaller>::install::{closure#0}
 0.1%   0.2%  24.2KiB              prek <<prek::config::LocalHook as serde_core::de::Deserialize>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::<<serde_saphyr::de::deserializer::YamlDeserializer as serde_core::de::Deserializer>::deserialize_map::MA>
43.1%  88.5%  13.1MiB                   And 26728 smaller methods. Use -n N to show more.
48.6% 100.0%  14.8MiB                   .text section size, the file size is 30.3MiB

@prek-ci-bot

prek-ci-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

⚡️ Hyperfine Benchmarks

Summary: 0 regressions, 0 improvements above the 10% threshold.

Environment
  • OS: Linux 6.17.0-1022-azure
  • CPU: 4 cores
  • prek version: prek 0.4.13+6 (c75d824 2026-08-14)
  • Rust version: rustc 1.97.1 (8bab26f4f 2026-07-14)
  • Hyperfine version: hyperfine 1.20.0
CLI Commands

Benchmarking basic commands in the main repo:

prek --version

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base --version 2.3 ± 0.1 2.1 2.5 1.00
prek-head --version 2.4 ± 0.2 2.1 3.4 1.05 ± 0.09

prek list

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base list 9.3 ± 0.2 9.0 10.8 1.00
prek-head list 9.5 ± 0.3 9.0 10.4 1.02 ± 0.04

prek validate-config .pre-commit-config.yaml

⏭️ Skipped: .pre-commit-config.yaml not found

prek sample-config

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base sample-config 2.6 ± 0.1 2.5 2.8 1.00 ± 0.04
prek-head sample-config 2.6 ± 0.1 2.5 2.7 1.00
Cold vs Warm Runs

Comparing first run (cold) vs subsequent runs (warm cache):

prek run --all-files (cold - no cache)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run --all-files 40.0 ± 1.4 37.5 42.4 1.00
prek-head run --all-files 40.1 ± 1.3 38.6 42.4 1.00 ± 0.05

prek run --all-files (warm - with cache)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run --all-files 40.6 ± 0.9 38.5 42.8 1.01 ± 0.04
prek-head run --all-files 40.4 ± 1.1 38.9 42.0 1.00
Full Hook Suite

Running the builtin hook suite on the benchmark workspace:

prek run --all-files (full builtin hook suite)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run --all-files 40.9 ± 2.0 38.3 48.0 1.01 ± 0.06
prek-head run --all-files 40.6 ± 1.1 38.6 43.5 1.00
Individual Hook Performance

Benchmarking each hook individually on the test repo:

prek run trailing-whitespace --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run trailing-whitespace --all-files 13.8 ± 0.6 13.0 15.9 1.00 ± 0.06
prek-head run trailing-whitespace --all-files 13.8 ± 0.5 12.9 14.9 1.00

prek run end-of-file-fixer --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run end-of-file-fixer --all-files 11.5 ± 0.5 10.7 12.9 1.00
prek-head run end-of-file-fixer --all-files 11.7 ± 0.4 10.8 12.6 1.01 ± 0.06

prek run check-json --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-json --all-files 8.2 ± 0.3 7.7 8.7 1.01 ± 0.05
prek-head run check-json --all-files 8.1 ± 0.3 7.6 8.9 1.00

prek run check-yaml --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-yaml --all-files 7.9 ± 0.1 7.8 8.2 1.00
prek-head run check-yaml --all-files 8.3 ± 0.3 7.8 8.9 1.04 ± 0.04

prek run check-toml --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-toml --all-files 7.9 ± 0.3 7.3 8.4 1.02 ± 0.05
prek-head run check-toml --all-files 7.7 ± 0.2 7.2 8.1 1.00

prek run check-xml --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-xml --all-files 7.6 ± 0.3 7.3 8.6 1.00 ± 0.06
prek-head run check-xml --all-files 7.6 ± 0.3 7.2 8.5 1.00

prek run detect-private-key --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run detect-private-key --all-files 11.3 ± 0.6 10.4 13.3 1.00
prek-head run detect-private-key --all-files 11.4 ± 0.7 10.3 13.6 1.00 ± 0.08

prek run fix-byte-order-marker --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run fix-byte-order-marker --all-files 13.7 ± 1.1 12.2 17.3 1.04 ± 0.10
prek-head run fix-byte-order-marker --all-files 13.3 ± 0.9 12.0 16.2 1.00
Installation Performance

Benchmarking hook installation (fast path hooks skip Python setup):

prek install-hooks (cold - no cache)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base install-hooks 4.7 ± 0.1 4.6 4.8 1.01 ± 0.02
prek-head install-hooks 4.6 ± 0.1 4.6 4.7 1.00

prek install-hooks (warm - with cache)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base install-hooks 4.8 ± 0.1 4.7 5.0 1.02 ± 0.04
prek-head install-hooks 4.7 ± 0.2 4.5 4.9 1.00
File Filtering/Scoping Performance

Testing different file selection modes:

prek run (staged files only)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run 24.5 ± 0.4 23.9 25.0 1.00
prek-head run 24.7 ± 0.4 24.1 25.5 1.01 ± 0.02

prek run --files '*.json' (specific file type)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run --files '*.json' 5.2 ± 0.1 5.1 5.3 1.00
prek-head run --files '*.json' 5.3 ± 0.1 5.1 5.8 1.01 ± 0.03
Workspace Discovery & Initialization

Benchmarking hook discovery and initialization overhead:

prek run --dry-run --all-files (measures init overhead)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run --dry-run --all-files 7.8 ± 1.1 6.8 10.4 1.06 ± 0.16
prek-head run --dry-run --all-files 7.4 ± 0.4 7.1 9.0 1.00
Meta Hooks Performance

Benchmarking meta hooks separately:

prek run check-hooks-apply --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-hooks-apply --all-files 8.3 ± 0.2 8.1 8.8 1.00
prek-head run check-hooks-apply --all-files 8.5 ± 0.4 8.2 9.8 1.02 ± 0.05

prek run check-useless-excludes --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-useless-excludes --all-files 8.3 ± 0.1 8.1 8.6 1.01 ± 0.02
prek-head run check-useless-excludes --all-files 8.3 ± 0.1 8.1 8.6 1.00

prek run identity --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run identity --all-files 7.2 ± 0.2 7.0 7.9 1.00
prek-head run identity --all-files 7.4 ± 0.8 6.9 10.1 1.02 ± 0.11

@j178 j178 added the internal Internal changes label Aug 14, 2026
Copilot AI review requested due to automatic review settings August 14, 2026 17:30
@j178 j178 changed the title refactor: replace mea with asyncband crate Upgrade mea to asyncband Aug 14, 2026
@j178
j178 deployed to release August 14, 2026 17:31 — with GitHub Actions Active
@j178
j178 deployed to release August 14, 2026 17:32 — with GitHub Actions Active

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated no new comments.

@j178
j178 merged commit 8e80ea7 into j178:master Aug 14, 2026
37 checks passed
@j178

j178 commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Internal changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants