fix: improve error reporting when no wdk-build package is found#339
Merged
gurry merged 4 commits intomicrosoft:mainfrom Jun 17, 2025
Merged
fix: improve error reporting when no wdk-build package is found#339gurry merged 4 commits intomicrosoft:mainfrom
gurry merged 4 commits intomicrosoft:mainfrom
Conversation
Contributor
Author
|
@microsoft-github-policy-service agree |
gurry
reviewed
Apr 16, 2025
gurry
previously approved these changes
Apr 16, 2025
879db98 to
144f698
Compare
Contributor
Author
|
I just rebased the branch on top of the latest |
a744f58 to
144f698
Compare
gurry
approved these changes
May 22, 2025
wmmc88
approved these changes
Jun 16, 2025
Collaborator
wmmc88
left a comment
There was a problem hiding this comment.
Thanks for the contribution @kehan-zhou
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.
🛠️ What This Fix Does
Previously, the code would throw
ConfigError::MultipleWdkBuildCratesDetectedeven when no wdk-build packages were found. This was misleading since the error implied that multiple crates were detected.This fix adds a more apparent distinction:
If no wdk-build crates are detected, a new
NoWdkBuildCrateDetectederror is returned.If more than one is found, the existing
MultipleWdkBuildCratesDetectedis used.This provides more accurate error reporting to users.
📌 Related Issue
Fixes #334
🧪 Testing
Ran
cargo testlocally to confirm no regressions and that the new error path is covered.