sweetpad-dev / sweetpad

Develop Swift/iOS projects using VSCode
https://marketplace.visualstudio.com/items?itemName=sweetpad.sweetpad
MIT License
586 stars 19 forks source link

When running sweetpad:build/test/clean, it reports KNOWN_ISA[obj.isa] is not a function #32

Closed potterdai closed 1 month ago

potterdai commented 3 months ago

Hi there,

When running sweetpad:build/test/clean, it reports "KNOWN_ISA[obj.isa] is not a function".

Screenshot 2024-08-04 at 00 58 10

The other commands work fine.

It's not repro if I create a new project, so I guess it's project specific. Is there a way to debug this? It looks like some random strings were parsed as a function.

Thank you for the amazing work!

hyzyla commented 3 months ago

Hello! Wow, I've never seen such an error before! A quick search suggests it might be a problem with the third-party library @bacons/xcode that I use to parse Xcode project files. You can see more details here [1]

  1. Could you share your *.pbxproj file?
  2. If you can't do that, could you share a full list of all "isa" in your *.pbxproj using: grep 'isa' */.pbxproj
  3. The last thing you can do is try to debug the extension yourself. I've just made a tutorial on how to do it [2]
potterdai commented 3 months ago

Thank you for your help! It might be because I am using Xcode 16 beta, which introduced a new ISA type: PBXFileSystemSynchronizedRootGroup. This is not properly handled here: XcodeProject.ts.

potterdai commented 3 months ago

I have created an issue on @bacons/xcode: https://github.com/EvanBacon/xcode/issues/17

hyzyla commented 3 months ago

Yeah, I find a repository with which builds perfectly in Xcode16, but have the same error in the extension https://github.com/hbiede/Score-Tally

Screenshot

![CleanShot 2024-08-04 at 11 28 51@2x](https://github.com/user-attachments/assets/d4b29d39-948c-4e1b-9fd2-ae93af568ae5)

rudrankriyam commented 2 months ago

Even after replacing PBXFileSystemSynchronizedRootGroup, I have not been able to solve it. Any ideas?

hyzyla commented 2 months ago

@rudrankriyam @potterdai, I've added fallback parser to avoid issue with xcode16 and published it under version v0.1.29. Could you update and try it again?

rudrankriyam commented 2 months ago

AMAZING! It works! Thank you so much!