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

[skip-changelog] Improve the definition of FQBN and explicitly state which characters are allowed #2509

Merged

Conversation

MatteoPologruto
Copy link
Contributor

@MatteoPologruto MatteoPologruto commented Jan 18, 2024

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?

Documentation enhancement

What is the new behavior?

Each field of the fqbn is checked to verify if it contains invalid characters.

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

No

Other information

@MatteoPologruto MatteoPologruto added type: enhancement Proposed improvement topic: documentation Related to documentation for the project labels Jan 18, 2024
@MatteoPologruto MatteoPologruto self-assigned this Jan 18, 2024
@MatteoPologruto MatteoPologruto linked an issue Jan 18, 2024 that may be closed by this pull request
3 tasks
@MatteoPologruto MatteoPologruto marked this pull request as ready for review January 18, 2024 16:52
@umbynos umbynos requested a review from per1234 January 18, 2024 17:11
Copy link
Contributor

@alessio-perugini alessio-perugini left a comment

Choose a reason for hiding this comment

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

I remember that talking with @cmaglie we wanted to enforce this check in the codebase.
Let's wait for his response if we want to tackle that in the same PR.

docs/FAQ.md Outdated Show resolved Hide resolved
docs/FAQ.md Outdated Show resolved Hide resolved
@cmaglie
Copy link
Member

cmaglie commented Jan 25, 2024

I remember that talking with @cmaglie we wanted to enforce this check in the codebase. Let's wait for his response if we want to tackle that in the same PR.

Yep, it would be nice to start enforcing it.
I don't know how much platforms would break, BTW it seems very unlikely (in case we may relax the specification to include some extra char later).

Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (51119b2) 68.92% compared to head (b469a22) 68.91%.
Report is 1 commits behind head on master.

❗ Current head b469a22 differs from pull request most recent head 0f4bcf2. Consider uploading reports for the commit 0f4bcf2 to get more accurate results

Files Patch % Lines
internal/arduino/cores/fqbn.go 50.00% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2509      +/-   ##
==========================================
- Coverage   68.92%   68.91%   -0.02%     
==========================================
  Files         204      204              
  Lines       20452    20464      +12     
==========================================
+ Hits        14096    14102       +6     
- Misses       5207     5211       +4     
- Partials     1149     1151       +2     
Flag Coverage Δ
unit 68.91% <50.00%> (-0.02%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MatteoPologruto MatteoPologruto merged commit 66a9d6d into arduino:master Feb 6, 2024
99 checks passed
@MatteoPologruto MatteoPologruto deleted the fqbn-formal-definition branch February 6, 2024 08:33
@dankeboy36
Copy link
Contributor

dankeboy36 commented Feb 10, 2024

Thanks for the feature. I see arduin-o:av-r:un-o:a=b=c=d is valid. What config option and value does it imply? Can you confirm that config option a has a value of "b=c=d"?

Update: I see yes

"properties.Map{\n \"cpu\": \"atmega\",\n \"speed\": \"1000\",\n \"extra\": \"core=arduino\",\n}",

dankeboy36 added a commit to dankeboy36/fqbn that referenced this pull request Feb 10, 2024
dankeboy36 added a commit to dankeboy36/fqbn that referenced this pull request Feb 10, 2024
dankeboy36 pushed a commit to dankeboy36/fqbn that referenced this pull request Feb 10, 2024
## [1.0.4](1.0.3...1.0.4) (2024-02-10)

### Bug Fixes

* align implementation with most recent specs ([#9](#9)) ([c62036f](c62036f)), closes [arduino/arduino-cli#2460](arduino/arduino-cli#2460) [arduino/arduino-cli#2509](arduino/arduino-cli#2509) [#8](#8)
@MatteoPologruto
Copy link
Contributor Author

Hello @dankeboy36! Yes, I am confirming that arduin-o:av-r:un-o:a=b=c=d is a valid FQBN and the config key a has the value of b=c=d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a formal definition of what characters are allowed in the FQBN
4 participants