Skip to content

Swiftbuild build system doesn't emit warning message for unused files #8786

Open
@cmcgee1024

Description

@cmcgee1024

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, swift build, swift test, swift package etc.

Description

When using the native build system, you can often see warning messages in this form when there are unused files (ie. not used as Swift source input, nor plugin inputs) in a sources directory:

... file(s) which are unhandled; explicitly declare them as resources or exclude from the target

However, there is no similar warning that is emitted when using the swiftbuild build system. There should be a portion of the analysis phase that calculates them.

Expected behavior

It is expected that the swiftbuild build system has parity with the native build system.

Actual behavior

Instead, the swiftbuild build system is silent about unused inputs in a sources directory.

Steps to reproduce

No response

Swift Package Manager version/commit hash

main

Swift & OS version (output of swift --version ; uname -a)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugswift buildChanges impacting `swift build`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions