cmd/go: 'go work use -r' fails to remove entries for deleted subdirectories · Issue #50959 · golang/go · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go work use -r .
cmp go.work go.work.want
-- go.work --
go 1.18
use (
.
sub
sub/dir/deleted
)
-- go.work.want --
go 1.18
use sub/dir
-- sub/README.txt --
A go.mod file has been deleted from this directory.
In addition, the entire subdirectory sub/dir/deleted
has been deleted, along with sub/dir/deleted/go.mod.
-- sub/dir/go.mod --
module example/sub/dir
go 1.18
What did you expect to see?
go work use -r should delete stale entries for subdirectories of the named directory.
What did you see instead?
> go work use -r .
> cmp go.work go.work.want
[diff -go.work +go.work.want]
go 1.18
-use (
- sub/dir
- sub/dir/deleted
-)
+use sub/dir
FAIL: testdata/script/work_use_deleted.txt:2: go.work and go.work.want differ
Uh oh!
There was an error while loading. Please reload this page.
What did you do?
What did you expect to see?
go work use -r
should delete stale entries for subdirectories of the named directory.What did you see instead?
(CC @matloob)
The text was updated successfully, but these errors were encountered: