You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While looking to update XcodeGen to use xcproj's latest 0.4.0 release, I ran into an issue while running XcodeGen's unit tests. The failing test was due to PBXProject's Decodable initialization method.
What 🌱
While decoding a PBXProject object, on line 127, there is the following
However, the projectRoot entry in the project file is projectRoot = "";. My assumption is that the decode() is interpreting the empty string as nil and is throwing an error.
Proposal 🎉
My proposal would be to use decodeIfPresent() instead
Here is a snippet of the console output when running the XcodeGen unit tests after updating to xcproj 0.4.0 (minor formatting applied)
-> Test Project
-> generates
Test Project generates
.build/checkouts/Spectre.git--7655155069707042687/Sources/Case.swift:31
Unhandled error: keyNotFound(xcproj.PBXProject.(CodingKeys in _358E3F1E80A5A574E57C81A423F44836).projectRoot,
Swift.DecodingError.Context(codingPath: [],
debugDescription: "No value associated with key projectRoot (\"projectRoot\").", underlyingError: nil))
Context 🕵️♀️
What 🌱
Proposal 🎉
The text was updated successfully, but these errors were encountered: