Skip to content

Cannot generate fakes for types that use aliased internal types #174

@krishicks

Description

@krishicks

👋 I wanted to use counterfeiter to generate a fake that includes a Cadence workflow.Context, which is a type alias to internal.Context: https://github.com/uber-go/cadence-client/blob/0.9.1/workflow/context.go#L33

Creating a fake for the type that references workflow.Context results in the internal package being imported in the fake, which results in a compile error:

... use of internal package go.uber.org/cadence/internal not allowed

It would be great if counterfeiter created a fake for the type alias rather than the type being aliased.

This was tested on counterfeiter v6.3.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions