Exactly!
This proposal seems to make it tractable by declaring any ambiguity an error:
This still sounds a bit fishy, but I think we can at least to try implementing this.
E.g. select any suitable resolution during resolving imports (greedy algorithm), then proceed and perform an extra disambiguation checking post-processing stage after import resolution is complete.
The danger is that such greedy algorithm can select one of multiple possible solutions, and which one chosen exactly may depend on things like item order in a module, or expansion algorithm details.
Right now we are stopping import resolution with an error on any possibility of ambiguity so if resolution succeeds, then it’s the only possible solution.
However, If we continue stopping import resolution on any possibility of ambiguity with “full 1path model”, then I suspect we’ll very rarely be able to make any progress.
EDIT: Perhaps for imports we can consider only candidates “planted in modules” + candidates from “known in before sets” like extern crates passed with --extern, then we can make the ambiguity detection sound.
Basically, we can try to approach “1path” (which seems to be the simplest and least confusing mental model) as closely as technically possible while keeping fundamental properties like uniqueness of the found solution.
I need to think about it.