-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
cmd/go: "malformed import path" in Go 1.16 for packages with path elements containing a leading dot [1.16 backport] #44647
Comments
Approving as a serious issue without a workaround. Only Go 1.16 needs this backport. |
Change https://golang.org/cl/297912 mentions this issue: |
Change https://golang.org/cl/298009 mentions this issue: |
…path elements These were always disallowed, but the restriction wasn't enforced in most cases until Go 1.16. That's broken more projects than we hoped. This change allows leading dots in import path elements. Leading dots are still not allowed in module path elements. Leading dots were always allowed in file path elements. Trailing dots are still forbidden in all cases. For golang/go#44647 Change-Id: Id9cf728a341931565ab9e81f600b2341aa178683 Reviewed-on: https://go-review.googlesource.com/c/mod/+/297089 Trust: Jay Conrod <[email protected]> Run-TryBot: Jay Conrod <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> (cherry picked from commit c8bb1bd) Reviewed-on: https://go-review.googlesource.com/c/mod/+/298009 Reviewed-by: Dmitri Shuralyov <[email protected]>
… path check This incorporates CL 298009, which allows leading dots in import path elements but not module path elements. Also added a test. Fixes #44647 Updates #34992 Change-Id: I2d5faabd8f7b23a7943d3f3ccb6707ab5dc2ce3c Reviewed-on: https://go-review.googlesource.com/c/go/+/297530 Trust: Jay Conrod <[email protected]> Run-TryBot: Jay Conrod <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> (cherry picked from commit 97bdac0) Reviewed-on: https://go-review.googlesource.com/c/go/+/297912 Reviewed-by: Dmitri Shuralyov <[email protected]>
Closed by merging 3068d55 to release-branch.go1.16. |
@jayconrod requested issue #43985 to be considered for backport to the next 1.16 minor release.
The text was updated successfully, but these errors were encountered: