Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headers not mapped from Umbrella header when productName is nil #6295

Open
BilalSaifudeen opened this issue May 17, 2024 · 1 comment
Open
Labels
type:need/problem Report needs or problems you came across that are not bugs

Comments

@BilalSaifudeen
Copy link

What problem or need do you have?

For some of our framework targets we have umbrella headers and we want to generate headers from it.

We don't specify productName for these targets as productName in ProjectDescription.Target is optional. As the documentation says, the name would be taken in case it is nil.

But, when headers are generated with .allHeaders(from: umbrella:) method, it doesn't map headers if the import is in the form import <ModuleName\Header.h>. It works for imports in the form of import "Header.h"

Digging into Tuist, we found that it is due to missing productName. And we fixed it by passing productName.

Is it expected to pass productName explicitly if we want to match modular headers from umbrella?

Or it is because it is missed to take name incase of productName is nil in Target+ManifestMapper.swift

Potential solution

Use name when productName is nil for header generation.

macOS version

14.4.1

Tuist version

4.9.0

Xcode version

15.2

@BilalSaifudeen BilalSaifudeen added the type:need/problem Report needs or problems you came across that are not bugs label May 17, 2024
@BilalSaifudeen BilalSaifudeen changed the title Headers not mapped from Umbrella header when productName is not passed Headers not mapped from Umbrella header when productName is nil May 17, 2024
@fortmarek
Copy link
Member

Hey 👋

Or it is because it is missed to take name incase of productName is nil in Target+ManifestMapper.swift

Yeah, it's possible this is a bug on our side. Thanks for digging into this.

Would you mind creating a reproducible sample to make the example more concrete? And if you feel like, you can create a draft PR with your proposed solution 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:need/problem Report needs or problems you came across that are not bugs
Projects
None yet
Development

No branches or pull requests

2 participants