Skip to content

fix: gate gungraun to linux#456

Merged
psandana merged 14 commits into
mainfrom
u/psandana/gungraun-detector
May 28, 2026
Merged

fix: gate gungraun to linux#456
psandana merged 14 commits into
mainfrom
u/psandana/gungraun-detector

Conversation

@psandana
Copy link
Copy Markdown
Contributor

With this we allow to exclude the benchmarks that requires gungraun if the feature is not enabled

Copilot AI review requested due to automatic review settings May 27, 2026 01:44
Copy link
Copy Markdown
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 introduces an internal Cargo feature used to gate the multitude crate’s gungraun (Callgrind/Valgrind) benchmarks so they can be excluded unless explicitly enabled.

Changes:

  • Add an internal _gungraun feature.
  • Gate gungraun_alloc and gungraun_drop benches behind required-features = ["_gungraun"].

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

Comment thread crates/multitude/Cargo.toml Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (43d51a5) to head (32e39d3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #456   +/-   ##
=======================================
  Coverage   100.0%   100.0%           
=======================================
  Files         305      305           
  Lines       23698    23698           
=======================================
  Hits        23698    23698           

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Copy Markdown
Member

@sandersaares sandersaares left a comment

Choose a reason for hiding this comment

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

What specific problem is this addressing? There are different problems related to Gungraun and I am not confident that this is really the right approach to tidy things up here.

Feature flags for purely repo-specific development workflows feel like a design smell - nobody is going to babysit their feature flags, they will either specify none (cargo test) or all (cargo test --all-features) but not hand-pick some specific ones. And they will pick one of these two options regardless of whether they have Gungraun installed or not, so this can still end up with errors.

If this is addressing a problem of "gungraun benches fail on Windows" then I suggest to cfg(linux) those tests and make accessing them on Windows a no-op. Reference implementation: https://github.com/folo-rs/folo/blob/main/packages/awaiter_set/benches/awaiter_set_cg.rs

If this is addressing a problem of "gungraun benches fail on Linux if I do not have Gungraun installed" then my preferred fix is to simply require Gungraun on Linux by adding Valgrind to our standard development environment setup in DEVELOPMENT.md and gungraun-runner into just install-tools as a required tool. Partial reference implementation: https://github.com/folo-rs/folo/blob/083d512b7ca6d5ac6c2dd8e8896e2cd119efdcf4/justfiles/just_setup.just#L37

This way we can get by without any feature flags.

Or is there a third problem I am unaware of that needs a feature flag, where it is truly necessary?

It is also possible I misunderstand how this works or how it is meant to be used (which would suggest we need to add some docs in this PR). Feel free to educate me if so.

Copilot AI review requested due to automatic review settings May 27, 2026 15:47
@psandana psandana requested a review from sandersaares May 27, 2026 15:48
Copy link
Copy Markdown
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

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

Comment thread scripts/install-callgrind-tools.ps1 Outdated
Comment thread crates/multitude/benches/gungraun_alloc/linux.rs
Comment thread crates/multitude/benches/gungraun_drop/linux.rs
Comment thread crates/multitude/benches/gungraun_drop/linux.rs Outdated
Comment thread crates/multitude/benches/gungraun_drop/linux.rs Outdated
Copilot AI review requested due to automatic review settings May 27, 2026 16:54
@psandana psandana changed the title fix: feature gate gungraun fix: gate gungraun to linux May 27, 2026
psandana and others added 2 commits May 27, 2026 12:58
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
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

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

Comments suppressed due to low confidence (2)

crates/multitude/benches/gungraun_drop/linux.rs:14

  • The string "ΓÇö" looks like a mojibake/encoding artifact where an em dash (—) was intended. This will show up garbled in source and docs; replace it with a proper em dash (or "--").
    crates/multitude/benches/gungraun_drop/linux.rs:173
  • This comment contains the mojibake sequence "ΓÇö" (likely meant to be an em dash —). Please replace with the correct character (or "--") to avoid corrupted text in the source.

Comment thread justfiles/setup.just
Comment thread scripts/install-callgrind-tools.ps1 Outdated
Copilot AI review requested due to automatic review settings May 27, 2026 19:24
Copy link
Copy Markdown
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

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

Comment thread justfiles/setup.just
Comment thread constants.env
Comment thread scripts/install-callgrind-tools.ps1
Copy link
Copy Markdown
Member

@sandersaares sandersaares left a comment

Choose a reason for hiding this comment

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

We should also add apt install valgrind to DEVELOPMENT.md (similar to what we have in our internal wiki dev env setup page).

@psandana
Copy link
Copy Markdown
Contributor Author

We should also add apt install valgrind to DEVELOPMENT.md (similar to what we have in our internal wiki dev env setup page).

Will do in another PR. This one is getting bigger and bigger.

@psandana psandana merged commit 5a6eecd into main May 28, 2026
31 checks passed
@psandana psandana deleted the u/psandana/gungraun-detector branch May 28, 2026 13:40
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.

4 participants