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

Add schema for rust-project.json #2628

Merged
merged 6 commits into from
Dec 4, 2022

Conversation

MariaSolOs
Copy link
Contributor

@MariaSolOs MariaSolOs commented Dec 3, 2022

Adding the schema for rust-project.json, which is documented here.

Note that I also added some extra fields that are not mentioned in the public link above but that are part of the implementation.

Copy link
Contributor

@EmilyGraceSeville7cf EmilyGraceSeville7cf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not enough info in schema to do detailed review. Waiting for documentation links provided.

"properties": {
"display_name": {
"type": "string",
"description": "Crate name used for display purposes, without affecting semantics."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional fix (multiple issues): add link to official documentation with the following format: "{{your_description}}\n{{link_here}}".
Note: without it I can't quickly check and suggest fixes for your schema.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only documentation for this file is this one, which unfortunately doesn't have a lot of information about each property...

@MariaSolOs
Copy link
Contributor Author

@EmilySeville7cfg This PR is still a draft (and this is why I haven't added the relevant links) because I'm waiting to get a thumbs up from the rust-analyzer maintainers beforehand. Sorry about that! I'll publish it once it's ready for a review :)

@EmilyGraceSeville7cf
Copy link
Contributor

No problem. 😄

@MariaSolOs MariaSolOs marked this pull request as ready for review December 4, 2022 01:56
Copy link
Contributor

@EmilyGraceSeville7cf EmilyGraceSeville7cf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • No required fixes available, approved.
  • Thanks for a contribution! ❤️

src/schemas/json/rust-project.json Show resolved Hide resolved
src/schemas/json/rust-project.json Outdated Show resolved Hide resolved
src/schemas/json/rust-project.json Outdated Show resolved Hide resolved
@GerryFerdinandus
Copy link
Contributor

@MariaSolOs
Don't forget to add at least one test file.

@GerryFerdinandus GerryFerdinandus merged commit 3ffdbb4 into SchemaStore:master Dec 4, 2022
@GerryFerdinandus
Copy link
Contributor

Thanks

@MariaSolOs MariaSolOs deleted the rust-proj branch December 4, 2022 19:46
bors added a commit to rust-lang/rust-analyzer that referenced this pull request Dec 9, 2022
Add VS Code schema validation for `rust-project.json`

Now that SchemaStore/schemastore#2628 has been merged, adding the `jsonValidation` contribution to the VS Code extension for better editor support when modifying `rust-project.json` files.

Related issue: #13714
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants