Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Make required dependency as future an error, remove RcList #6860
Make required dependency as future an error, remove RcList #6860
Changes from 6 commits
f0f8565
4590e74
0131d09
df62a57
097dbdf
8cd9b0c
d0c80ec
a473716
35ff555
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to perhaps avoid re-calling
resolve_features
here? I found this somewhat complicated to follow, and figured it might be simpler if we simply walk over the graph after resolution, check the list of activated features for each package, and then present a warning if the feature enables a required dependency.We may produce a slightly worse error message since we don't have why a feature is activated, but that seems reasonable given the age of this warning perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original commit f0f8565, did that. It was a lot cleaner. But it did not work.
resolve_features
is only adds a canonicalized feature tocx.resolve_features
. So I did not find a way to reconstruct the warnings from that. (The hard cases are "invalid9", "dep_feature_in_cmd_line") Suggestions are welcome.I also don't think we can extend that strategy to only the features transitively enabled by some deps. But I would love to be proven wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we could build up a side table or something like that during resolution to facilitate this strategy of emitting warnings? I suppose that's sort of like what happens today, but I think it'd be best to decouple the warning emission as much as we can from the exact state of the resolver today, because it may make future changes to
resolve_features
more complicated in the futureThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, this new code that redos the work of the resolver is going to be a pane to keep in sink.
I gave up on making it work, and the future opportunities of filtering dependencies, and just made this case a resolver bactrackable error.