Skip to content

Swift Bundler pulls in dependencies declared by conditionally unused targets #196

@stackotter

Description

@stackotter

When compiling a SwiftCrossUI app on Linux I'm getting the following log message;

info: Copying product 'swift-windowsappsdk.WindowsAppRuntime.installer required by target swift-windowsappsdk.WinAppSDK'

Clearly, ProjectBuilder is failing to realise that although my app transitively depends on swift-windowsappsdk, that dependency is only active when compiling for Windows, because it's used by a dependency that has condition: .when(platforms: [.windows]). I believe that this may be happening because we're not merging conditions dependencies into the conditions of their own dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions