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

Error: disabled by -mod=readonly #39

Closed
gedw99 opened this issue Jun 18, 2023 · 11 comments
Closed

Error: disabled by -mod=readonly #39

gedw99 opened this issue Jun 18, 2023 · 11 comments

Comments

@gedw99
Copy link

gedw99 commented Jun 18, 2023

when i run it with no args:

 ⨯ upgrade failed            error=Error running go command to discover modules: exit status 1 stderr=go: updates to go.sum needed, disabled by -mod=readonly

have been getting this every since i upgrades go to 1.20.5. Or it might be the repos i am upgrading.. not sure sure right now what going on...

@gedw99
Copy link
Author

gedw99 commented Jun 18, 2023

@oligot

Ok i was right - i changed to go 1.20.4 and then go-mod-upgrade works again.

i guess the go team changed something ...

@gedw99
Copy link
Author

gedw99 commented Jun 18, 2023

i have gotip, and so need to try it with that.. maybe its fixed there..

@lespea
Copy link

lespea commented Jun 18, 2023

golang/go#60667

@oligot
Copy link
Owner

oligot commented Jun 19, 2023

Could you test the workaround proposed in issue 60667 and see if it works for you ?

@gedw99
Copy link
Author

gedw99 commented Jun 19, 2023

Can sone else try. Am in a work crunch …

@thediveo
Copy link

Can confirm that it fails for 1.20.5 and works for 1.20.4; and I'm in a crunch too. Looks like this is an upstream issue anyway.

@gedw99
Copy link
Author

gedw99 commented Jun 20, 2023

I was planning to try it on gotip today. Curious what it does there.

Will try tomorrow

@joeblew99
Copy link

joeblew99 commented Jun 20, 2023

i am an idiot . wrong issue

please see my test here: #40 (comment)

it all seems to be ok if you use higher go mod version and go tip at least.

@fancar
Copy link

fancar commented Jun 21, 2023

even go list throws the same:
go list -m -u -f '{{if not .Indirect}}{{.Path}} {{.Deprecated}}{{end}}' all
go: updates to go.sum needed, disabled by -mod=readonly

@carlmontanari
Copy link

Could you test the workaround proposed in issue 60667 and see if it works for you ?

confirming saw this issue and that go mod tidy -compat=1.16 then re-running go-mod-upgrade worked just fine w/ go 1.20.5

@oligot
Copy link
Owner

oligot commented Jun 26, 2023

Thanks @carlmontanari for your feedback !
I'm closing this issue, as this is an upstream bug (golang/go#60667).
Feel free to reopen if the problem persists.

@oligot oligot closed this as completed Jun 26, 2023
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

7 participants