Xcode "Build documentation" not working with Swift Macro package in project

I have a workspace with my project and a Swift Macro. When I use the "Build Documentation" command the build fails with this error:

fatal error: module map file '/Users/me/Library/Developer/Xcode/DerivedData/Project-fmdkuqlofexbqdhhitpgjnoqzyrz/Build/Intermediates.noindex/GeneratedModuleMaps-iphoneos/Macros.modulemap' not found

Is there a way around this?

Is your Macros.moduleMap file in the GeneratedModuleMaps folder (as opposed to GeneratedModuleMaps-iphoneos)?

I ask because we're experiencing the same issue. If we make a test project with macros, it finds the Macros module maps (that are in GeneratedModuleMaps) just fine.

I do have a similar problem and @agkevin is right, the modulemap is in the GeneratedModuleMaps directory instead of in the GeneratedModuleMaps-iphoneos directory. Any idea how to fix it?

Xcode "Build documentation" not working with Swift Macro package in project
 
 
Q