-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Resolver: Batched Import Resolution #145108
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
base: master
Are you sure you want to change the base?
Resolver: Batched Import Resolution #145108
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Code looks a little better now and should be more correct than the previous commits, but I have yet to find a way to resolve the current test failures. |
This comment has been minimized.
This comment has been minimized.
Okey, I did fix |
a3f8ae2
to
4a2a0dc
Compare
This comment has been minimized.
This comment has been minimized.
Could you update the tests to make CI green, so I can see the difference? |
Moving |
I'll create a pr for it. |
3b2e50e
to
4efdee8
Compare
This comment has been minimized.
This comment has been minimized.
Original resolver errors are resolved, but... |
Collect side effects from the current set of undetermined imports and only apply them at the end.
4efdee8
to
8499dd2
Compare
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Some tests get different or duplicate errors on some lines. Not sure why this is yet. |
This comment was marked as resolved.
This comment was marked as resolved.
Had to bless/change a lot of tests, but they all look like duplicates; I didn't spot anything wrong going on. |
Answered on zulip about this. |
fe82c39
to
c334245
Compare
// HACK: Use array of namespaces in the same order as `per_ns_mut`. | ||
// We can't use `per_ns_cm` because of the invariance on CmResolver (RefOrMut). | ||
for ns in [TypeNS, ValueNS, MacroNS] { |
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.
Unfortunately, the only way out.
@@ -23,6 +23,4 @@ fn main() { | |||
date_range(); | |||
//~^ ERROR `date_range` is ambiguous | |||
//~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | |||
//~| ERROR `date_range` is ambiguous | |||
//~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
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.
First import not receiving the warning is the wrong part.
glob_conflict::glob::f(); //~ ERROR cannot find function `f` in module `glob_conflict::glob` | ||
glob_conflict::glob::f(); |
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.
Also wrong, I believe. Should give an error or a warning.
The job Click to see the possible cause of the failure (guessed by this bot)
|
Transforms the current algorithm for resolving imports to a batched algorithm. Every import in the
indeterminate_imports
set is resolved in isolation. This is the only real difference from the current algorithm.r? petrochenkov