Improve error message for malformed third-party platform archives#3217
Open
nitishagar wants to merge 1 commit into
Open
Improve error message for malformed third-party platform archives#3217nitishagar wants to merge 1 commit into
nitishagar wants to merge 1 commit into
Conversation
When a third-party core's downloaded archive is not structured correctly,
findPackageRoot surfaced a low-level message ("no unique root dir in
archive ...") that is hard for end users and GUIs to act on.
Reword both archive-structure errors to explain the problem and point the user
to the platform maintainer, while still listing the offending folders in the
multiple-root case.
Fixes arduino#3131
Author
|
The two failing checks here appear unrelated to this change, which only rewords two error strings in
No integration test references the reworded strings, and the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3217 +/- ##
==========================================
+ Coverage 69.43% 69.45% +0.01%
==========================================
Files 252 252
Lines 19595 19595
==========================================
+ Hits 13606 13609 +3
+ Misses 4718 4716 -2
+ Partials 1271 1270 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Make the platform-archive structure errors in
findPackageRootuser-actionable.Why
Installing a third-party core whose archive is structured incorrectly surfaced a low-level internal message, e.g.:
This is hard for end users to act on, and GUI tools (e.g. Arduino IDE) sometimes display it verbatim. See #3131.
How
Reword both
findPackageRooterrors (zero root folders / multiple root folders) to explain that the archive is malformed and that it is likely a problem with the third-party platform, pointing the user to the platform maintainer. The multiple-root case still lists the offending folders.Fixes #3131