Skip to content

feat(schema): Expose IndexPackage, the description of a package within a Registry Index #15770

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

Merged
merged 2 commits into from
Jul 28, 2025

Conversation

0xPoe
Copy link
Member

@0xPoe 0xPoe commented Jul 23, 2025

What does this PR try to resolve?

ref #14834

In this pull request, I moved IndexPackage to cargo-util-schemas to enable third-party applications and cargo-dev-registry to utilize this common struct.

For instance, crates.io has its own IndexPackage located at https://github.com/rust-lang/crates.io/blob/005667f0416d03932a50309db6cc672945b033fe/crates/crates_io_index/data.rs#L5.

By moving it to cargo-util-schemas, we allow different applications to use this struct more easily.

How to test and review this PR?

It shouldn't break any tests; it's just a refactoring.

@0xPoe 0xPoe changed the title refactor: move IndexPackage and RegistryDependency to cargo-util-schemas for better modularity WIP: refactor: move IndexPackage and RegistryDependency to cargo-util-schemas for better modularity Jul 23, 2025
@0xPoe 0xPoe force-pushed the poe-patch-index-package branch 4 times, most recently from deb3072 to 0d54071 Compare July 27, 2025 12:53
@0xPoe 0xPoe marked this pull request as ready for review July 27, 2025 12:58
@rustbot
Copy link
Collaborator

rustbot commented Jul 27, 2025

r? @weihanglo

rustbot has assigned @weihanglo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 27, 2025
@0xPoe 0xPoe changed the title WIP: refactor: move IndexPackage and RegistryDependency to cargo-util-schemas for better modularity refactor: move IndexPackage and RegistryDependency to cargo-util-schemas for better modularity Jul 27, 2025
Copy link
Member Author

@0xPoe 0xPoe left a comment

Choose a reason for hiding this comment

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

🔢 Self-check (PR reviewed by myself and ready for feedback)

  • Code compiles successfully

  • Unit tests added

  • All tests pass

  • Comments added where necessary

  • PR title and description updated

  • PR size is reasonable

@0xPoe 0xPoe requested a review from epage July 27, 2025 13:01
@0xPoe 0xPoe force-pushed the poe-patch-index-package branch from 0d54071 to 8811325 Compare July 27, 2025 13:02
@epage epage changed the title refactor: move IndexPackage and RegistryDependency to cargo-util-schemas for better modularity feat(schema): Expose IndexPackage, the description of a package within a Registry Index Jul 28, 2025
Copy link
Contributor

@epage epage left a comment

Choose a reason for hiding this comment

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

Note for commit messages, the "refactor" is a "feature" commit for the schema

@epage epage added this pull request to the merge queue Jul 28, 2025
Merged via the queue into rust-lang:master with commit 37eeab7 Jul 28, 2025
26 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 28, 2025
@0xPoe
Copy link
Member Author

0xPoe commented Jul 28, 2025

Thanks for your review! 💚 💙 💜 💛 ❤️

@0xPoe 0xPoe deleted the poe-patch-index-package branch July 28, 2025 21:06
Muscraft pushed a commit to Muscraft/cargo that referenced this pull request Jul 29, 2025
…hin a Registry Index (rust-lang#15770)

### What does this PR try to resolve?

ref rust-lang#14834

In this pull request, I moved `IndexPackage` to `cargo-util-schemas` to
enable third-party applications and `cargo-dev-registry` to utilize this
common struct.

For instance, crates.io has its own `IndexPackage` located at
https://github.com/rust-lang/crates.io/blob/005667f0416d03932a50309db6cc672945b033fe/crates/crates_io_index/data.rs#L5.

By moving it to `cargo-util-schemas`, we allow different applications to
use this struct more easily.

### How to test and review this PR?

It shouldn't break any tests; it's just a refactoring.
bors added a commit to rust-lang/rust that referenced this pull request Aug 1, 2025
Update cargo

3 commits in a7fcef21feb4d835d1fee83b3f93b4aef86d5545..840b83a10fb0e039a83f4d70ad032892c287570a
2025-07-13 02:25:52 +0000 to 2025-07-30 13:59:19 +0000
- chore: fix some minor issues in comments (rust-lang/cargo#15787)
- feat(schema): Expose `IndexPackage`, the description of a package within a Registry Index (rust-lang/cargo#15770)
- chore: update toml/toml_edit to latest (rust-lang/cargo#15779)

r? ghost
@rustbot rustbot added this to the 1.90.0 milestone Aug 1, 2025
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Aug 4, 2025
Update cargo

3 commits in a7fcef21feb4d835d1fee83b3f93b4aef86d5545..840b83a10fb0e039a83f4d70ad032892c287570a
2025-07-13 02:25:52 +0000 to 2025-07-30 13:59:19 +0000
- chore: fix some minor issues in comments (rust-lang/cargo#15787)
- feat(schema): Expose `IndexPackage`, the description of a package within a Registry Index (rust-lang/cargo#15770)
- chore: update toml/toml_edit to latest (rust-lang/cargo#15779)

r? ghost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants