Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: (DecodingError) keyNotFound(CodingKeys(stringValue: "compatibilityVersion", […]), […])) #837

Closed
F1248 opened this issue Aug 9, 2024 · 5 comments · Fixed by #854

Comments

@F1248
Copy link

F1248 commented Aug 9, 2024

Context 🕵️‍♀️

  • Xcode version: 16.0 beta 5 (16A5221g)
  • Xcode project format: Xcode 16.0
  • Periphery version: 2.21.0

I'm trying to scan my project with Periphery which uses XcodeProj. When I run periphery scan it says the key compatibilityVersion was not found, which is correct, my .xcodeproj file doesn't contain this key.
It seems that since project format Xcode 16.0 this key should no longer be included. When I downgrade the project format to Xcode 15.3, it adds this key, but as soon as I revert it back to Xcode 16.0, it removes it again.

What 🌱

error: (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))

Proposal 🎉

Don't expect the key compatibilityVersion if the objectVersion is >= 73.

@F1248 F1248 changed the title error: (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)) error: (DecodingError) keyNotFound(CodingKeys(stringValue: "compatibilityVersion", […]), […])) Aug 9, 2024
@pepicrft
Copy link
Contributor

Thanks @F1248 for reporting this. Seems like Xcode 16 uses a slightly different schema when objectVersion is above the value that you pointed out. Would you like to take a stab at fixing it? If you add me as a reviewer, I'd be happy to review it and get your changes landed

@F1248
Copy link
Author

F1248 commented Aug 17, 2024

Thanks @F1248 for reporting this. Seems like Xcode 16 uses a slightly different schema when objectVersion is above the value that you pointed out. Would you like to take a stab at fixing it? If you add me as a reviewer, I'd be happy to review it and get your changes landed

@pepicrft, I'm sorry, but I can't fix this myself. I would be delighted if someone else could.

Copy link

Hola 👋,

We want to inform you that the issue has been marked as stale. This means that there hasn't been any activity or updates on it for quite some time, and it's possible that it may no longer be relevant or actionable.
If you still believe that this issue is valid and requires attention, please provide an update or any additional information that can help us address it. Otherwise, we may consider closing it in the near future.
Thank you for your understanding.

@github-actions github-actions bot added the stale label Sep 17, 2024
@F1248
Copy link
Author

F1248 commented Sep 17, 2024

@thanhbinh01234, thank you for fixing this!
I'll close this issue as soon as the fix is used in a released version of Periphery, so I can verify that it works for me.

@kimdv
Copy link
Collaborator

kimdv commented Sep 17, 2024

@pepicrft @F1248 I've opened a PR and started the work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants