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

Cargo cannot read index with namespaced features. #8044

Closed
ehuss opened this issue Mar 27, 2020 · 2 comments · Fixed by #8799
Closed

Cargo cannot read index with namespaced features. #8044

ehuss opened this issue Mar 27, 2020 · 2 comments · Fixed by #8799
Labels
A-namespaced-features Area: namespaced-features C-bug Category: bug

Comments

@ehuss
Copy link
Contributor

ehuss commented Mar 27, 2020

Problem
An index that contains namespaced features (those with crate:) cannot be used by nightly cargo. The versions published with those features cannot be selected by the resolver.

Steps

  1. Create an index containing crates with namespaced features.
  2. Attempt to use those crates from the index.
  3. Notice that you cannot select versions with those features.

From the log output:

[2020-03-27T16:15:07Z INFO cargo::sources::registry::index] failed to parse "my/th/mything" registry package: Features and dependencies cannot have the same name: common

Possible Solution(s)
It looks like the crux of the issue is this line where the index cache will not parse summaries with namespaced features.

cc @djc

@ehuss ehuss added C-bug Category: bug A-namespaced-features Area: namespaced-features labels Mar 27, 2020
@djc
Copy link
Contributor

djc commented Mar 27, 2020

So I guess RegistryPackage will need to gain a namespaced_features: Option<bool> field, which should be uploaded to the index as well as read from it, right?

@ehuss
Copy link
Contributor Author

ehuss commented Mar 27, 2020

Hm, that would be quite a disappointment if namespaced-features has to be marked in the index. Adding new fields should be done very carefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-namespaced-features Area: namespaced-features C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants