Skip to content

[skip-changelog] Add remediation path when tool is not available for an OS #2092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

MatteoPologruto
Copy link
Contributor

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

Code enhancement

What is the current behavior?

No instructions are provided when a tool download/install fails because it is not available for the OS in use.

What is the new behavior?

The error message has been enhanced by adding the email field of the package that provides the tool.

Does this PR introduce a breaking change, and is titled accordingly?

No

@MatteoPologruto MatteoPologruto added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Mar 1, 2023
@MatteoPologruto MatteoPologruto self-assigned this Mar 1, 2023
@codecov
Copy link

codecov bot commented Mar 1, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01 ⚠️

Comparison is base (5f73378) 36.43% compared to head (11792ed) 36.43%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2092      +/-   ##
==========================================
- Coverage   36.43%   36.43%   -0.01%     
==========================================
  Files         229      229              
  Lines       19586    19587       +1     
==========================================
  Hits         7137     7137              
- Misses      11611    11612       +1     
  Partials      838      838              
Flag Coverage Δ
unit 36.43% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
arduino/cores/packagemanager/download.go 34.61% <0.00%> (ø)
arduino/cores/packagemanager/install_uninstall.go 11.44% <0.00%> (-0.04%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MatteoPologruto MatteoPologruto force-pushed the correct-error-dependency-fail branch from bccf0c2 to 83554ba Compare March 1, 2023 17:13
@MatteoPologruto MatteoPologruto force-pushed the correct-error-dependency-fail branch from 83554ba to c7aad0c Compare March 6, 2023 08:27
@MatteoPologruto MatteoPologruto force-pushed the correct-error-dependency-fail branch from c7aad0c to 11792ed Compare March 6, 2023 08:44
@MatteoPologruto MatteoPologruto changed the title [skip-changelog] Add instructions on how to contact the package manager when tool is not available for the OS [skip-changelog] Add remediation path when tool is not available for an OS Mar 6, 2023
@MatteoPologruto MatteoPologruto marked this pull request as ready for review March 6, 2023 09:09
@MatteoPologruto MatteoPologruto merged commit 736d161 into arduino:master Mar 6, 2023
@MatteoPologruto MatteoPologruto deleted the correct-error-dependency-fail branch March 6, 2023 10:15
Comment on lines +316 to +317
return fmt.Errorf(tr("no compatible version of %s tools found for the current os, try contacting %s"),
toolRelease.Tool.Name, toolRelease.Tool.Package.Email)
Copy link
Member

Choose a reason for hiding this comment

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

This string can not be correctly translated, you must replace unindexed %s with %[1]s and %[2]s.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Modified here: #2099

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not install adafruit:samd, no path to remediation articulated in message?
3 participants