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

feat(doc): document empty vendor and arch in FQBN #2550

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

dankeboy36
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?

The spec should be aligned with the implementation; empty vendor and architecture parts are allowed in the FQBN.

This PR updates the documentation to mention the empty vendor and architecture parts in the FQBN.

What is the current behavior?

The docs do not mention the empty vendor/architecture cases but the CLI supports them:

// Allow empty plaforms or packages
b1, err := ParseFQBN("arduino::uno")
require.Equal(t, "arduino::uno", b1.String())
require.NoError(t, err)
require.Equal(t, b1.Package, "arduino")
require.Equal(t, b1.PlatformArch, "")
require.Equal(t, b1.BoardID, "uno")
require.Zero(t, b1.Configs.Size())
b2, err := ParseFQBN(":avr:uno")
require.Equal(t, ":avr:uno", b2.String())
require.NoError(t, err)
require.Equal(t, b2.Package, "")
require.Equal(t, b2.PlatformArch, "avr")
require.Equal(t, b2.BoardID, "uno")
require.Zero(t, b2.Configs.Size())
b3, err := ParseFQBN("::uno")
require.Equal(t, "::uno", b3.String())
require.NoError(t, err)
require.Equal(t, b3.Package, "")
require.Equal(t, b3.PlatformArch, "")
require.Equal(t, b3.BoardID, "uno")
require.Zero(t, b3.Configs.Size())

What is the new behavior?

The new doc includes the special empty parts case: https://github.com/dankeboy36/arduino-cli/blob/feat-doc-fqbn/docs/FAQ.md#whats-the-fqbn-string

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

No.

Other information

@CLAassistant
Copy link

CLAassistant commented Feb 24, 2024

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

The spec should be aligned with the implementation; empty `vendor` and
`architecture` parts are allowed in the FQBN.

Signed-off-by: dankeboy36 <[email protected]>
Copy link

codecov bot commented Feb 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.38%. Comparing base (870a48f) to head (0a164a8).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2550   +/-   ##
=======================================
  Coverage   69.38%   69.38%           
=======================================
  Files         205      205           
  Lines       20162    20162           
=======================================
  Hits        13989    13989           
  Misses       5050     5050           
  Partials     1123     1123           
Flag Coverage Δ
unit 69.38% <ø> (ø)

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.

@per1234 per1234 added type: enhancement Proposed improvement topic: documentation Related to documentation for the project labels Feb 26, 2024
@cmaglie cmaglie merged commit fcb2670 into arduino:master Feb 29, 2024
100 checks passed
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.

4 participants