Skip to content
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

Error message if upload is not possible #1353

Merged
merged 5 commits into from
Aug 26, 2022
Merged

Conversation

francescospissu
Copy link
Contributor

Motivation

If the user presses the upload button and no board is selected, a message should appear warning what went wrong while uploading. Since verify takes place before upload, the same message that is given when the user tries to compile a sketch without selecting a board should be shown. On the other hand, this message is not very clear, so it should be updated.

Change description

Communicate to user when upload is impossible due to no board selection.
Make error message from compiling without board selected more user friendly.

Other information

Closes #845.
Closes #62.

This fix depends on the changes made here: arduino/arduino-cli#1848. Without it it is not possible to verify that #62 is resolved.

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

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

The code looks good to me.

I am not familiar with the board user fields logic, maybe we should change

if (this.boardRequiresUserFields && !this.cachedUserFields.has(key)) {

to

if (this.boardRequiresUserFields && key && !this.cachedUserFields.has(key)) {

Copy link

@ubidefeo ubidefeo left a comment

Choose a reason for hiding this comment

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

Works as expected

@kittaakos kittaakos added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Aug 26, 2022
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

Thanks Francesco!

@francescospissu francescospissu merged commit 0c22884 into main Aug 26, 2022
@francescospissu francescospissu deleted the msg-upload-not-possible branch August 26, 2022 09:24
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
5 participants