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

Pressing "Upload" button while compiling will give a technical error message #1299

Open
3 tasks done
Lorandil opened this issue Aug 6, 2022 · 2 comments
Open
3 tasks done
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@Lorandil
Copy link

Lorandil commented Aug 6, 2022

Describe the problem

Hi all,

great work so far :)
I found an imperfection which might confuse a beginner:

To reproduce

  • Load any sketch
  • Press 'Check'
  • When compiling starts, press upload (button is not disabled)

The error message reads:

arduino-verify-sketch

Expected behavior

The best solution would be to disabled all buttons that are not valid at a given time.
The second best would be to produce a helpful error message.

Arduino IDE version

Arduino IDE 2.0.0-rc9.1

Operating system

Windows

Operating system version

10 21H2

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@Lorandil Lorandil added the type: imperfection Perceived defect in any part of project label Aug 6, 2022
@per1234 per1234 added the topic: code Related to content of the project itself label Aug 6, 2022
@kittaakos kittaakos self-assigned this Aug 7, 2022
@kittaakos
Copy link
Contributor

The best solution would be to disabled all buttons that are not valid at a given time.

What are the valid and invalid commands when another command is running, @per1234? Could you please help?

Does IDE2 want...

  • to disable upload when the user clicks on verify?
  • to disable the monitor/plotter when an upload is in progress?
  • to disable the monitor/plotter when the verify part of an upload is running?

Please let me know if you have any other ideas on refining the enablement of the commands (verify, upload, monitor, firmware uploader, etc.?).

Thank you!

@per1234
Copy link
Contributor

per1234 commented Jan 16, 2023

@kittaakos from a usability standpoint, I don't think there is a reason to prevent any of these actions when another is in progress. So I would only disable them if there is a technical reason why it is not possible for Arduino IDE to handle it.

to disable upload when the user clicks on verify?

As a user, my expectation would be that if I initiate an "Upload" operation (by clicking the button, Sketch > Upload, or keyboard shortcut) while a "Verify/Compile" operation is in progress, Arduino IDE would cancel the in progress "Verify/Compile" operation and start an "Upload" operation.

Canceling the process (related: #1199) might be challenging, so an alternative reasonable behavior would be for the IDE to wait until the in-progress "Verify/Compile" operation finishes and then start the queued "Upload" operation.

But I also don't think the ability for the user to trigger an "Upload" operation while a "Verify/Compile" operation is in progress is very important, so I think it is perfectly fine to disable the triggering of an "Upload" operation while "Verify/Compile" operation is in progress if that is easier to implement. My main goal would be to find an easy way for the IDE to handle this condition more gracefully than it is now (though even the current behavior is already reasonably user friendly).

  • to disable the monitor/plotter when an upload is in progress?
  • to disable the monitor/plotter when the verify part of an upload is running?

I think it is a bad idea. This is a common use pattern (the user is anticipating the serial output from the sketch after uploading and getting the monitor set up while waiting for the upload to finish) and as far as I know the IDE already handles these conditions perfectly.

firmware uploader

I suspect it is possible to experience a failed firmware update if the user attempts one while an upload is in progress, but I think it is very unlikely to occur because the timing is pretty tight. I think the user would just try the firmware update again and it would be successful the second time. So I wouldn't bother with this unless we see real world evidence it is needed.

@kittaakos kittaakos removed their assignment Feb 23, 2024
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: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

3 participants