[swift-users] How to define interdependent modules in a package?

Max Howell max.howell at apple.com
Tue Dec 22 11:23:17 CST 2015


> Compiling this produces an error saying : foo.swift: error: no such module 'Bar'
> When I remove dependency of 'Bar' module from foo.swift (by removing import statement and call to 'bar'), it compiles fine.
> Am I missing something here? Can't I use imports directly?

You’re not missing anything, you can do this, in fact the package manager itself does this with many modules.

Can you post your Package.swift? It may help to just attach the whole example as a zip.



More information about the swift-users mailing list