Events in custom golang plugin

If i try to throw events like :

import (
...
	"github.com/TykTechnologies/tyk/gateway"
...
) 

...
gateway.FireSystemEvent(gateway.EventAuthFailure, gateway.EventMetaDefault{
			Message: "Auth failed (no token)",
})
...

Then tykio/tyk-plugin-compiler:v2.9.3 complains about :

 ../vendor/golang.org/x/net/html/charset/charset.go:20:2: cannot find package "golang.org/x/text/encoding" in any of:
        /go/src/vendor/golang.org/x/text/encoding (vendor tree)
        /usr/local/go/src/golang.org/x/text/encoding (from $GOROOT)
        /go/src/golang.org/x/text/encoding (from $GOPATH)
../vendor/golang.org/x/net/html/charset/charset.go:21:2: cannot find package "golang.org/x/text/encoding/charmap" in any of:
        /go/src/vendor/golang.org/x/text/encoding/charmap (vendor tree)
        /usr/local/go/src/golang.org/x/text/encoding/charmap (from $GOROOT)
        /go/src/golang.org/x/text/encoding/charmap (from $GOPATH)
../vendor/golang.org/x/net/html/charset/charset.go:22:2: cannot find package "golang.org/x/text/encoding/htmlindex" in any of:
        /go/src/vendor/golang.org/x/text/encoding/htmlindex (vendor tree)
        /usr/local/go/src/golang.org/x/text/encoding/htmlindex (from $GOROOT)
        /go/src/golang.org/x/text/encoding/htmlindex (from $GOPATH)
../vendor/golang.org/x/net/html/charset/charset.go:23:2: cannot find package "golang.org/x/text/transform" in any of:
        /go/src/vendor/golang.org/x/text/transform (vendor tree)
        /usr/local/go/src/golang.org/x/text/transform (from $GOROOT)
        /go/src/golang.org/x/text/transform (from $GOPATH)

If I add The Go Programming Language to vendor dir in compiler plugin, then gateway complains about versions :

“plugin was built with a different version of package github.com/TykTechnologies/tyk/goplugin

I would expect it to work, since gateway.FireSystemEvent is used in lots of middleware code in gateway.

https://api.github.com/repos/TykTechnologies/tyk/tarball/v2.9.3 does not contain The Go Programming Language

https://api.github.com/repos/TykTechnologies/tyk/tarball/ (is this head?) contains The Go Programming Language

Error in tarball ?

did you find out why?
I am trying also to use the gateway module and encounter the same situation.