-
-
Notifications
You must be signed in to change notification settings - Fork 442
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
157e08d to
a77f39c
Compare
Codecov Report❌ Patch coverage is 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
lucarin91
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure that this is a good idea, don't use our index, will make it way simpler to smuggle bad version of libraries in oher people projects. We cannot guarantee that a tag hasn't moved and that someone else downloading that project will not have a completely different version of the library. If we want to go down this route, we should do mirroring of github repository ourselves, to make sure that the tag didn't change (exactly how go implement that).
| - FlashStorage (1.2.3) | ||
| - dir: /path/to/system/lib | ||
| - dir: path/to/sketch/lib | ||
| - git: https://github.com/username/HelloWorld.git#v2.13 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why #? I think it is more common @ in this case
| - git: https://github.com/username/HelloWorld.git#v2.13 | |
| - git: https://github.com/username/HelloWorld.git@v2.13 |
Please check if the PR fulfills these requirements
See how to contribute
before creating one)
our contributing guidelines
UPGRADING.mdhas been updated with a migration guide (for breaking changes)configuration.schema.jsonupdated 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:
The specific git-revision of the library specified in the profile will be downloaded from git and cached in the data directory's
internalfolder. 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 latest
mainbranch of a library might be tempted to write something like: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 is titled accordingly?
No
Other information
Fix #2133