Skip to content

Conversation

MatteoPologruto
Copy link
Contributor

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

Code imperfection fix

What is the current behavior?

Platform authors cannot use a custom monitor tool for the serial protocol.

$ echo "pluggable_monitor.pattern.serial=foobar" >> ~/.arduino15/packages/arduino/hardware/avr/1.8.3/platform.txt
$ arduino-cli monitor --port /dev/ttyACM0 --fqbn arduino:avr:leonardo --protocol serial
Connected to /dev/ttyACM0! Press CTRL-C to exit.
Hello world from the Arduino Leonardo's serial port!
^C

$ echo "pluggable_monitor.pattern.myprotocol=bazqux" >> ~/.arduino15/packages/arduino/hardware/avr/1.8.3/platform.txt
$ arduino-cli monitor --port /dev/ttyACM0 --fqbn arduino:avr:leonardo --protocol myprotocol
Error getting port settings details: Port monitor error: exec: "bazqux": executable file not found in $PATH

The command is also expected to fail when --protocol serial is used.

What is the new behavior?

Platform authors can now use a custom monitor tool for the serial protocol.

$ echo "pluggable_monitor.pattern.serial=foobar" >> ~/.arduino15/packages/arduino/hardware/avr/1.8.3/platform.txt
$ arduino-cli monitor --port /dev/ttyACM0 --fqbn arduino:avr:leonardo --protocol serial
Error getting port settings details: Port monitor error: exec: "foobar": executable file not found in %PATH%

The command now fails as expected.

Does this PR introduce a breaking change, and is titled accordingly?

No

@MatteoPologruto MatteoPologruto added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Apr 19, 2023
@MatteoPologruto MatteoPologruto self-assigned this Apr 19, 2023
@codecov
Copy link

codecov bot commented Apr 19, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.08 ⚠️

Comparison is base (2c2a5cc) 62.51% compared to head (ac10a73) 62.43%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2153      +/-   ##
==========================================
- Coverage   62.51%   62.43%   -0.08%     
==========================================
  Files         224      224              
  Lines       19520    19520              
==========================================
- Hits        12203    12188      -15     
- Misses       6222     6233      +11     
- Partials     1095     1099       +4     
Flag Coverage Δ
unit 62.43% <100.00%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
arduino/cores/packagemanager/loader.go 73.37% <100.00%> (ø)

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MatteoPologruto MatteoPologruto merged commit 0b77c0a into arduino:master Apr 26, 2023
@MatteoPologruto MatteoPologruto deleted the override-default-monitor branch April 26, 2023 10:17
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

Successfully merging this pull request may close these issues.

Impossible to override default pluggable monitor for serial protocol
2 participants