-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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 install: don’t fail when go.mod can’t be updated on a read-only system #33326
Comments
Change https://golang.org/cl/204521 mentions this issue: |
Updates #30185 Updates #33326 Updates #34822 Change-Id: Ie13651585898d1bbbf4f779b97ee50b6c7e7ad50 Reviewed-on: https://go-review.googlesource.com/c/go/+/204521 Run-TryBot: Bryan C. Mills <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
Change https://golang.org/cl/204878 mentions this issue: |
Updates #31870 Updates #33326 Fixes #34822 Change-Id: I1337f171133c20800eacc6b0955ede5a394ea7eb Reviewed-on: https://go-review.googlesource.com/c/go/+/204878 Run-TryBot: Bryan C. Mills <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
That should be fixed by https://golang.org/cl/205637, which is now in. @stapelberg, provided that the |
Change https://golang.org/cl/210341 mentions this issue: |
This location was missed in CL 204521. Updates #33326 Updates #33848 Change-Id: I0ece6d9b37548d8abb54f79c69be5548a0428c76 Reviewed-on: https://go-review.googlesource.com/c/go/+/210341 Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
Thanks for the changes! Just got around to giving this a spin with the now-available Go 1.14 beta 1 release. Unfortunately, I still get the same error message when running
Running I compared the --- before 2019-12-25 20:37:30.061450310 +0100
+++ after 2019-12-25 20:37:35.951455273 +0100
@@ -1,19 +1,11 @@
module github.com/junegunn/fzf
require (
- github.com/gdamore/encoding v0.0.0-20151215212835-b23993cbb635 // indirect
github.com/gdamore/tcell v0.0.0-20170915061752-0a0db94084df
- github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect
- github.com/jtolds/gls v4.2.1+incompatible // indirect
- github.com/lucasb-eyer/go-colorful v0.0.0-20170223221042-c900de9dbbc7 // indirect
github.com/mattn/go-isatty v0.0.0-20160806122752-66b8e73f3f5c
- github.com/mattn/go-runewidth v0.0.0-20170201023540-14207d285c6c
+ github.com/mattn/go-runewidth v0.0.4
github.com/mattn/go-shellwords v1.0.3
- github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect
- github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c // indirect
- golang.org/x/crypto v0.0.0-20170728183002-558b6879de74
- golang.org/x/sys v0.0.0-20190509141414-a5b02f93d862 // indirect
- golang.org/x/text v0.0.0-20170530162606-4ee4af566555 // indirect
+ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
)
replace golang.org/x/tools => golang.org/x/tools v0.0.0-20190311212946-11955173bddd
@@ -49,3 +41,5 @@
replace github.com/gdamore/encoding => github.com/gdamore/encoding v1.0.0
replace github.com/DATA-DOG/go-sqlmock => github.com/DATA-DOG/go-sqlmock v1.3.3
+
+go 1.13 Whole go.mod files: before
after
I’m not sure why the Go tool thinks it needs to update anything—I thought fully specifying the versions using replace directives should have been enough. Let me know if I should file a separate issue for this, but the intention and steps to reproduce are still the same :) |
Change https://golang.org/cl/219237 mentions this issue: |
… 'go list' Discovered while investigating #37197. Updates #33326 Updates #34822 Change-Id: I38b136a4ee762a580a554125066b9778491295f2 Reviewed-on: https://go-review.googlesource.com/c/go/+/219237 Run-TryBot: Bryan C. Mills <[email protected]> Reviewed-by: Michael Matloob <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
I talked about this issue with @bcmills over GopherCon 2019 and he recommended I file this issue for tracking.
I am using cmd/go in a build environment where the entire system is read-only, but I have a writable copy of the source tree I’m building (e.g.
github.com/junegunn/fzf
). The system provides a read-only module cache (at/ro/gopath/pkg/mod
) which contains all the dependencies of the source tree.I’m using
replace
directives to enforce that my environment’s module versions are used, which can be different from the versions listed in go.mod/go.sum. See #29410 (comment) for details.When running
go install
, it fails to lock the module cache because it’s read-only:So far so good—it’s reasonable to not continuing when the side lock can’t be acquired. But, when specifying
-mod=readonly
, I’m getting:I don’t know that
go install
should error out here. Certainly it could just continue with whatever changes needed just being retained in memory? As a user, I’m interested in the binary installation, not the side effect updates.Thanks for considering,
The text was updated successfully, but these errors were encountered: