rf
rf copied to clipboard
Tests are failing with go1.19 and newer
There might a behavior regression in Go, since go1.16 can run the tests successfully, but go1.19 and gotip fail with panic: lost receiver name.
go1.16.10 test ./...
ok rsc.io/rf 28.153s
ok rsc.io/rf/diff 0.167s
? rsc.io/rf/git-generate [no test files]
ok rsc.io/rf/refactor 0.168s
go version
go version go1.19.3 darwin/amd64
go test ./...
panic executing: mv x.go f.go
--- FAIL: TestRun (8.76s)
--- FAIL: TestRun/mv_file4.txt (0.70s)
rf_test.go:85: testdata/mv_file4.txt
panic: lost receiver name [recovered]
panic: lost receiver name [recovered]
panic: lost receiver name
goroutine 434 [running]:
testing.tRunner.func1.2({0x12a71c0, 0x135e9d0})
/usr/local/opt/go/libexec/src/testing/testing.go:1396 +0x24e
testing.tRunner.func1()
/usr/local/opt/go/libexec/src/testing/testing.go:1399 +0x39f
panic({0x12a71c0, 0x135e9d0})
/usr/local/opt/go/libexec/src/runtime/panic.go:884 +0x212
rsc.io/rf.run.func1()
/Users/vearutop/dev/rf/rf.go:76 +0xa5
panic({0x12a71c0, 0x135e9d0})
/usr/local/opt/go/libexec/src/runtime/panic.go:884 +0x212
rsc.io/rf/refactor.(*Snapshot).addPkgDeps(0x0?, 0xc0008db909?, 0xc009f09ad0)
/Users/vearutop/dev/rf/refactor/pkgref.go:223 +0x46f
rsc.io/rf/refactor.(*Snapshot).DepsGraph(0xc00012aab0, 0x2)
/Users/vearutop/dev/rf/refactor/pkgref.go:147 +0x6d
rsc.io/rf.mvCode(0xc00012aab0, {0xc00c8a6bb0, 0x1, 0xc00ad91da0?}, 0xc000058110?, 0xc00ae8aea0)
/Users/vearutop/dev/rf/mvcode.go:122 +0x59d
rsc.io/rf.cmdMv(0xc00012aab0, {0xc004838303?, 0x12f9946?})
/Users/vearutop/dev/rf/mv.go:127 +0xb7a
rsc.io/rf.run(0xc0031f27e0, {0xc0048382a0?, 0xd?})
/Users/vearutop/dev/rf/rf.go:133 +0x2d1
rsc.io/rf.TestRun.func1(0xc008f82b60)
/Users/vearutop/dev/rf/rf_test.go:121 +0x345
testing.tRunner(0xc008f82b60, 0xc00beae6a0)
/usr/local/opt/go/libexec/src/testing/testing.go:1446 +0x10b
created by testing.(*T).Run
/usr/local/opt/go/libexec/src/testing/testing.go:1493 +0x35f
FAIL rsc.io/rf 8.927s
ok rsc.io/rf/diff (cached)
? rsc.io/rf/git-generate [no test files]
ok rsc.io/rf/refactor (cached)
FAIL