Don't crash when running cargo profdata --help#165
Merged
therealprof merged 1 commit intorust-embedded:masterfrom Sep 26, 2025
Merged
Don't crash when running cargo profdata --help#165therealprof merged 1 commit intorust-embedded:masterfrom
cargo profdata --help#165therealprof merged 1 commit intorust-embedded:masterfrom
Conversation
Previously, the cargo wrapper tried to access CLI flags that were only defined when `needs_build` was true. Omit the access for commands that don't need those flags. Before: ``` thread 'main' (13996246) panicked at src/lib.rs:283:37: Mismatch between definition and access of `features`. Unknown argument or group id. Make sure you are using the argument id and not the short or long flags ``` After: ``` Proxy for the `llvm-profdata` tool shipped with the Rust toolchain. Usage: cargo-profdata [OPTIONS] [-- <args>...] ... ```
therealprof
approved these changes
Sep 26, 2025
Contributor
therealprof
left a comment
There was a problem hiding this comment.
LGTM, thanks for catching this.
Member
|
I had this as #162 but I guess it was missed in the queue! No harm done :) |
Contributor
|
@Emilgardis My apologies. Indeed I only happened to notice this PR in my massive GH inbox today. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, the cargo wrapper tried to access CLI flags that were only defined when
needs_buildwas true. Omit the access for commands that don't need those flags.Before:
After: