Quantcast
Channel: Package Manager - Swift Forums
Viewing all articles
Browse latest Browse all 167

Swift Package dependency in package A not seen when building package B depending on package A

$
0
0

Hello all, I'm currently stuck with the following issue :

I have a Swift package containing Swift code named Common.

This package is a dependency of another Swift package which contains ObjC code, call it ObjCPackage.

ObjCPackage builds perfectly fine on its own. In it there's a header Header.h which has the line '@import Common;'.

On top of that I have another Swift package, containing Swift code, which has ObjCPackage as a dependency, call it TopSwiftPackage.

Problem : when building TopSwiftPackage, I get an error "Module 'Common' not found" on ObjCPackage/Header.h.

[EDIT: in trying to isolate the problem, I noticed that the error happens only if I try to import Common in a header. It works if I import it in a .m file]

I've tried explicitly adding Common as a dependency on TopSwiftPackage but that doesn't change anything.

I've tried reproducing this with sample packages and couldn't. Any idea what could be causing this, or how to debug it ? Is there a "verbose dependencies" flag that can give me more info on what's going on ?

Thanks.

2 posts - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 167

Trending Articles