Closed
Description
There appears to be a bug in our logic for determining whether a package can be resolved by adding a module.
This loop sets newMissingVersion
on the returned ImportMissingError
if any of the candidates returned by QueryPackage
is required at a higher version in the build list.
However, if there are multiple (nested) candidate modules and only one is required at a higher version (as in the case of a module split without a requirement cycle; see also #27899), we should suggest adding one of the candidates that is viable, rather than rejecting all of them with a newMissingVersion
error.
This bug was found by code inspection while working on #36460, so I still need to find a test case that reproduces it.