Export Localization Build failing with Macros

Recently we introduced a macro to our workspace. Builds fine inside Xcode, as well as builds fine using xcodebuild. Seemed like everything was working perfectly until we went to export localizations.

If we attempt to do it from Xcode itself it will fail as it attempts to build macOS (which is a totally different issue)

We have this process automated though so it is being built via command line:

This is the exact prompt we're running

xcodebuild -exportLocalizations -localizationPath ../output -workspace <workspace>.xcworkspace -exportLanguage en -sdk iphoneos

This will do the normal Xcode package/build graph resolution and generation and begin building.

Eventually when it hits a use case of the macro it will fail. In each case when it fails it will have something like this:

<unknown>:0: warning: compiler plugin not loaded: '<output-path>/<our-macro-package>; failed to initialize
<path-to-usage>.swift:29:35: error: external macro implementation type '<our-macro-package>.<our-macro>' could not be found for macro '<our-macro>()'

If I go to that output path I can see the macro package executable there. If I look in the build command for the file I can something that looks like this:

... 
-load-plugin-executable <output-path>/<our-macro-package>\#<our-macro-package>
...

If attempt to build, without the -exportLocalizations flag, it works and builds just fine. I'm not sure what's happening here.

Has anyone seen this? Macros+export localizations?

Post not yet marked as solved Up vote post of utahwithak Down vote post of utahwithak
489 views

Replies

Hello,

Could you file a Feedback report that includes the information here, as well as any commands run, command output, and if easily reproducible, a sample project?

  • Thanks, logged FB13268924

Add a Comment

I'm encountering the exact same issue. Any progress on its resolution, or workarounds?