tuist / XcodeProj

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

refactor: strongly type plist values to achieve full sendability #835

Closed waltflanagan closed 3 months ago

waltflanagan commented 3 months ago

Our usage of [String: Any] prevents full sendabillity conformance so we need to use stronger types in those places. this introduces PlistObject to allow a strictly scoped set of values which themselves can be Sendable

All feedback welcome, this is currently messy and I wanted to get initial reactions to this direction.

waltflanagan commented 3 months ago

@pepicrft I ended up completing the optimization and ended up with cleaner code in the end. I was able to remove PlistObject from the core of the PBXProj parsing flow but i'm keeping in in the codebase for now for the other [String: Any] callsites until I address those. With the test i did with a large (4.4MB) project file, this parsing was taking 60% of the time of the old approach.

pepicrft commented 3 months ago

@pepicrft I ended up completing the optimization and ended up with cleaner code in the end. I was able to remove PlistObject from the core of the PBXProj parsing flow but i'm keeping in in the codebase for now for the other [String: Any] callsites until I address those. With the test i did with a large (4.4MB) project file, this parsing was taking 60% of the time of the old approach.

This is amazing. Great job @waltflanagan 👏🏼