peripheryapp / periphery

A tool to identify unused code in Swift projects.
MIT License
5.2k stars 186 forks source link

(DecodingError) keyNotFound(CodingKeys(stringValue: "compatibilityVersion", intValue: nil) on Xcode16 project format #821

Closed aiKrice closed 1 week ago

aiKrice commented 2 weeks ago

👋 Hello there, I am encountering this issue:

(DecodingError) keyNotFound(CodingKeys(stringValue: "compatibilityVersion", intValue: nil), Swift.DecodingError.Context(codingPath: [], 
debugDescription: "No value associated with key CodingKeys(stringValue: \"compatibilityVersion\", intValue: nil) (\"compatibilityVersion\").", underlyingError: nil))

when I launch periphery on my project Xcode 16 with Project format Xcode 16

But on XcodeProject format 15.3 it works.

On the diff of file we can see clearly that xcode remove this key on the pbxproj.

periphery version : 2.21.0

linked to this: https://github.com/tuist/XcodeProj/issues/837

ileitch commented 1 week ago

I'm keeping an eye on https://github.com/tuist/XcodeProj/issues/837 and will update the dependency once the fix is released.