traefik / yaegi

Yaegi is Another Elegant Go Interpreter
https://pkg.go.dev/github.com/traefik/yaegi
Apache License 2.0
7.02k stars 348 forks source link

unable to use github.com/coreos/go-oidc/v3/oidc #1589

Open zetaab opened 1 year ago

zetaab commented 1 year ago

The following program sample.go triggers an unexpected result

package main

import (
    "fmt"

    "github.com/coreos/go-oidc/v3/oidc"
)

type config struct {
    provider *oidc.Provider
}

func main() {
    conf := config{}
    fmt.Printf("%+v\n", conf)
}

Expected result

% go run main.go
{provider:<nil>}

Got

% yaegi ./main.go 
run: ./main.go:6:2: import "github.com/coreos/go-oidc/v3/oidc" error: /go/src/github.com/myproject/myproject/vendor/github.com/coreos/go-oidc/v3/oidc/jwks.go:16:2: import "github.com/go-jose/go-jose/v3" error: /go/src/github.com/myproject/myproject/vendor/github.com/go-jose/go-jose/v3/asymmetric.go:33:2: import "github.com/go-jose/go-jose/v3/json" error: /go/src/github.com/myproject/myproject/vendor/github.com/go-jose/go-jose/v3/json/encode.go:650:48: cannot use type *json.encodeState as type io.Writer

Yaegi Version

0.15.1

Additional Notes

No response

sevensolutions commented 4 months ago

Got stuck on the same one.. :/

sebinsua commented 1 month ago

I ran into the same thing using https://github.com/zitadel/oidc