-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
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 packageetc.
Description
When only a resource file that is embedded in Swift source code is modified, SwiftPM does not rebuild the targets when using SwiftBuild.
Expected behavior
The resource files are considered as inputs to the build graph, causing modification of a resource file to rebuild the appropriate pieces.
Actual behavior
An incremental rebuild does not occur
Steps to reproduce
Option 1:
Search for this GitHub issue in swiftpm code base
Option 2:
- checkout swiftpm
- Run the following
❯ swift build --package-path ./Fixtures/Resources/EmbedInCodeSimple --build-system swiftbuild
❯ $(swift build --show-bin-path --package-path ./Fixtures/Resources/EmbedInCodeSimple)/EmbedInCodeSimple
❯ echo "This is a new message" > ./Fixtures/Resources/EmbedInCodeSimple/Sources/EmbedInCodeSimple/best.txt
❯ swift build --package-path ./Fixtures/Resources/EmbedInCodeSimple --build-system swiftbuild
❯ $(swift build --show-bin-path --package-path ./Fixtures/Resources/EmbedInCodeSimple)/EmbedInCodeSimple
❯ # We expect the new output here
❯ swift package clean --package-path ./Fixtures/Resources/EmbedInCodeSimple)
❯ swift build --package-path ./Fixtures/Resources/EmbedInCodeSimple --build-system swiftbuild
❯ $(swift build --show-bin-path --package-path ./Fixtures/Resources/EmbedInCodeSimple)/EmbedInCodeSimple
# This outputs the expected test
Swift Package Manager version/commit hash
branch main (commit ID 52f7c417c2949d9aadd950169c4ae3ab4a74f31c)
Swift & OS version (output of swift --version ; uname -a)
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status