Skip to content

Conversation

floers
Copy link

@floers floers commented Apr 8, 2025

I created my own registry by using a git repo and found that leaving the features in the dependencies in an index entry does not work. When a crate A has dependencies with features and you try to use it via the registry in crate B the build fails when A uses symbols only available by said features.

I tested with with 1.86

@rustbot
Copy link
Collaborator

rustbot commented Apr 8, 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 A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 8, 2025
@@ -139,7 +139,6 @@ explaining the format of the entry.
// https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html.
"req": "^0.6",
// Array of features (as strings) enabled for this dependency.
// May be omitted since Cargo 1.84.
Copy link
Member

Choose a reason for hiding this comment

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

The doc might be a bit ambiguous. By looking at #14838 and #14839, this omitting means, if empty then you can omit this.

If a package has a features, then the field cannot be omitted.

Copy link
Member

Choose a reason for hiding this comment

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

Could you = give a concrete example of the failing case, and the step to produce?

@weihanglo
Copy link
Member

weihanglo commented Jun 3, 2025

@rustbot author

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 18, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 18, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. label Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants