Skip to content
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: module loader fails to resolve imports within symlinked source file [1.12 backport] #31763

Closed
gopherbot opened this issue Apr 30, 2019 · 2 comments

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Apr 30, 2019

@katiehockman requested issue #28107 to be considered for backport to the next 1.12 minor release.

@gopherbot please open a backport to 1.12. This is a low risk patch that has enough benefits to warrant a cherrypick.

@gopherbot

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented May 6, 2019

Change https://golang.org/cl/175441 mentions this issue: [release-branch.go1.12] cmd/go/internal/imports: use the full path to resolve symlinks

@gopherbot

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented May 6, 2019

Closed by merging 4a1d39b to release-branch.go1.12.

@gopherbot gopherbot closed this May 6, 2019
gopherbot pushed a commit that referenced this issue May 6, 2019
… resolve symlinks

info.Name returns a name relative to the directory, so we need to
prefix that directory in the Stat call.

(This was missed in CL 141097 due to the fact that the test only
happened to check symlinks in the current directory.)

This allows the misc/ tests to work in module mode on platforms that
support symlinks.

Updates #30228
Updates #28107
Fixes #31763

Change-Id: Ie31836382df0cbd7d203b7a8b637c4743d68b6f3
Reviewed-on: https://go-review.googlesource.com/c/163517
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/175441
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.