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

Interface mismatch when developing plugin outside EG dir #345

@mthenw

Description

@mthenw

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions