-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: cannot install vendored binary in module aware mode #45115
Comments
This may be working as intended. But it would be good if someone who is more familiar with modules could confirm or correct me. cc @bcmills If it is intended, perhaps the error could be made clearer. |
@bhcleek, is the source code for the command actually present in (Can you provide specific steps to reproduce the problem, including the steps used to populate the |
Yes, it's actually present. Here's a script to duplicate this issue. Notice that it does
|
Thanks.
In In contrast, in module mode with So in module mode, the command you're looking for should either use the actual canonical import path:
or, if you want to be agnostic to whether you are in module mode, you can use the absolute filesystem path (which is recognizably not a package import path):
|
I think if anything this is a documentation issue, but I'm not sure which documentation we would need to update. @stevetraut: do our new modules user-docs have a section on how to create and use vendored dependencies ( |
@bcmills I think this may be more than a documentation issue. Today I found some inconsistencies in how vendored commands can be built in module aware mode. A vendored
Stringer is not in a module, so it would seem that there are differences in |
@bcmills this ( |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
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
)?go env
OutputWhat did you do?
go install $MODULE/vendor/some/vendored/command
in module aware mode.What did you expect to see?
The command to be installed as it is in GOPATH mode.
What did you see instead?
The text was updated successfully, but these errors were encountered: