I am developing a traefik plugin middleware .
When I execute the yaegi on my plugin file, it says: \vendor\google.golang.org\protobuf\reflect\protoreflect\value_unsafe_go121.go:11:2 import "unsafe" error: unable to find source related to: "unsafe"
I use gRPC and the code generated by protoc-gen-go imports protoreflect "protoreflect package - google.golang.org/protobuf/reflect/protoreflect - Go Packages ", which imports "unsafe" package.
Does this mean that I cannot make use of protobufs and gRPC integration within the plugin entry file? If so, is there a work-around for this?
If I search for it on github I find this:
opened 03:48PM - 25 Oct 20 UTC
closed 12:00AM - 11 Nov 20 UTC
kind/question
status/5-frozen-due-to-age
### Do you want to request a *feature* or report a *bug*?
<!--
DO NOT FILE I… SSUES FOR GENERAL SUPPORT QUESTIONS.
The issue tracker is for reporting bugs and feature requests only.
For end-user related support questions, please refer to one of the following:
- the Traefik community forum: https://community.containo.us/
-->
Bug
<!--
The configurations between 1.X and 2.X are NOT compatible.
Please have a look here https://doc.traefik.io/traefik/getting-started/configuration-overview/.
-->
### What did you do?
<!--
HOW TO WRITE A GOOD BUG REPORT?
- Respect the issue template as much as possible.
- The title should be short and descriptive.
- Explain the conditions which led you to report this issue: the context.
- The context should lead to something, an idea or a problem that you’re facing.
- Remain clear and concise.
- Format your messages to help the reader focus on what matters and understand the structure of your message, use Markdown syntax https://help.github.com/articles/github-flavored-markdown
-->
I'm trying to write a Træfik plugin
### What did you expect to see?
Everything is ok
### What did you see instead?
Loog error related to unsafe (and third-party libraries too)
### Output of `traefik version`: (_What version of Traefik are you using?_)
<!--
`latest` is not considered as a valid version.
For the Traefik Docker image:
docker run [IMAGE] version
ex: docker run traefik version
-->
```
v2.3.1
```
### What is your environment & configuration (arguments, toml, provider, platform, ...)?
```yaml
# traefik.yml
api:
dashboard: true
insecure: true
pilot:
token: "XXX-SECRET-XXX"
experimental:
devPlugin:
goPath: /plugins/go
moduleName: github.com/darkweak/souin
log:
level: DEBUG
accessLog: {}
```
| Type | Value |
|---|---|
|Platform|MacOS and Docker (with and without compose)|
|Arguments|None|
<!--
Add more configuration information here.
-->
### If applicable, please paste the log output in DEBUG level (`--log.level=DEBUG` switch)
```
2020/10/25 18:38:25 traefik.go:76: command traefik error: github.com/darkweak/souin: failed to import plugin code "github.com/darkweak/souin/plugins/traefik": 1:21: import "github.com/darkweak/souin/plugins/traefik" error: /plugins/go/src/github.com/darkweak/souin/plugins/traefik/main.go:10:2: import "github.com/darkweak/souin/cache/providers" error: /plugins/go/src/github.com/darkweak/souin/cache/providers/ristrettoProvider.go:6:2: import "github.com/dgraph-io/ristretto" error: /plugins/go/src/github.com/darkweak/souin/vendor/github.com/dgraph-io/ristretto/cache.go:29:2: import "github.com/dgraph-io/ristretto/z" error: /plugins/go/src/github.com/darkweak/souin/vendor/github.com/dgraph-io/ristretto/z/bbloom.go:28:2: import "unsafe" error: unable to find source related to: "unsafe"
```
However, it seems that there was no comprehensive update since 2020 regarding this issue.
Hi Denis,
I have exactly the same problem as you. I would like to build a plugin that uses grpc and am now faced with the problem that yaegi cannot load “unsafe”. Have you found any solution?