features2
in index broke cargo backward compatibility
#6135
Labels
features2
in index broke cargo backward compatibility
#6135
Current Behavior
According to https://www.reddit.com/r/rust/comments/11348jp/comment/j8o4nn6/
ripgrep
can no longer be built by older cargo versions (e.g. 1.13).Expected Behavior
Older cargo versions should be able to still build
ripgrep
Steps To Reproduce
according to the Reddit thread:
clone the
ripgrep
repo and runcargo +1.13.0 b --verbose
Environment
No response
Anything else?
We have identified that the issue is related to how we introduced
features2
to the index.ripgrep
appears to useclap
and in v4.0.0-rc.1clap
started to use thedep:
prefix, causing the index to usefeatures2
field.The way
clap
used it and crates.io split thefeatures
map intofeatures
andfeatures2
resulted in the following:You can see that the
unstable-doc
feature depends on thederive
feature. But sincederive
is infeatures2
the old cargo version thinks that the feature does not exist.When splitting the feature maps we should have recursively moved the
unstable-doc
feature tofeatures2
too, because it depends on a feature which is itself infeatures2
.The text was updated successfully, but these errors were encountered: