Please help: app with local Swift Packages depended on by .xcproj's cannot be built

We have an app with lots of local Swift packages. The app builds fine, normally.

However with Thread Sanitizer or Undefined Behavior Sanitizer turned on, the app will not build in Xcode 12.5. We get the following errors:

ld: Could not open or create -dependency_info file: /Users/REDACTED/code/ios-2/DerivedData/REDACTED/Build/Intermediates.noindex/MyPackage.build/Debug-iphonesimulator/MyPackage.build/Objects-normal-tsan-ubsan/x86_64/MyPackage_577755BF6_PackageProduct_dependency_info.dat
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Why is this happening? How are we supposed to debug our app with TSAN/USAN if the app cannot even be built?

I filed a bug report on Swift.org and posted here about this two months ago and crickets chirping, no response, needle hasn't moved. What is going on?

Note: the directory Objects-normal-tsan-ubsan does not exist for the Swift packages.

Wrong place for filling a bug for Xcode. You need to file it using Feedback Assistant (either the application on your Mac, or going to https://feedbackassistant.apple.com). Xcode is not part of Swift, but supports Swift along with C/C++/Objective-C/Obj-C++, and is an Apple-specific application (not open-source). Its release schedule is dictated by Apple.

They should open-source it if they're not going to maintain it. Sorry getting pretty frustrated.

If you didn't file a bug report on Feedback Assistant, it's quite possible the Xcode team hasn't seen it. If no one else, either within Apple, or an outside developer, has reported the bug, the Xcode team may be unaware that it exists. Not everyone on the Xcode development team reviews the Swift bug report system.

They do maintain it. There are point releases throughout the year, usually ends by x.5 or so until version y is released.

This is the primary development tool used by Apple itself, so, it's going to remain closed-source for the foreseeable future.

According to the Apple documentation, UBSAN only works with C-based languages, not Swift. TSAN should be working in macOS and iOS simulator runs, but not on iOS devices, watches, or Apple TVs.

Have you tried the Xcode 13 beta to see if the TSAN problem has been addressed there?

I managed to isolate the issue down to a situation where a package has multiple targets that all depend on each other and are all part of one product library. Still haven't been able to reproduce outside of our closed source app, but merging all the modules into one module within the same product has solved the issue for now.