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

Create a compile+upload combo command #326

Merged
merged 4 commits into from Aug 26, 2019

Conversation

zmoog
Copy link
Contributor

@zmoog zmoog commented Aug 6, 2019

This PR adds something similar to the IDE’s “compile on upload” feature.

Idea

The intended purpose is to simplify the workflow of the board user and offer a single-step command to compile the sketch and upload to the board.

For example:

$ arduino-cli compile --fqbn arduino:samd:nano_33_iot ~/Arduino/Blink --upload --port /dev/cu.usbmodem14101 --verify

Design & Implementation

I've tried to reuse the existing implementation of both compile and upload command composing them in the Cobra commands.

Since I'm new to both the arduino-cli project and the Go programming language any feedback will be really, really (I mean it!) welcome.

@CLAassistant
Copy link

CLAassistant commented Aug 6, 2019

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@masci masci left a comment

Choose a reason for hiding this comment

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

Approach is neat and readable 👌, code LGTM.
We'll need to pay attention to ensure flags shared between the two commands don't go out of sync but at this stage IMO it's better a little duplication than an overly complex solution.

@masci masci added this to the 0.5.0 milestone Aug 9, 2019
@zmoog zmoog marked this pull request as ready for review August 19, 2019 10:29
Copy link
Contributor

@mastrolinux mastrolinux left a comment

Choose a reason for hiding this comment

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

Just added a couple of suggestions, I do like the general idea and the Go part.

test/test_compile.py Show resolved Hide resolved
test/test_compile.py Show resolved Hide resolved
@zmoog
Copy link
Contributor Author

zmoog commented Aug 26, 2019

We're closing this PR to ship the compile+upload combo and the suggested improvements to the integration tests will be addressed in the dedicated PR (I will link it here as soon created).

@zmoog zmoog merged commit 35722fd into master Aug 26, 2019
@zmoog zmoog deleted the create-a-compile+upload-combo-command branch August 26, 2019 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants