-
Notifications
You must be signed in to change notification settings - Fork 18k
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: go mod tidy on a forked repo fails with unclear error message #35719
Comments
Thanks for reporting this, @moficodes. I took a look at https://github.com/moficodes/promptui, and noticed there was still many files that referenced the old name as an import path:
Changing those files for me locally resolved the issue. This seems to be in line with the error message you mentioned. I'm going to /cc @bcmills to verify if there's a better way to clarify that, but I think it makes sense. |
I dont think having those reference to the old repo was the problem. I created a new folder with a new gomod file
added file
ran got
If I am the only one getting this error then I might have to check my go env setup. |
@agnivade I got rid of all the reference to the old repo from this repo.
Still on the new repo getting the same error message. Thought might module might have been cached. So deleted to Still
|
Because it is taking the 0.3.2 release. Not master. Fetch the master branch or cut a new release and let us know if the problem persists. |
@toothrot, note that files in the
|
@moficodes, what about the error message is unclear? The error messages refer to the specific path and version in use ( You may also find the error messages a bit clearer using a |
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?
This is I think more of an error message issue than anything else.
Say there is a project I like
https://github.com/manifoldco/promptui for example.
Say I forked it.
https://github.com/moficodes/promptui
And then changed the go.mod file to point to a new module name.
module github.com/moficodes/promptui
instead ofmodule github.com/manifoldco/promptui
Now once the code is pushed back to github. Then I want to use it in one my other module project.
What did you expect to see?
Go module to pull the code from the repo.
What did you see instead?
$ go mod tidy
go mod tidy
Solution
This was happening because the original repo had releases and go mod was pulling that as the latest version although the go.mod in the actual repo was updated. So I just made a new release in my fork and it worked ok.
I think the error message can be little bit clearer if possible. I did not see it until I logged into github in my browser.
Or probably there is a more idiomatic way to solve this issue that I am not aware of. Either way more clarity on this would be useful.
😊
The text was updated successfully, but these errors were encountered: