Allow uploads without port selection #1564
Merged
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.
Motivation
It is common for a "port" to be used in some way during the process of uploading to a board. However, the array of Arduino boards is very diverse. Some of these do not produce a port and their upload method has no need for one.
For this reason, the IDE must allow the upload process to be initiated regardless of whether a port happens to be selected. During the addition of support for user provided fields (#550), an unwarranted assumption was made that all boards require a port selection for upload and this resulted in a regression that broke uploading for these boards. This regression was especially user unfriendly in that there was no response whatsoever from the IDE when the user attempted to initiate an upload under these conditions.
Change description
Always initiate the upload process regardless of whether a port is selected. In cases where a port is required, the resulting error message returned by Arduino CLI or the upload tool will communicate the problem to the user.
Other information
Fixes #702
Fixes #770
Reviewer checklist