Post

Replies

Boosts

Views

Activity

Reply to Module dependency cycle errors in Xcode 26
I'm having a real tough time replicating the error in some brand new packages (even though they seem essentially the same) but I have been able to isolate the issue in my two custom packages to where I can sort of see when the error exists. I have a package A that has a dependency on package B (which has two products). If I include a single Swift file in both packages with no source code it works but if I just add a single import SwiftUI statement to both package A and package B's singular file the error presents itself. I see the following note also attached in the build error: note: Swift Overlay dependency of 'SwiftUI' on 'UIKit' via Clang module dependency: 'SwiftUI.swiftmodule -> SwiftUI.pcm -> UIKit.pcm' (in target '' from project '')
Nov ’25
Reply to Module dependency cycle errors in Xcode 26
Hey Ed, thanks for replying! I tried to create a minimally reproducible example with some barebones packages and wasn't able to see the error. I then tried to remove all of the source code from the two packages where I was seeing the error and no longer get the build error. I'll try to do it piecewise to see exactly when I start getting the error and hopefully fix it or at least it can be more instructive in a bug report.
Nov ’25
Reply to Cannot resolve dependencies when using a test only target from Swift Package
I forgot to include in the post, but we found a hack that works but it is pretty annoying. If we duplicate all of "Library"'s dependencies in "LibaryTestUtilities" we can get it to work, though it requires building the host application's target otherwise we will get the error No such module Library when building LibraryTestUtilities. Obviously this is not ideal so we would like to find a solution that allows us to use the testing utilities package without needing to add them to the main app. Ideally, they should only be linked in the test target.
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’22