• Russ Cox's avatar
    cmd/go: diagnose non-canonical import paths before compilation · 59b0e147
    Russ Cox authored
    If we leave it for compilation sometimes the error appears first
    in derived vendor paths, without any indication where they came from.
    This is better.
    
    $ go1.7 build canonical/d
    cmd/go/testdata/src/canonical/a/a.go:3: non-canonical import path "canonical/a//vendor/c" (should be "canonical/a/vendor/c")
    cmd/go/testdata/src/canonical/a/a.go:3: can't find import: "canonical/a//vendor/c"
    
    $ go build canonical/d
    package canonical/d
    	imports canonical/b
    	imports canonical/a/: non-canonical import path: "canonical/a/" should be "canonical/a"
    $
    
    Fixes #16954.
    
    Change-Id: I315ccec92a00d98a08c139b3dc4e17dbc640edd0
    Reviewed-on: https://go-review.googlesource.com/31668Reviewed-by: 's avatarQuentin Smith <quentin@golang.org>
    59b0e147
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...
favicon.ico Loading commit data...
robots.txt Loading commit data...