Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?
[X] 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
I have a SwiftPM target that applies a build tool plugin to generate some Swift sources. It correctly lists the .swift files that it generates in its output list. If there are no ".swift" files in the target before the plugin runs, I get a warning like this:
warning: 'swift-java-deps': Source files for target JavaMath should be located under 'Sources/JavaMath', 'Sources', or a custom sources path can be set with the 'path' property in Package.swift
and the target itself is never built.
Expected behavior
The fact that the build tool plugin is attached to the target and promises to produce ".swift" files should be sufficient to (1) suppress the warning, and (2) cause the target to get built.
Actual behavior
The warning I've mentioned. Additionally, the build tool plugin never runs, and nothing is built for this target. It is completely skipped.
Is it reproducible with SwiftPM command-line tools:
swift build
,swift test
,swift package
etc?swift build
,swift test
,swift package
etc.Description
I have a SwiftPM target that applies a build tool plugin to generate some Swift sources. It correctly lists the .swift files that it generates in its output list. If there are no ".swift" files in the target before the plugin runs, I get a warning like this:
and the target itself is never built.
Expected behavior
The fact that the build tool plugin is attached to the target and promises to produce ".swift" files should be sufficient to (1) suppress the warning, and (2) cause the target to get built.
Actual behavior
The warning I've mentioned. Additionally, the build tool plugin never runs, and nothing is built for this target. It is completely skipped.
Steps to reproduce
git clone https://github.com/DougGregor/swift-java-deps/tree/no-source-files
git checkout no-source-files
swift build
Swift Package Manager version/commit hash
6.0
Swift & OS version (output of
swift --version ; uname -a
)