Do not share exclusion cache For some reason (that I'm obviously not smart enough to figure out), we can't share the exclusion cache for the whole build, because even if its safe, resolution is sensitive to the order of entries in the cache.
Sort module selectors This commit reworks module selectors so that they are sorted in an order which reduces the cost of module selection. We make sure to put local (project) selectors first, then we use selectors from locks (if any).
The next selectors are "latest" version selectors because even if they are dynamic, they are likely to "win" selection. Then, exact version selectors are sorted by version descending , and last we add dynamic version selectors.