Skip to content
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

[vcpkg] Add a schema file for vcpkg.json #12178

Merged
merged 7 commits into from
Jul 13, 2020
Merged

[vcpkg] Add a schema file for vcpkg.json #12178

merged 7 commits into from
Jul 13, 2020

Conversation

edhebi
Copy link
Contributor

@edhebi edhebi commented Jun 30, 2020

This is related to #12175 .

This is absolutely not as tested as it should be, but I'm not sure how to go about it. I gess some set of known valid and known invalid manifest files would be required.

I choose the path an filename fairly arbitrarily, feel free to move it around.

@strega-nil strega-nil self-assigned this Jun 30, 2020
scripts/vcpkg.schema.json Outdated Show resolved Hide resolved
Per json schema, having any other field in a `{ "$ref": ""}` object is invalid.
@ghost
Copy link

ghost commented Jun 30, 2020

CLA assistant check
All CLA requirements met.

@edhebi
Copy link
Contributor Author

edhebi commented Jun 30, 2020

Also, if that path ends up being the final one, an id field should be added with and url providing the schema, either the github raw one, or something else:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
  ...
}

@strega-nil
Copy link
Contributor

strega-nil commented Jul 1, 2020

I think that this is really good, the only thing I see is that it would be good to make the definitions match the spec: platformExpression -> platform-expression?

@edhebi
Copy link
Contributor Author

edhebi commented Jul 1, 2020

I wondered wether too do that or use the conventional json casing. I'll change the case when I have some time

@edhebi
Copy link
Contributor Author

edhebi commented Jul 1, 2020

done, all definitions are now with-dashes. I kept description as description-field to avoid mixing it up with the description keyword

@PhoebeHui PhoebeHui added the category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed label Jul 1, 2020
@ras0219
Copy link
Contributor

ras0219 commented Jul 7, 2020

@edhebi did you intend to mark this as ready to merge instead of a draft?

@edhebi
Copy link
Contributor Author

edhebi commented Jul 8, 2020

@ras0219 oops, my bad. I'll mark it as ready to merge

@edhebi edhebi marked this pull request as ready for review July 8, 2020 21:28
scripts/vcpkg.schema.json Outdated Show resolved Hide resolved
scripts/vcpkg.schema.json Outdated Show resolved Hide resolved
scripts/vcpkg.schema.json Outdated Show resolved Hide resolved
@strega-nil
Copy link
Contributor

Thanks so much @edhebi!

@ras0219-msft ras0219-msft merged commit f4b66c5 into microsoft:master Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants