-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
When using go toolchain 1.23.0 and go version 1.23, interfaces with methods that has an aliased type as an argument will fail to generate with the following error
[debug] loadPackages took 32.180249ms
[debug] resolvePackagePath took 11.411105ms
Error: generating circuit wrapper: resolvePkgPaths: invalid type: <module>/api.TestAlias
(The file was not in the module root, but in the /api folder, so I would have expected the path to be <module>/api/api.TestAlias)
This is the smallest example I could create, and produced the above error.
package api
import (
"context"
)
type TestInterface interface {
SomeFunc(ctx context.Context, body TestAlias) (*int, error)
}
type TestAlias = TestBase
type TestBase struct {
Foo int
}Command used to generate:
go run github.com/twitchtv/circuitgen --name TestInterface --pkg ./ --debug --out ./circuit.gen.go --alias TestCircuit --circuit-major-version 3
Metadata
Metadata
Assignees
Labels
No labels