fix: Suggest similar looking feature names when feature is missing - #15454
Conversation
|
r? @weihanglo rustbot has assigned @weihanglo. Use |
| versions that meet the requirements `*` are: 0.0.1 | ||
|
|
||
| package `foo` depends on `bar` with feature `bar` but `bar` does not have that feature. | ||
| package `bar` does have feature `baz` |
There was a problem hiding this comment.
Is the leading space intentional?
There was a problem hiding this comment.
Other clauses have a context line like this with a single leading space.
Its weird. It seems like it should be one of 0, 2, or 4 spaces but I didn't feel like following up what the intent was.
There was a problem hiding this comment.
As you've tweaked the message already, do you also want to address that in the same PR?
We can also do it in a follow up. I am fine with either.
There was a problem hiding this comment.
Merging now to get the incremental improvement rather than blocking on figuring out what the intended indentation is.
There was a problem hiding this comment.
@Eh2406 when back from vacation, if you'd be willing to look at these errors and let us know what you think would work well, I'd appreciate it.
weihanglo
left a comment
There was a problem hiding this comment.
My previous comment is just a nit. Feel free to merge this whenever you feel good :)
| versions that meet the requirements `*` are: 0.0.1 | ||
|
|
||
| package `foo` depends on `bar` with feature `bar` but `bar` does not have that feature. | ||
| package `bar` does have feature `baz` |
There was a problem hiding this comment.
As you've tweaked the message already, do you also want to address that in the same PR?
We can also do it in a follow up. I am fine with either.
Update cargo 10 commits in d811228b14ae2707323f37346aee3f4147e247e6..7918c7eb59614c39f1c4e27e99d557720976bdd7 2025-04-15 15:18:42 +0000 to 2025-04-27 09:44:23 +0000 - overriding-dependencies.md: better readability (rust-lang/cargo#15459) - source-replacement.md: fix typo (rust-lang/cargo#15458) - Stabilize automatic garbage collection. (rust-lang/cargo#14287) - Update doctest xcompile flags (rust-lang/cargo#15455) - fix: Suggest similar looking feature names when feature is missing (rust-lang/cargo#15454) - fix(unit-graph): switch to Package ID Spec (rust-lang/cargo#15447) - chore(deps): update cargo-semver-checks to v0.41.0 (rust-lang/cargo#15446) - Implement RFC3695: Allow boolean literals as cfg predicates (rust-lang/cargo#14649) - chore: remove duplicate word in comment (rust-lang/cargo#15437) - Fix formatting of CliUnstable parsing (rust-lang/cargo#15434) r? ghost
What does this PR try to resolve?
I recently depended on a package with
preserve-orderrather thanpreserve_orderand the error message didn't help me with the problem so I figure I'd fix that. I also found other improvements along the wayMissingFeaturestring only has one feature in it was important for doing aclosestmatch on the feature).How should we test and review this PR?
Additional information