-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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: main
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. |
|
Did you also want this to include the parallelisation of the algorithm in this pr? If so, I can start looking into it while waiting on those pr's. |
No, of course not, it is nontrivial and will also take at least weeks, if not more. |
Yeah, that's what I thought 😅. Will look into it! |
resolve: Preserve ambiguous glob reexports in crate metadata So in cross-crate scenarios they can work in the same way as in crate-local scenarios. Change Description: #147984 (comment) Resurrection of #114682. One of unblocking steps for #145108. Fixes #36837.
…r=petrochenkov Resolve the prelude import in `build_reduced_graph` This pr tries to resolve the prelude import at the `build_reduced_graph` stage. Part of batched import resolution in rust-lang/rust#145108 (cherry picked commit) and maybe needed for rust-lang/rust#139493. r? petrochenkov
…etrochenkov Test: Ambigious bindings in same namespace with the same res Add a test based on the discussion [here](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Parallel.20Macro.20Expansion/near/542316157) and related to rust-lang/rust#145575 (comment). This is the most reduced form I could create that passes on nightly but fails with rust-lang/rust#145108 (see [#gsoc > Project: Parallel Macro Expansion @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Parallel.20Macro.20Expansion/near/542335131)). Also not sure about the test names. r? `@petrochenkov`
…chenkov use module_child index as disambiguator for external items When defining the items of an external module, if that item is an underscore we use it's index as the disambiguator. This is needed for parallel import resolution, which is being worked on in rust-lang/rust#145108. r? `@petrochenkov`
88b3daf to
4632f09
Compare
This comment has been minimized.
This comment has been minimized.
|
I finally rebased... should have done that way sooner, but it went well. The only problem is that Luckily I'm following issues/pr's made to the resolver, so I remembered it was related to #150927 and fixed in #150939. I removed it for now, couldn't find another clean way to ignore it. When that pr is merged I can just remove the commit. Also the |
This comment has been minimized.
This comment has been minimized.
IIRC, the hack changed the resolution priorities to avoid breakage, while #149596 only adds a warning for the conflicting visibilities, so the hack will still be needed in some form. |
|
Although if a new patch version of rust-embed is published, and the issue doesn't occur in other known crates, then maybe it won't be needed. We'll run crater on this PR in any case, once all the blocking PRs are merged. |
The patch was published a while back as rust-embed/8.8.0. The latest version is 8.10.0. Though this error happens in dependencies, everything works fine crate-local.
IIRC, |
|
☔ The latest upstream changes (presumably #151107) made this pull request unmergeable. Please resolve the merge conflicts. |
Collect side effects from the current set of undetermined imports and only apply them at the end. + Bless tests
4632f09 to
0f6b71c
Compare
|
This PR was rebased onto a different main 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. |
|
Had to rebase again, in the last commit the test |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
☔ The latest upstream changes (presumably #151158) made this pull request unmergeable. Please resolve the merge conflicts. |
Transforms the current algorithm for resolving imports to a batched algorithm. Every import in the
indeterminate_importsset is resolved in isolation. This is the only real difference from the current algorithm.r? petrochenkov