-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
proposal: cmd/go: allow "go install" a forked repository with cmd #50278
Comments
… until golang/go#50278 is implemented)
This comment was marked as spam.
This comment was marked as spam.
Not only that. How do we even build our modified version to test it before sending a pull request?
|
Just stumbled on this. But this is really a weird situation for handling forks with
And you definitely want 0 changes on mirrors. The question also goes a little bit further (if you want to apply it): What if you want to go install an original project but you want to replace a dependant module (e.g. security update) to a more recent one (The project doesn't get updates right now for some reason). What would be appropriate here? So what I'm trying to say is that this question could also be applied to dependant modules. |
Both methods need to be available.
In the README file (which can be out of band if you don't wanna mess with the repo docs). Perfect for soft forks or for my use case (I'll send patches but I wanna use my souped-up version A. To test before I send the patches,
That is a hard fork. And it needs to be possible to make hard forks too. Here's a blog post summarizing my understanding of the situation. |
i would also like this :) The proposed way seems pretty decent to me...
|
@seankhliao pointed out that #60452 is a duplicate of this issue. The project https://github.com/mineiros-io/terramate was moved to its own GitHub organization and now resides at https://github.com/terramate-io/terramate. The Because of the GitHub HTTP redirect for transferred projects, all the API requests to https://github.com/mineiros-io/terramate repository are redirected to https://github.com/terramate-io/terramate, then In other words, Terramate < 0.3.0 requires As |
Additionally, the Go proxy returns all releases created for https://proxy.golang.org/github.com/mineiros-io/terramate/@v/list Only the |
This will make `go install` work. See: golang/go#50278.
This comment was marked as duplicate.
This comment was marked as duplicate.
This is really needed, otherwise you'll have to replace the module name in all go file to customize a small function. Many libraries heavily reference internal packages and cannot be modified externally. PR to upstream is sometimes long and difficult. |
This comment was marked as duplicate.
This comment was marked as duplicate.
work around lack of golang/go#50278
So if there is a CLI tool implemented in Go (e.g.,
github.com/example/tool/cmd/tool
) which I fork into my namespace and slightly fix (e.g.,github.com/mitar/tool/cmd/tool
), there seems to be no way to currently dogo install github.com/mitar/tool/cmd/tool@latest
to get my fork installed locally without doing find/replace over all files to change original package name to my fork's.I would propose that there is such a way, maybe by providing a
replace
directive using CLI argument while installing, e.g.:This is to support a common use case of collaboration in open source projects:
go install
with the original project.go install
from original location again.Currently I have to do the PR and then in another branch make one more commit on top of the PR, doing find/replace to replace module paths in all the codebase. This is tedious and error prone if during the review of PR I am asked to do modifications. Then I have to do the fix and then re-do the module paths replacements in a new commit.
The text was updated successfully, but these errors were encountered: