Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support parentheses in
depends
field constraints
Library dependencies may be specified in the `depends` field of the library.properties library metadata file. A regular expression is used to separate the dependency name and optional version constraint from each element of the field during parsing of the file to add new releases to the DB. The supported version constraint syntax for use in this field was recently expanded. This included adding support for grouping constraints using parentheses. The previous regular expression did not allow parentheses in the constraint, which unnecessarily limited the capabilities of the library dependencies system. The updated regular expression will match against invalid constraint syntax (e.g., `depends=FooLib (>1.2.3)(<2.3.4)`). However, this is not a problem because the syntax is already validated separately via the dedicated tool for such things: Arduino Lint. The DB update only occurs after the release has passed full validation by Arduino Lint. Given the data which has already been validated by Arduino Lint, this new regular expression will reliably extract the dependency components from the field.
- Loading branch information