• Bryan C. Mills's avatar
    cmd/go/internal/modfetch: always check for a go.mod file when fetching from version control · 24a6ca09
    Bryan C. Mills authored
    If the module path declared in the go.mod file does not match the path
    we are trying to resolve, a build using that module is doomed to fail.
    Since we know that the module path does not match in the underlying
    repo, we also know that the requested module does not exist at the
    requested version.
    
    Therefore, we should reject that version in Stat with a “not exist”
    error — sooner rather than later — so that modload.Query will continue
    to check other candidate paths (for example, with a major-version
    suffix added or removed).
    
    Fixes #33099
    
    Change-Id: I43c980f78ed75fa6ace90f237cc3aad46c22d83a
    Reviewed-on: https://go-review.googlesource.com/c/go/+/186237
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarJay Conrod <jayconrod@google.com>
    24a6ca09
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
SECURITY.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...