Skip to content

Feature request: @_spi support #561

@aim2120

Description

@aim2120

Hi! I wanted to raise a feature request for @_spi support in mocked types.

For example:

// Module1
protocol MyService {
  @_spi(MyServiceInternal) func secret()
}

What would be needed to support the above:

  • The ability to add @_spi(...) import statements to the generated mocks alongside other imports.
  • The ability to add @_spi(...) to generate mock properties and functions that had @_spi annotations in the original type.

As a workaround today, I have to manually edit generated mocks to add both of the above features and commit those hand-edited files. It would be amazing for Cuckoo to support this (if I have time, I may take a stab at adding this feature).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions