Skip to content

Access modifiers on imports in generated files #777

Open
@czechboy0

Description

@czechboy0

Motivation

Starting in Swift 6.0, users can set InternalImportsByDefault as an upcoming feature flag, which makes imports internal by default. Then, if they add accessModifier: package/public, the code fails to build.

Proposed solution

There should be some way to get the access modifier added on the imports as well.

One way: put if #compiler(>=6.0) around imports with the access modifier, and #else won't have it. That way we can do it without other feature flags.

Alternatives considered

No response

Additional information

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