Older cargo versions should be able to still build ripgrep
Steps To Reproduce
according to the Reddit thread:
clone the ripgrep repo and run cargo +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 use clap and in v4.0.0-rc.1 clap started to use the dep: prefix, causing the index to use features2 field.
The way clap used it and crates.io split the features map into features and features2 resulted in the following:
You can see that the unstable-doc feature depends on the derive feature. But since derive is in features2 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 to features2 too, because it depends on a feature which is itself in features2.
After discussing this with the cargo team on Zulip, we decided that the easiest way forward is to move all features into feature2 if we detect that any feature uses the new feature syntax.
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
.