Add support for version constraints in depends field by per1234 · Pull Request #182 · arduino/arduino-lint (original) (raw)

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

Already on GitHub?Sign in to your account

Conversation1 Commits3 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

per1234

@per1234

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.

@codecov-commenter

@per1234

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.

@per1234

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.

cmaglie

@per1234 per1234 deleted the depends-constraint branch

June 3, 2021 14:22