Skip to content

Conversation

@michaelversus
Copy link

@michaelversus michaelversus commented Nov 26, 2025

Resolves #921

Short description 📝

This MR fixes an issue with projects that use the new format, where for build phases, a shell script is an array of strings instead of a string.

Solution 📦

I am deserializing the script with a fallback approach.
If we fail deserializing using the String type we are trying the [String] type to ensure that I will not break old xcode version format

Implementation 👩‍💻👨‍💻

  • Step 1 (Introduced Either Decodable helper wrapper)
  • Step 2 (Migrate shellScript type from String? to Either<String, [String]>?)
  • Step 3 (Removed unused testDictionary function from PBXShellScriptBuildPhaseTests)
  • Step 3 (Introduce new fixture and update unit tests)

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 26, 2025
@michaelversus michaelversus changed the title fix https://github.com/tuist/XcodeProj/issues/921 fix issue with Xcode 16 format and shellScript Nov 26, 2025
@michaelversus
Copy link
Author

@fortmarek I would really appreciate your feedback on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

1 participant