Yaegi compilation error on vendor dependency

Hey everyone !

I'm trying to develop my first Traefik Middleware Plugin, and I encounter a compilation error with Yaegi, in one of the dependencies.
The source code is here : GitHub - gdarmont/traefik-cloudflare-access-plugin
Here is the error, extracted from the Plugin Analyzer issue :

failed to run the plugin with Yaegi: the load of the plugin takes too much time(10s), or an error, inside the plugin, occurs during the load:
1:21: import "github.com/gdarmont/traefik-cloudflare-access-plugin"
error: /tmp/traefik-plugin-gop1939454376/src/github.com/gdarmont/traefik-cloudflare-access-plugin/cloudflare-auth-verifier.go:9:2: import "github.com/coreos/go-oidc/v3/oidc"
error: /tmp/traefik-plugin-gop1939454376/src/github.com/gdarmont/traefik-cloudflare-access-plugin/vendor/github.com/coreos/go-oidc/v3/oidc/jwks.go:16:2: import "github.com/go-jose/go-jose/v3"
error: /tmp/traefik-plugin-gop1939454376/src/github.com/gdarmont/traefik-cloudflare-access-plugin/vendor/github.com/go-jose/go-jose/v3/asymmetric.go:33:2: import "github.com/go-jose/go-jose/v3/json"
error: /tmp/traefik-plugin-gop1939454376/src/github.com/gdarmont/traefik-cloudflare-access-plugin/vendor/github.com/go-jose/go-jose/v3/json/encode.go:650:48: cannot use type *json.encodeState as type io.Writer

I have the same error when running the command yaegi test -v . on my local dev env.
The tests (go go test -v -cover ./...) are running fine though.
I checked the "Troubleshooting" section here to be sure to not forget anything, and I think I'm good.

I'm not used to golang dev nor Traefik Plugins, so I may miss something obvious.

Any suggestion is greatly appreciated.
Guillaume

Not sure if it is related, but there was a recent post that plugins can not use the latest go version.

Thanks for the suggestion. Unfortunately this does not seem to be the cause here. I tried with go 1.20 and 1.19 with not much success.
I'll keep on searching.

The problem appears to be a bug in Yaegi :frowning: . The associated issue is here..

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.