Skip to content

Limit registry-index dependency field to registry sources only #15503

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

Open
epage opened this issue May 7, 2025 · 1 comment
Open

Limit registry-index dependency field to registry sources only #15503

epage opened this issue May 7, 2025 · 1 comment
Labels
A-manifest Area: Cargo.toml issues C-enhancement Category: enhancement Command-package Command-publish S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review

Comments

@epage
Copy link
Contributor

epage commented May 7, 2025

When publishing a package with a custom registry, Cargo resolves the dependency registry field to registry-index (#14500). However, registry-index is for internal purposes only and this is not intended as a means for people to bypass the need for .cargo/config.toml (see #12738 for that use case).

We should look into a way to close this hole to avoid people relying on it unintentionally.

@epage epage added Command-publish Command-package A-manifest Area: Cargo.toml issues S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review C-enhancement Category: enhancement labels May 7, 2025
@epage
Copy link
Contributor Author

epage commented May 7, 2025

We could have the manifest parser error if the Source is not a Registry.

That might cause problems with the verify step though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-manifest Area: Cargo.toml issues C-enhancement Category: enhancement Command-package Command-publish S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review
Projects
None yet
Development

No branches or pull requests

1 participant