Commit 3c8b58b
authored
When a feature name is invalid, report the error as part of the feature name rather than as part of the overall features block. (#1675)
Before and after demonstration:
```
PS C:\Dev\vcpkg-tool\out\build\Win-x64-Debug-WithArtifacts> type C:\Dev\vcpkg-tool\azure-pipelines\e2e-ports\vcpkg-requires-feature\vcpkg.json
{
"name": "vcpkg-requires-feature",
"version": "0",
"features": {
"a": {
"description": "Feature A"
},
"b": {
"description": "Feature B"
},
"b_required": {
"description": "This feature needs to be turned on for the port to build"
},
"c": {
"description": "Feature C"
}
}
}
PS C:\Dev\vcpkg-tool\out\build\Win-x64-Debug-WithArtifacts> C:\Dev\vcpkg\vcpkg.exe format-manifest C:\Dev\vcpkg-tool\azure-pipelines\e2e-ports\vcpkg-requires-feature\vcpkg.json
C:\Dev\vcpkg-tool\azure-pipelines\e2e-ports\vcpkg-requires-feature\vcpkg.json: error: $.features (a set of features): features must be lowercase alphanumeric+hyphens, and not one of the reserved names
PS C:\Dev\vcpkg-tool\out\build\Win-x64-Debug-WithArtifacts> .\vcpkg.exe format-manifest C:\Dev\vcpkg-tool\azure-pipelines\e2e-ports\vcpkg-requires-feature\vcpkg.json
C:\Dev\vcpkg-tool\azure-pipelines\e2e-ports\vcpkg-requires-feature\vcpkg.json: error: $.features.b_required (a feature): features must be lowercase alphanumeric+hyphens, and not one of the reserved names
PS C:\Dev\vcpkg-tool\out\build\Win-x64-Debug-WithArtifacts>
```1 parent fc89362 commit 3c8b58b
File tree
5 files changed
+29
-1
lines changed- azure-pipelines
- e2e-assets/format-manifest-malformed
- end-to-end-tests-dir
- include/vcpkg/base
- src/vcpkg
- base
5 files changed
+29
-1
lines changedLines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1492 | 1492 | | |
1493 | 1493 | | |
1494 | 1494 | | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
1495 | 1501 | | |
1496 | 1502 | | |
1497 | 1503 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1108 | 1108 | | |
1109 | 1109 | | |
1110 | 1110 | | |
1111 | | - | |
| 1111 | + | |
| 1112 | + | |
1112 | 1113 | | |
1113 | 1114 | | |
1114 | 1115 | | |
| |||
0 commit comments