Remove redundant and outdated validation from depends
extraction regex
#124
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Library dependencies may be specified in the
depends
field of thelibrary.properties
library metadata file.A regular expression is used to separate the library dependency name and optional version constraint from each element of the field during parsing of the file to add new releases to the DB.
This regular expression is also configured to validate the library name as well as some minimal attempt at validating the version constraint.
The latter is not compatible with the recently introduced more powerful constraint syntax.
This project was originally solely responsible for validation of the library releases. Since that time, a dedicated tool was created for this purpose: Arduino Lint.
Since Arduino Lint already fully validates each release, including the
depends
field contents, and the DB entries are only added for releases which have passed that check, the validation via the extraction regular expression is superfluous and only increases the maintenance burden for no benefit.The regular expression is now configured for its a single purpose: extracting the components of the
depends
field elements. This can be done via a more simple regular expression, given that the data being parsed has already been validated by Arduino Lint.