-
Notifications
You must be signed in to change notification settings - Fork 23
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
well known module config #38
Comments
When you run that Have you considered specifying the directory as part of the regular An even crazier idea would be to piggyback off an existing file in a module. I can imagine a comment in |
That's quite a verbose option, yes. Almost akin to setting the environment variable as part of the command itself, e.g.
I use such a magic wrapper, but not everyone does. This sort of thing feels like an additional bar.
Yes, I think this is something that doesn't work... not least because this particular example is something that is global. |
I can definitely see the motivation for this idea. I might be tempted to put the config file at Another possibility to consider is being able to specify a gohack location for a subtree. For example, I might want all modules under |
I also think there is some scope for a module-local config that overrides the global well known "default". In many respects this would be similar to how a |
One of the more frequent comments from those moving from a GOPATH setup to modules is that they lose the ability to know where a given module dependency M is on disk. M is likely a module that they "own" / contribute to, and hence want to make changes and upstream them (frequently). The read-only module cache makes sense, and requiring a step to
replace
away from that remains sensible.But I wonder whether
gohack
can do more to help here.The directory
$HOME/gohack
is intentionally named so that it be considered a sort of throw-away area.One of the early ideas we toyed with was "namespaced" hacks. But we settled on a sensible default for
GOHACK
and support for "namespaces" can be achieved byGOHACK=$HOME/mywork gohack $module
.That said, perhaps for this more common use case of "use the M on disk in its usual location" it makes sense to drive this with some sort of config.
Thoughts, please @rogpeppe @mvdan
The text was updated successfully, but these errors were encountered: