Skip to content

Apollo v2.0 | Codegen CLI compile issue: '@_spi' properties need to be public #3590

@f-gonzalez

Description

@f-gonzalez

Summary

Just updated to v2.0 and was following the migration guide.
When running the Codegen CLI tool, I am getting this compile error: "Internal property cannot be declared '@_spi' because only public and open declarations can be '@_spi'"

For context (not sure if relevant): it's a modularized App. Apollo is imported and used in different modules/frameworks. Not just the main target app.

Version

2.0

Steps to reproduce the behavior

Just running the CLI.

Before with v1.16.1

let __data: DataDict
init(_dataDict: DataDict) { __data = _dataDict }

Now with v2.0

@_spi(Unsafe) let __data: DataDict
@_spi(Unsafe) init(_dataDict: DataDict) { __data = _dataDict }

If I manually add public it compiles just fine.

Logs

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions