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

Better version handling for Arduino #11043

Merged
merged 8 commits into from
Apr 20, 2022

Conversation

guberti
Copy link
Member

@guberti guberti commented Apr 18, 2022

This pull request contains three small changes:

  • Fix bug allowing microTVM to be used with Arduino version v0.20 and above (see changes to _parse_connected_boards) and adds relevant unit tests.
  • Only perform version check when calling build or flash (things that actually require arduino-cli), and adds relevant unit tests.
  • Only raise a warning if the arduino-cli version present is below the min version (previously any version other than v0.18 would cause an error).
  • Change version comparison to use version.check, like the rest of TVM

Copy link
Contributor

@gromero gromero left a comment

Choose a reason for hiding this comment

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

@guberti Hi. Thanks for continuing to support Arduino on microTVM :)

I've got some comments inline but overall the change LGTM!

@guberti
Copy link
Member Author

guberti commented Apr 19, 2022

Thanks for the comments @gromero! I've addressed them all, and made a small change to the way we compare versions (we now use version.parse like the rest of TVM).

@guberti guberti requested a review from gromero April 19, 2022 19:59
Copy link
Contributor

@gromero gromero left a comment

Choose a reason for hiding this comment

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

@guberti Thanks for the fixes and for adding the test for warning_as_error! I agree on using packaging for the version checks. I think I'll use it also for Zephyr :)

I just have one comment - a nit - but won't hold the change on it. Feel free to change it if it makes sense of leave it unchanged.

Finally, out of curiosity, do you know why these Arduino tests are kept in template_project/tests instead of in tests/micro/arduino with the other tests? Should we move everything into tests/micro/arduino?

@guberti
Copy link
Member Author

guberti commented Apr 19, 2022

Finally, out of curiosity, do you know why these Arduino tests are kept in template_project/tests instead of in tests/micro/arduino with the other tests? Should we move everything into tests/micro/arduino?

The original thinking was that unit tests would live in template_project/tests, while integration tests would live in tests/micro/arduino. I don't think this makes very much sense anymore, and I'd be open to moving everything to /tests/micro/arduino. That's probably OOS for this PR, though.

@gromero
Copy link
Contributor

gromero commented Apr 19, 2022

Finally, out of curiosity, do you know why these Arduino tests are kept in template_project/tests instead of in tests/micro/arduino with the other tests? Should we move everything into tests/micro/arduino?

The original thinking was that unit tests would live in template_project/tests, while integration tests would live in tests/micro/arduino. I don't think this makes very much sense anymore, and I'd be open to moving everything to /tests/micro/arduino. That's probably OOS for this PR, though.

Got it! Yeah, that's OOS for this PR, I was just wondering about that organization. 👍

@gromero gromero merged commit 5b58660 into apache:main Apr 20, 2022
wrongtest-intellif pushed a commit to wrongtest-intellif/incubator-tvm that referenced this pull request Apr 20, 2022
* Fix bug allowing microTVM to be used with Arduino version v0.20 and
above (see changes to _parse_connected_boards) and adds relevant unit
tests.

* Only perform version check when calling build or flash (things that
actually require arduino-cli), and adds relevant unit tests.

* Only raise a warning if the arduino-cli version present is below the
min version (previously any version other than v0.18 would cause an
error).

* Change version comparison to use version.check, like the rest of TVM
shtinsa pushed a commit to Deelvin/tvm that referenced this pull request May 17, 2022
* Fix bug allowing microTVM to be used with Arduino version v0.20 and   
above (see changes to _parse_connected_boards) and adds relevant unit   
tests.                                                                  
                                                                        
* Only perform version check when calling build or flash (things that   
actually require arduino-cli), and adds relevant unit tests.            
                                                                        
* Only raise a warning if the arduino-cli version present is below the  
min version (previously any version other than v0.18 would cause an     
error).                                                                 
                                                                        
* Change version comparison to use version.check, like the rest of TVM
juda pushed a commit to juda/tvm that referenced this pull request Jun 21, 2022
* Fix bug allowing microTVM to be used with Arduino version v0.20 and   
above (see changes to _parse_connected_boards) and adds relevant unit   
tests.                                                                  
                                                                        
* Only perform version check when calling build or flash (things that   
actually require arduino-cli), and adds relevant unit tests.            
                                                                        
* Only raise a warning if the arduino-cli version present is below the  
min version (previously any version other than v0.18 would cause an     
error).                                                                 
                                                                        
* Change version comparison to use version.check, like the rest of TVM
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.

2 participants