WIP: feat: implement pre_upload check and pattern#3171
WIP: feat: implement pre_upload check and pattern#3171facchinm wants to merge 1 commit intoarduino:masterfrom
Conversation
For multi binary uploads it might be useful to skip flashing a part of the binary (if unchanged, or just compatible). By adding this pair of rules (activated by .upload.use_pre_upload_check=true) we can give maximum flexibility for platform developers who need this kind of behaviour. pre_upload_check.pattern should return != 0 if we want to execute the second rule before upload.pattern
…needed Requires arduino/arduino-cli#3171 and arduino/serial-discovery#116 (and, transitively, bugst/go-serial#215) TODO: * replace the shell script with a proper version check utility * check if other uploaders need different methods
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3171 +/- ##
==========================================
+ Coverage 69.46% 69.47% +0.01%
==========================================
Files 252 252
Lines 19557 19561 +4
==========================================
+ Hits 13585 13590 +5
Misses 4712 4712
+ Partials 1260 1259 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
per1234
left a comment
There was a problem hiding this comment.
Please add documentation for the new properties to the Arduino Library Specification:
https://github.com/arduino/arduino-cli/blob/master/docs/platform-specification.md
| } | ||
| } | ||
|
|
||
| preUpload := uploadProperties.GetBoolean("upload.use_pre_upload_check") |
There was a problem hiding this comment.
upload.use_pre_upload_check seems superfluous. Why not just use the existence of the pattern properties as the determining factor?
Please check if the PR fulfills these requirements
See how to contribute
before creating one)
our contributing guidelines
UPGRADING.mdhas been updated with a migration guide (for breaking changes)configuration.schema.jsonupdated if new parameters are added.What kind of change does this PR introduce?
For multi binary uploads it might be useful to skip flashing a part of the binary (if unchanged, or just compatible). By adding this pair of rules (activated by .upload.use_pre_upload_check=true) we can give maximum flexibility for platform developers who need this kind of behaviour.
pre_upload_check.pattern should return != 0 if we want to execute the second rule before upload.pattern
What is the current behavior?
What is the new behavior?
Does this PR introduce a breaking change, and is titled accordingly?
Other information