Macros do not work in Analyze action on static library targets

Question or problem

I have a project with static library targets. Some of them use macros.

When editing the generated project in Xcode, a ton of errors appear. Those errors are all related to fields generated by macros, which makes me think that macros simply do not work.

On the left panel, errors appear under the library target (with the :classical_building: icon). When I select the target scheme and build, it works fine. It makes me thing that only the Analyze phase on those static targets has issues with macros.

Expectation

Analyze phase displays the same errors as the build phase.

Context

  • Tuist version: 4.40.0

Reproduction (mandatory for problems)

  • Have a project with static lbraries
  • Add a macro to it (any public macro is fine)
  • Use the macro inside the static library
  • Notice how errors appear in Xcode as if the macro was missing
  • Notice how the project builds fine otherwise

Hey @nathan-sofia :wave:

Could you create a reproducible sample and create an issue in the tuist/tuist repository?

Repro samples save us a lot of time when trying to reproduce an issue.

I made another minimal Tuist project with a similar structure and it doesnโ€™t seem to have the same issue. Maybe there is something wrong with my configuration?