Open gtramontina opened 1 year ago
After introducing https://github.com/gtramontina/ooze/pull/5, running mutation tests against Ooze itself (and I think it is safe to assume that other projects too) fails with the following (or similar) error:
https://github.com/gtramontina/ooze/actions/runs/4843531326/jobs/8631215763#step:4:26
Error: panic: failed type checking for file 'internal/cmdtestrunner/cmdtestrunner.go': internal/cmdtestrunner/cmdtestrunner.go:7:2: could not import github.com/gtramontina/ooze/internal/ooze (can't find import: "github.com/gtramontina/ooze/internal/ooze") goroutine 6 [running]: testing.tRunner.func1.2({0x6ef2c0, 0xc000202d20}) /opt/hostedtoolcache/go/1.18.10/x64/src/testing/testing.go:1389 +0x[24](https://github.com/gtramontina/ooze/actions/runs/4843531326/jobs/8631215763#step:4:25)e testing.tRunner.func1() /opt/hostedtoolcache/go/1.18.10/x64/src/testing/testing.go:1392 +0x39f panic({0x6ef2c0, 0xc000202d20}) /opt/hostedtoolcache/go/1.18.10/x64/src/runtime/panic.go:838 +0x207 github.com/gtramontina/ooze/internal/gosourcefile.(*GoSourceFile).Incubate(0xc000124bd0, {0x7ab3e0?, 0xc000010078}) /home/runner/work/ooze/ooze/internal/gosourcefile/gosourcefile.go:46 +0x453 github.com/gtramontina/ooze/internal/ooze.(*Ooze).Release(0xc0001dfe50, {0x95f6e0, 0xe, 0xc0000b7e30?}) /home/runner/work/ooze/ooze/internal/ooze/ooze.go:83 +0x2[25](https://github.com/gtramontina/ooze/actions/runs/4843531326/jobs/8631215763#step:4:26) github.com/gtramontina/ooze.Release(0xc000097860, {0xc0000b7f[30](https://github.com/gtramontina/ooze/actions/runs/4843531326/jobs/8631215763#step:4:31), 0x6, 0x3a?}) /home/runner/work/ooze/ooze/release.go:138 +0xa3a github.com/gtramontina/ooze_test.TestMutation(0x0?) /home/runner/work/ooze/ooze/ooze_mutation_test.go:12 +0xeb testing.tRunner(0xc000097860, 0x75a558) /opt/hostedtoolcache/go/1.18.10/x64/src/testing/testing.go:1439 +0x102 created by testing.(*T).Run /opt/hostedtoolcache/go/1.18.10/x64/src/testing/testing.go:1486 +0x[35](https://github.com/gtramontina/ooze/actions/runs/4843531326/jobs/8631215763#step:4:36)f
Interesting. I guess simply using importer.Default is not enough. golangci-lint seems to use a custom importer. Will have to dig deeper into this.
importer.Default
After introducing https://github.com/gtramontina/ooze/pull/5, running mutation tests against Ooze itself (and I think it is safe to assume that other projects too) fails with the following (or similar) error:
https://github.com/gtramontina/ooze/actions/runs/4843531326/jobs/8631215763#step:4:26