I believe it’s still not a good practice to have a product name with spaces since Xcode does sanitize the name during the build – which might lead to surprising results. It’s generally better to use a pre-sanitized product name for a more consistent project.
However, I agree that if Xcode allows product names with spaces, we shouldn’t be pesky about it. I’m aligned with relaxing the warning.
This is not the first time we’ve run into a case where Xcode allows something, but we still not consider it a good practice.
I do wonder if we could make relaxing the warning an opt-in by introducing a new option Config.GenerationOptions
:
import ProjectDescription
let tuist = Tuist(
project: .tuist(
generationOptions: .options(
disabledWarnings: [.unsanitizedProductName]
)
)
)
We could extend this to other types of warnings that folks often want to ignore, such as globs that expand to no files.
I think we should follow Xcode’s rules about what we allow, but still advertise it as icky in terms of what’s best practice. There can be a place where something is valid and not causing an error but not matching our style guide.
Agreed! We already have an API to disable side effect warnings so we can generalize it go disable other kinds of warnings.