-
Notifications
You must be signed in to change notification settings - Fork 287
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 and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change tool metadata file format to JSON #1553
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
917e69e
Move vcpkgTools.xml into the tool
data-queue 23c303e
fix
data-queue e86a63b
update
data-queue 65511af
format
data-queue e6ce6bb
reviews
data-queue db4bf03
fix
data-queue 3722ced
Allow constexpr Optional<T> when constexpr T is acceptable by propaga…
BillyONeal 7126108
Make the table be static data, deduplicate part of the expression in …
BillyONeal c340da3
Fixup optional 😅
BillyONeal 6c41ed5
clang-format
BillyONeal 107eec5
Merge pull request #1 from BillyONeal/tools
data-queue 7e6947c
Suppress -Werror=unused-but-set-variable in optional tests.
BillyONeal 8b5511c
fix
data-queue b183ea6
fix
data-queue 6defa28
Merge remote-tracking branch 'origin/main' into tools
BillyONeal 4d8eb9b
wip
vicroms 80cc2ab
Add deserializer types and errors
vicroms 3b33ef6
more error messages
vicroms b7075b8
Add parser unit tests
vicroms d1cf8fb
Add schema-version
vicroms 61a8b34
Update vcpkg-scripts-sha.txt
vicroms 77dc31b
Merge branch 'main' into tools
vicroms 4720537
Fix message error
vicroms 9091bd9
Merge github.com:vicroms/vcpkg-tool into tools
vicroms 2c5515a
Merge branch 'tools' of github.com:vicroms/vcpkg-tool into tools
vicroms 20ad083
Fix format errors
vicroms 86b54d0
generate message map
vicroms 3b7bb19
Add redirection switch
vicroms 544a04b
Merge remote-tracking branch 'origin/main' into tools
BillyONeal f990fee
Fix local test runs by importing the Pester module.
BillyONeal b1af8a3
Deduplicate architecture tables and JSON errors.
BillyONeal 870da94
Update vcpkg-scripts-sha.
BillyONeal b4e7579
Use more standard JSON parsing bits.
BillyONeal cf3ea15
Add JSON schema, better validation for enum fields, and tests.
BillyONeal 7a83a7d
Update scripts SHA again with Ninja arch tagging.
BillyONeal bfc856b
Remove no longer needed <regex>.
BillyONeal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg-tools.schema.json", | ||
"type": "object", | ||
"properties": { | ||
"schema-version": { | ||
"description": "Identifies the version of the tools database format; currently always 1.", | ||
"type": "number", | ||
"minimum": 1, | ||
"maximum": 1 | ||
}, | ||
"tools": { | ||
"type": "array", | ||
"description": "The set of known tools.", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the tool as exposed to `vcpkg fetch`." | ||
}, | ||
"os": { | ||
"type": "string", | ||
"description": "The platform where the record is valid.", | ||
"enum": [ "windows", "osx", "linux", "freebsd", "openbsd" ] | ||
}, | ||
"version": { | ||
"type": "string", | ||
"description": "The version to match against against a system provided copy of this tool.", | ||
"pattern": "\\d+(\\.\\d+(\\.\\d+)?)?" | ||
}, | ||
"arch": { | ||
"type": "string", | ||
"description": "The architecture where the record is valid.", | ||
"enum": [ "x86", "x64", "amd64", "arm", "arm64", "arm64ec", "s390x", "ppc64le", "riscv32", "riscv64", "loongarch32", "loongarch64", "mips64" ] | ||
}, | ||
"executable": { | ||
"type": "string", | ||
"description": "The relative path to the executable for the tool within the downloaded archive, if any." | ||
}, | ||
"url": { | ||
"type": "string", | ||
"description": "The URL to download the tool from.", | ||
"format": "uri" | ||
}, | ||
"sha512": { | ||
"type": "string", | ||
"description": "The SHA-512 hash of the downloaded archive.", | ||
"pattern": "^[0-9a-fA-F]{128}$" | ||
}, | ||
"archive": { | ||
"type": "string", | ||
"description": "The name of the downloaded archive." | ||
} | ||
}, | ||
"patternProperties": { | ||
"^\\$": {} | ||
}, | ||
"required": ["name", "os", "version"], | ||
"additionalProperties": false | ||
} | ||
} | ||
}, | ||
"patternProperties": { | ||
"^\\$": {} | ||
}, | ||
"additionalProperties": false, | ||
"required": [ "schema-version", "tools" ] | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this entry has no architecture entry this version would be used on arm64 devices. Maybe the arch field should be mandatory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's reasonable for there to be arch-less entries like scripts blobs or similar. A big reason to do this work is to enable arm64, but truly doing well there is going to imply minting arm64 binaries and similar; fully getting that on sounds like a separate feature though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok i hadn't thought about scripts, so one must simply be careful when adding entries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(or user "arch" : "neutral" as an indicator for stuff which does not dependent on arch similar to how the vs channel manifest works)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think an explicit 'neutral' value is substantially clearer than just not having the field, and would be 'annoying' as we couldn't reuse the existing
CPUArchitecture
enum and friends.