Commit 264f66a
committed
Remove outdated constraint validation from depends field pattern in library.properties schema
A regular expression is employed in the library.properties JSON schemas to validate the format of the contents of the
depends field. Previously, this regular expression was configured to validate the syntax of the optional version
constraint.
The constraint system has recently been made much more capable through the addition of support for more syntax. The
regular expression did not have support for that syntax, which caused valid data to fail validation.
Expanding the already complex and lengthy regular expression to comprehensively validate the full range of constraint
forms possible
with the new syntax would not be feasible or maintainable.
The new approach is to validate it directly via Go code using the same `go.bug.st/relaxed-semver` module used by
Arduino CLI and `arduino/libraries-repository-engine` to handle the version constraints in this field. The schema will
continue to provide a general validation on the `depends` field format.1 parent a915ba8 commit 264f66a
File tree
3 files changed
+12
-8
lines changed- etc/schemas
- internal
- project/library/libraryproperties
- rule/schema/schemadata
3 files changed
+12
-8
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
496 | | - | |
497 | | - | |
| 496 | + | |
| 497 | + | |
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
| |||
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | 393 | | |
398 | 394 | | |
399 | 395 | | |
400 | 396 | | |
401 | 397 | | |
402 | 398 | | |
403 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
404 | 408 | | |
405 | 409 | | |
406 | 410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1911 | 1911 | | |
1912 | 1912 | | |
1913 | 1913 | | |
1914 | | - | |
1915 | | - | |
| 1914 | + | |
| 1915 | + | |
1916 | 1916 | | |
1917 | 1917 | | |
1918 | 1918 | | |
| |||
0 commit comments