Skip to content

Conversation

@loynoir
Copy link

@loynoir loynoir commented Nov 16, 2025

use official cargo schema

Related

Now upstream have official cargo schema

#5026

Notes

  • src/schemas/json/cargo.json and related test files are not yet removed

@github-actions
Copy link
Contributor

Thanks for the PR!

This section of the codebase is owned by @madskristensen and @hyperupcall - if they write a comment saying "LGTM" then it will be merged.

@hyperupcall
Copy link
Member

hyperupcall commented Nov 20, 2025

Thanks. I can merge once CI goes green (CONTRIBUTIG.md) has more details on how to make this change!

@loynoir loynoir force-pushed the feat-official-cargo-schema branch from c03affe to 514ac46 Compare November 21, 2025 04:32
@loynoir
Copy link
Author

loynoir commented Nov 21, 2025

I check similar case

  • docker-compose is using official schema

"url": "https://raw.githubusercontent.com/compose-spec/compose-go/master/schema/compose-spec.json"

  • docker-compose does not have any test

https://github.com/SchemaStore/schemastore/tree/master/src/test

Thus, should be OK to remove community schema cargo.json and community test.

@ya7010
Copy link
Contributor

ya7010 commented Nov 24, 2025

I would like to confirm a few points of concern.

  • The official schema lacks fields such as "title" and "description," which significantly degrades the user experience. Is there a plan to incorporate or merge the official schema?
  • Are there plans to support metadata that are already registered, such as "x-taplo-", "x-tombi-", etc..?
  • Are there plans to address items that are marked as deprecated, such as "authors" and "dev_dependencies"?

The advantage of using the official schema is that you automatically get the latest schema information.
However, much of the information that has already been provided by many users will be lost. Therefore, we need to consider the users who have been utilizing this information.

@loynoir
Copy link
Author

loynoir commented Nov 24, 2025

There are 35 "description" within official schema.

https://github.com/rust-lang/cargo/blob/8e43074b2365e1f908570d7f5c2ef76b19d1133c/crates/cargo-util-schemas/manifest.schema.json#L224

Maybe contribute to official repo if description is not enough.

https://github.com/rust-lang/cargo/blob/8e43074b2365e1f908570d7f5c2ef76b19d1133c/crates/cargo-util-schemas/src/manifest/mod.rs#L170-L175

Schemastore is using official docker compose schema.

I don't know how x-taplo- and x-tombi- happen to official docker compose schema.

It should be same.

@ya7010
Copy link
Contributor

ya7010 commented Nov 25, 2025

It would be better to delay the merge as the current official Cargo schema is missing a lot of meta-information.

There is no clear ownership for who will contribute to the official schema.
Also, rules like the auto-sorting rules related tox-tombi-* are managed by a separate style team from the Cargo development team.

I will likely not be able to work on this issue for a while as my resources are diverted to another project 😓

You should probably think of Docker Compose schema and Cargo schema as separate concerns.
Docker Compose is a YAML file, and has nothing to do with x-taplo-* and x-tombi-* which are metadata for TOML files.
Those metadata is described in schemastore/CONTRIBUTION.md.

@loynoir
Copy link
Author

loynoir commented Nov 25, 2025

Hi, @hyperupcall

Has there ever been a similar situation for reference?

  • Official schema created later than community schema
  • Official schema lacks of x-* dialect

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