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

Add suggestions when a wrong FQBN is provided (installed platforms only) #1367

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

facchinm
Copy link
Member

@facchinm facchinm commented Jul 26, 2021

Please check if the PR fulfills these requirements

  • 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)
  • What kind of change does this PR introduce?

This PR tries to ease one of the pain points when dealing with the cli without fqbn autocompletion (fat fingers).
If the fqbn is wrong, try to find the closest match between installed platforms and suggest it to the interactive user.

  • What is the current behavior?

No suggestion is given, and finding what is actually causing the error can be daunting

  • What is the new behavior?

A suggestion is provided, for example:

~/arduino-cli upload -p /dev/ttyACM0 --fqbn=arduino:mbed_nano:nano_rp2040_connect Blink
Error during Upload: Error resolving FQBN: board arduino:mbed_nano@2.3.1:nano_rp2040_connect not found, did you mean arduino:mbed_nano:nanorp2040connect?
  • Other information:

Fixes #1366


See how to contribute

Copy link
Contributor

@silvanocerza silvanocerza left a comment

Choose a reason for hiding this comment

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

I like the improvement but I think some things could still be enhanced.

@per1234 per1234 added topic: code Related to content of the project itself type: enhancement Proposed improvement topic: CLI labels Jul 30, 2021
@rsora rsora added topic: CLI Related to the command line interface and removed topic: CLI labels Sep 16, 2021
@silvanocerza silvanocerza removed their assignment Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: CLI Related to the command line interface topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix unclear error message returned some times when using a wrong FQBN
4 participants