Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Interface mismatch when developing plugin outside EG dir #345

Closed
mthenw opened this issue Nov 6, 2017 · 0 comments
Closed

Interface mismatch when developing plugin outside EG dir #345

mthenw opened this issue Nov 6, 2017 · 0 comments

Comments

@mthenw
Copy link
Contributor

mthenw commented Nov 6, 2017

This is a Bug Report

The problem is that if we develop plugin outside EG directory plugin cannot be compiled because of interface mismatch. EG uses vendored hashicorp/go-plugin which causes the problem.

Error message

./main.go:10:3: cannot use "github.com/serverless/event-gateway/plugin".SubscriberPlugin literal (type *"github.com/serverless/event-gateway/plugin".SubscriberPlugin) as type "github.com/hashicorp/go-plugin".Plugin in map value:
	*"github.com/serverless/event-gateway/plugin".SubscriberPlugin does not implement "github.com/hashicorp/go-plugin".Plugin (wrong type for Client method)
		have Client(*"github.com/serverless/event-gateway/vendor/github.com/hashicorp/go-plugin".MuxBroker, *rpc.Client) (interface {}, error)
		want Client(*"github.com/hashicorp/go-plugin".MuxBroker, *rpc.Client) (interface {}, error)

One solution is to exclude github.com/hashicorp/go-plugin and github.com/hashicorp/go-hclog from vendoring but that causes some more problems with x/net/trace registered twice.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant