tuist / XcodeProj

📝 Read, update and write your Xcode projects
https://xcodeproj.tuist.io
MIT License
2.04k stars 313 forks source link

Fix attributes assignment in Metal Diagnostics Options of LaunchAction #834

Closed filipracki closed 3 months ago

filipracki commented 3 months ago

I have made a mistake in https://github.com/tuist/XcodeProj/pull/828

Short description 📝

In my previous PR, I mistakenly set the attributes "showGraphicsOverview" and "logGraphicsOverview" to the value of .xmlString. This was incorrect, as these two fields, unlike others, should contain values in the form of "Yes" or "No" instead of the values returned from .xmlString, which are "YES" and "NO".

Currently, I have changed it to:

if showGraphicsOverview {
    attributes["showGraphicsOverview"] = "Yes"
}
if logGraphicsOverview {
    attributes["logGraphicsOverview"] = "Yes"
}

Is this approach acceptable, or should we consider creating a new property, such as .xmlStringCapitalized? Alternatively, do you have a better suggestion?

This PR is related to https://github.com/tuist/tuist/pull/6537

fortmarek commented 3 months ago

Thanks!