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
In the test case below, rf currently only refactors the x.go and p/x.go. It doesn't refactor any of the _test files.
It seems like the logic around test packages in rf/refactor needs fixing (or maybe you had fixed this in your local x/tools copy?). I can try digging into this, but thought I'd file an issue first in case you know what needs to be done already.
mv X Y
-- go.mod --
module example.com/m
-- x.go --
package m
var X int
var _ = X
-- x_test.go --
package m
var _ = X
-- y_test.go --
package m_test
import "example.com/m"
var _ = m.X
-- p/x.go --
package p
import "example.com/m"
var _ = m.X
-- p/x_test.go --
package p
import "example.com/m"
var _ = m.X
-- p/y_test.go --
package p_test
import "example.com/m"
var _ = m.X
The text was updated successfully, but these errors were encountered:
refactor.go is skipping over all the test packages, because their ID ends in "]".
"m" and "m [m.test]" are type checked as two separate packages, so they have separate types.Object instances representing objects defined within them. This messes up the TypeInfo.Uses[id] == item.Obj checks in refactorings.
In the test case below, rf currently only refactors the x.go and p/x.go. It doesn't refactor any of the _test files.
It seems like the logic around test packages in rf/refactor needs fixing (or maybe you had fixed this in your local x/tools copy?). I can try digging into this, but thought I'd file an issue first in case you know what needs to be done already.
The text was updated successfully, but these errors were encountered: