You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It occurs at least on macOS and the three officially supported Linux flavours.
It began happening in Swift 5.4.
Additional Detail from JIRA
Votes
0
Component/s
Package Manager
Labels
Bug
Assignee
None
Priority
Medium
md5: 61e915c0b627b7abe90be8a096fea5b6
Issue Description:
New in Swift 5.4, certain sequences of commands seem to scramble the build plan cache such that it ends up building far flung executables, dynamic libraries, and explicitly static libraries even though they are unreachable from the root package.
Steps to reproduce:
1. Create a new executable package and declare a dependency on one product in a package which also has other products that generate binaries (such as an executable, a .dylib or a .a). The SDGSwiftConfiguration product from https://github.com/SDGGiesbrecht/SDGSwift at 6.0.1 will suffice to demonstrate.
2. Build the package
swift build
As expected, it will only build the two necessary modules (SDGSwiftConfiguration and the executable itself).
3. Run the executable
swift run the‐name‐of‐the‐executable
As expected, it will launch the executable and print “Hello, world!” or whatever.
4. Build the package again
swift build
Now it will incorrectly build every binary product in any manifest in the dependency graph, even the ones unreachable from the root package (such as SwiftSyntax.a in this case).
Notably, the problem does not occur if step 3 is skipped.
The text was updated successfully, but these errors were encountered:
Environment
It occurs at least on macOS and the three officially supported Linux flavours.
It began happening in Swift 5.4.
Additional Detail from JIRA
md5: 61e915c0b627b7abe90be8a096fea5b6
Issue Description:
New in Swift 5.4, certain sequences of commands seem to scramble the build plan cache such that it ends up building far flung executables, dynamic libraries, and explicitly static libraries even though they are unreachable from the root package.
Steps to reproduce:
1. Create a new executable package and declare a dependency on one product in a package which also has other products that generate binaries (such as an executable, a
.dylib
or a.a
). TheSDGSwiftConfiguration
product fromhttps://github.com/SDGGiesbrecht/SDGSwift
at6.0.1
will suffice to demonstrate.2. Build the package
As expected, it will only build the two necessary modules (
SDGSwiftConfiguration
and the executable itself).3. Run the executable
As expected, it will launch the executable and print “Hello, world!” or whatever.
4. Build the package again
Now it will incorrectly build every binary product in any manifest in the dependency graph, even the ones unreachable from the root package (
such as SwiftSyntax.a
in this case).Notably, the problem does not occur if step 3 is skipped.
The text was updated successfully, but these errors were encountered: