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

module-aware main command imports named awkwardly #28

Open
ysamlan opened this issue Jul 21, 2019 · 1 comment
Open

module-aware main command imports named awkwardly #28

ysamlan opened this issue Jul 21, 2019 · 1 comment

Comments

@ysamlan
Copy link

ysamlan commented Jul 21, 2019

Not 100% sure if this is specific to gex, or go modules binary tools more generally. If a tool has a top-level main binary and uses versioned module support, the naming pulls the version, not the library's name. For example:

gex --add https://github.com/maxbrunsfeld/counterfeiter/v6 adds https://github.com/maxbrunsfeld/counterfeiter as the binary v6. For subcommands they can be imported by their path, but since Counterfeiter's command is top-level - not nested under some name - that won't work reasonably.

In a non-module-aware context you can install counterfeiter as just https://github.com/maxbrunsfeld/counterfeiter without the v6 path, but trying to do gex --add https://github.com/maxbrunsfeld/counterfeiter/@v6.2.2 (for example) won't work because it is module aware - it says go.mod has post-v0 module path "github.com/maxbrunsfeld/counterfeiter/v6".

In any case, fully-namespanced versioned modules theoretically should support older and newer binaries coexisting; not sure if there's a good way to pull that one off.

@ysamlan
Copy link
Author

ysamlan commented Jul 21, 2019

Seems like the same issue as myitcv/gobin#70 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant