Closed sdboyer closed 7 years ago
Turns out this was a caching problem - the initial deduction was correct, but I was thinking incorrectly about the different "root" values coming back from an httpMetadataDeducer
, and thus was inserting the original requested import path into the trie/cache.
Consequently, the first result reported was correct (which is why existing gps' tests didn't catch the problem), but subsequent cached results would be incorrect, as described in the other issue.
The fix removes the overzealous insert. It also changes all the deduction tests to always run twice, so that we test both the cached and uncached paths.
golang/dep#387 discovered an issue where vanity imports would not operate on the correct root. For example,
golang.org/x/net/html
would reportgolang.org/x/net/html
as the root instead ofgolang.org/x/net
.