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

Add support for version constraints in depends field #182

Merged
merged 3 commits into from
Jun 3, 2021
Merged

Add support for version constraints in depends field #182

merged 3 commits into from
Jun 3, 2021

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Jun 2, 2021

No description provided.

In the past, I have found that using Arduino CLI infrastructure for handling projects is not always the right choice
because Arduino CLI is intended to be resilient to sub-ideal project configurations when feasible, whereas Arduino Lint
is intended to enforce or encourage ideal project configurations.

However, Arduino Lint is not intended to lint the Library Manager index, so using Arduino CLI's code for querying the
index should be safe and avoid the problems associated with the code duplication that would be the alternative.
@per1234 per1234 requested review from cmaglie and umbynos June 2, 2021 09:21
@per1234 per1234 added topic: code Related to content of the project itself type: enhancement Proposed improvement labels Jun 2, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #182 (4f97430) into main (45b32ff) will increase coverage by 0.05%.
The diff coverage is 90.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #182      +/-   ##
==========================================
+ Coverage   84.36%   84.41%   +0.05%     
==========================================
  Files          43       43              
  Lines        2986     3009      +23     
==========================================
+ Hits         2519     2540      +21     
- Misses        374      375       +1     
- Partials       93       94       +1     
Flag Coverage Δ
unit 84.41% <90.47%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
...ternal/rule/ruleconfiguration/ruleconfiguration.go 100.00% <ø> (ø)
internal/rule/schema/schemadata/bindata.go 48.63% <ø> (ø)
internal/project/projectdata/library.go 75.55% <66.66%> (-1.37%) ⬇️
internal/rule/rulefunction/library.go 94.72% <100.00%> (+0.13%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 45b32ff...4f97430. Read the comment docs.

Arduino CLI and the Library Manager indexer has some provisional support for specifying version constraints in the
library.properties depends field. Although undocumented, this syntax is fully supported by the other tools, so Arduino
Lint's previous treatment of libraries using this feature as invalid is incorrect.
The library.properties depends field is used to specify the library dependencies. Although currently undocumented,
Arduino CLI and the Library Manager indexer both have provisional support for dependency version constraints.

Previously, LP048 did not have any support for the constraint syntax, which caused a spurious failure when they were in
use. This commit adds support for the constraint syntax and also causes the constraint information to be used when
checking if the dependency is provided by the index.
@per1234 per1234 merged commit cb7776a into arduino:main Jun 3, 2021
@per1234 per1234 deleted the depends-constraint branch June 3, 2021 14:22
@per1234 per1234 self-assigned this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants