If we have some module named Name that depend on NameCommon, all artifacts from NameCommon are filtered out as if they were own artifacts
What was done:
Appended / symbol to the end of all paths for DependencyProcessorImpl
Now:
Name and NameCommon artifacts do not interfere each other.
Second fix:
Before:
On archiving, all compiled artifacts of own target, like .modulemap and Name-Swift.h were not filtered out in DependencyProcessorImpl
What was done:
According to Apple Documentation, TARGET_BUILD_DIR and BUILT_PRODUCTS_DIR depend on several cases. Generally, they are the same for building. But on archive, they are different, and DependencyProcessorImpl uses TARGET_BUILD_DIR to determine ownership of artifacts. But Xcode mostly operates with BUILT_PRODUCTS_DIR to list all dependencies. And, by the way, BUILT_PRODUCTS_DIR is just a symlink to TARGET_BUILD_DIR. So I added resolving symlinks in DependencyProcessorImpl.
Other possibility: use BUILT_PRODUCTS_DIR in DependencyProcessorImpl instead, but I'm not sure why it is TARGET_BUILD_DIR now. So I decided just to resolve symlinks
Now:
All compiled own module artifacts are filtered out by DependencyProcessorImpl.
First fix:
Before:
Name
that depend onNameCommon
, all artifacts fromNameCommon
are filtered out as if they were own artifactsWhat was done:
/
symbol to the end of all paths forDependencyProcessorImpl
Now:
Name
andNameCommon
artifacts do not interfere each other.Second fix:
Before:
.modulemap
andName-Swift.h
were not filtered out inDependencyProcessorImpl
What was done:
TARGET_BUILD_DIR
andBUILT_PRODUCTS_DIR
depend on several cases. Generally, they are the same for building. But on archive, they are different, andDependencyProcessorImpl
usesTARGET_BUILD_DIR
to determine ownership of artifacts. But Xcode mostly operates withBUILT_PRODUCTS_DIR
to list all dependencies. And, by the way,BUILT_PRODUCTS_DIR
is just a symlink toTARGET_BUILD_DIR
. So I added resolving symlinks inDependencyProcessorImpl
.BUILT_PRODUCTS_DIR
inDependencyProcessorImpl
instead, but I'm not sure why it isTARGET_BUILD_DIR
now. So I decided just to resolve symlinksNow:
DependencyProcessorImpl
.