Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support for git-downloaded libraries in profiles.#3028

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
cmaglie wants to merge3 commits intoarduino:master
base:master
Choose a base branch
Loading
fromcmaglie:profile-git-libraries

Conversation

@cmaglie
Copy link
Member

Please check if the PR fulfills these requirements

Seehow to contribute

  • The PR has no duplicates (please search among thePull 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?

This PR adds support for git-based libraries in profiles.

What is the current behavior?

Sketch profiles do not support libraries downloaded from git.
Only libraries available on the Libraries Index or in the local storage could be included in a build made with profiles.

What is the new behavior?

Now the profiles support a third kind of library, and a git reference could be indicated in the profiles, like in the following example:

profiles:zero:fqbn:arduino:samd:arduino_zero_nativeplatforms:      -platform:arduino:samd (1.8.14)libraries:      -git:https://github.com/cmaglie/FlashStorage.git#1.0.0default_profile:zero

The specific git-revision of the library specified in the profile will be downloaded from git and cached in the data directory'sinternal folder. The downloaded copy is cached only the first time and will not be downloaded again.

If the git-reference is updated on the repository, the cached copy will become outdated, and the only way to refresh it is to delete the internal cache directory to force the Arduino CLI to download it again.

For example, a user trying to always utilize the latestmain branch of a library might be tempted to write something like:

libraries:      -git:https://github.com/cmaglie/FlashStorage.git#main

BTW, this won't work well because, after the first compile (and download from git), the Arduino CLI will never try again to refresh the library.

Does this PR introduce a breaking change, and istitled accordingly?

No

Other information

Fix#2133

@cmagliecmaglie self-assigned thisOct 21, 2025
@cmagliecmaglie added type: enhancementProposed improvement topic: codeRelated to content of the project itself labelsOct 21, 2025
@per1234per1234 added the topic: package-managementRelated to the packaging and managing of the platform/libraries labelOct 21, 2025
@codecov
Copy link

codecovbot commentedOct 21, 2025
edited
Loading

Codecov Report

❌ Patch coverage is43.67816% with49 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.33%. Comparing base (a8423ab) to head (8949023).
⚠️ Report is 5 commits behind head on master.

Files with missing linesPatch %Lines
commands/instances.go0.00%25 Missing and 1 partial⚠️
internal/arduino/sketch/profiles.go58.33%8 Missing and 7 partials⚠️
...rnal/arduino/libraries/librariesmanager/install.go65.21%7 Missing and 1 partial⚠️
Additional details and impacted files
@@            Coverage Diff             @@##           master    #3028      +/-   ##==========================================- Coverage   68.39%   68.33%   -0.07%==========================================  Files         241      241                Lines       22734    22791      +57     ==========================================+ Hits        15550    15574      +24- Misses       5988     6017      +29- Partials     1196     1200       +4
FlagCoverage Δ
unit68.33% <43.67%> (-0.07%)⬇️

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.

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@cmagliecmaglie

Labels

topic: codeRelated to content of the project itselftopic: package-managementRelated to the packaging and managing of the platform/librariestype: enhancementProposed improvement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Support for custom libraries when usingsketch.yaml

2 participants

@cmaglie@per1234

[8]ページ先頭

©2009-2025 Movatter.jp