-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: "go get" fails on import path patterns with wildcards ("...") [1.10 backport] #29247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
CherryPickApproved
Used during the release process for point releases
FrozenDueToAge
release-blocker
Milestone
Comments
Change https://golang.org/cl/154111 mentions this issue: |
Closed by merging 25bee96 to release-branch.go1.10. |
gopherbot
pushed a commit
that referenced
this issue
Dec 14, 2018
…o before CheckImportPath Previously, RepoRootForImportPath trimmed certain "..." wildcards from package patterns (even though its name suggests that the argument must be an actual import path). It trimmed at the first path element that was literally "..." (although wildcards in general may appear within a larger path element), and relied on a subsequent check in RepoRootForImportPath to catch confusing resolutions. However, that causes 'go get' with wildcard patterns in fresh paths to fail as of CL 154101: a wildcard pattern is not a valid import path, and fails the path check. (The existing Test{Vendor,Go}Get* packages in go_test.go and vendor_test.go catch the failure, but they are all skipped when the "-short" flag is set — including in all.bash — and we had forgotten to run them separately.) We now trim the path before any element that contains a wildcard, and perform the path check (and repo resolution) on only that prefix. It is possible that the expanded path after fetching the repo will be invalid, but a repository can contain directories that are not valid import paths in general anyway. Fixes #29247 Change-Id: I70fb2f7fc6603b7d339fd6c02e8cdeacfc93fc4b Reviewed-on: https://go-review.googlesource.com/c/154108 Reviewed-by: Russ Cox <[email protected]> Reviewed-on: https://go-review.googlesource.com/c/154111 Run-TryBot: Bryan C. Mills <[email protected]> Reviewed-by: Filippo Valsorda <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
CherryPickApproved
Used during the release process for point releases
FrozenDueToAge
release-blocker
@bcmills requested issue #29241 to be considered for backport to the next 1.10 minor release.
The text was updated successfully, but these errors were encountered: