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

Increased library priority for libraries specified via --library flag #2148

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

Merged
cmaglie merged 2 commits into arduino:master from cmaglie:fix-lib-priority
May 5, 2023

Conversation

Copy link
Member

@cmaglie cmaglie commented Apr 13, 2023
edited
Loading

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?

Give the highest priority to libraries specified via --libraries flag, if more than one library matches includes during compilation.

What is the current behavior?

$ cat Blink.ino 
#include <Library.h>
void setup() { }
void loop() { }
$ arduino-cli compile -b arduino:avr:uno --format json | jq .builder_result.used_libraries[].name
"Library"
$ arduino-cli compile -b arduino:avr:uno --format json --library ../AnotherLibrary | jq .builder_result.used_libraries[].name
"Library"

What is the new behavior?

$ arduino-cli compile -b arduino:avr:uno --format json | jq .builder_result.used_libraries[].name
"Library"
$ arduino-cli compile -b arduino:avr:uno --format json --library ../AnotherLibrary | jq .builder_result.used_libraries[].name
"AnotherLibrary"

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

Other information

Fix #2106

@cmaglie cmaglie self-assigned this Apr 13, 2023
@cmaglie cmaglie added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Apr 13, 2023
Copy link

codecov bot commented Apr 13, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.06 ⚠️

Comparison is base (bfb5f3f) 62.66% compared to head (5b068ea) 62.60%.

Additional details and impacted files
@@ Coverage Diff @@
## master #2148 +/- ##
==========================================
- Coverage 62.66% 62.60% -0.06% 
==========================================
 Files 227 227 
 Lines 19545 19546 +1 
==========================================
- Hits 12247 12236 -11 
- Misses 6205 6214 +9 
- Partials 1093 1096 +3 
Flag Coverage Δ
unit 62.60% <100.00%> (-0.06%) ⬇️

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

Impacted Files Coverage Δ
arduino/libraries/librariesresolver/cpp.go 92.66% <100.00%> (+0.04%) ⬆️

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cmaglie cmaglie merged commit ede5a78 into arduino:master May 5, 2023
@cmaglie cmaglie deleted the fix-lib-priority branch May 5, 2023 14:41
@per1234 per1234 added the topic: build-process Related to the sketch build process label Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@ubidefeo ubidefeo Awaiting requested review from ubidefeo

@per1234 per1234 Awaiting requested review from per1234

@umbynos umbynos Awaiting requested review from umbynos

1 more reviewer

@alessio-perugini alessio-perugini alessio-perugini approved these changes

Reviewers whose approvals may not affect merge requirements
Labels
topic: build-process Related to the sketch build process topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Increase "location priority" score of library locations set via --library flag

AltStyle によって変換されたページ (->オリジナル) /