-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: 'go test' with a file argument in a module root uses the wrong import path #28011
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
Comments
In module mode, we use the module path to determine internal-package visibility. So whether the current behavior is correct depends on your module path.
|
Here we go:
This might also be of interest:
But (not sure it does anything, but it doesn't complain about a noop at least):
|
@andig - can you provide a link to a repro? Because I'm having trouble reproducing this. Indeed there is even a specific test
internal as working
|
@myitcv note that |
@andig I note the following:
What is the module path declared in |
Here it is:
The good thing is I can still reproduce this and do further tests. |
@bcmills - yes, I had totally missed that the the failing command is |
I'm happy with |
I'd like to at least figure out what's going on here, but it sounds like you have a workaround for now. |
Change https://golang.org/cl/153459 mentions this issue: |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?What did you do?
I have script that imports from an internal package for testing:
What did you expect to see?
Since I can import internal packages otherwhere it would be nice to do so for testing.
What did you see instead?
The text was updated successfully, but these errors were encountered: