vinivendra / Gryphon

The Swift to Kotlin translator.
https://vinivendra.github.io/Gryphon/
Other
607 stars 46 forks source link

GryphonSwiftLibrary fails to build on Xcode 13 #111

Closed tfmart closed 2 years ago

tfmart commented 3 years ago

Describe the bug When I try to build a project which contains the GryphonSwiftLibrary file, the file fails to build on Xcode 13.0/13.1. I've already tried updating the file by running gryphon generate-libraries after updating to 0.18 but it still fails. I've tried using it in both a existing project, which works fine on Xcode 12, and on a brand new project created with Xcode 13. In both cases, Xcode return build errors on the list types _ListSlice, List, MutableList and Map

How to reproduce it How can someone else make this bug happen in their computer?

  1. Add the GryphonSwiftLibrary to a Xcode project with gryphon generate-libraries
  2. Attempt to build the project on Xcode 13.0 or later
  3. The build fails, returning the errors listed on the screenshots below

Your environment (please complete the following information):

Screenshots and code snippets

image image image image
vinivendra commented 3 years ago

Hey @tfmart, thank you for opening this bug. I was already trying to solve it, but it's good to have a GitHub issue so we can track the progress.

It seems that there was some change in the way Swift interprets protocol conformances that breaks the implementations of the classes. I'm not yet sure what happened, and the error messages aren't helping. I might have to ask for help in the Swift forums.

In the meantime, if you make any changes to the library file that makes it work, be sure to let me know, OK?

tfmart commented 3 years ago

Sure @vinivendra, thanks for reaching out!

vinivendra commented 2 years ago

I tried again today, but no luck. I just posted this question on the Swift forums, so I hope someone there can help: https://forums.swift.org/t/protocol-conformance-stopped-working-in-xcode-13/53345

tfmart commented 2 years ago

Thanks for the update, sadly I couldn't get anything working on my end as well... Let's hope someone can help us out at the forum 🤞

vinivendra commented 2 years ago

Hey @tfmart, the Swift forums came through. I just published the fix in v0.18.1. Let me know if the problem is fixed, ok?

tfmart commented 2 years ago

Glad to hear that, @vinivendra! I'll let you know as soon as I give it a try

tfmart commented 2 years ago

Everything is working great so far on my project, @vinivendra, so I'll close this issue. Thanks for the support!