Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Xcode error: failed to turn Swift AST into Gryphon AST: Unknown expression #36

Closed
sourcelocation opened this issue May 23, 2020 · 6 comments

Comments

@sourcelocation
Copy link

Hello. I am getting this error. How to fix it? Thanks
Screenshot 2020-05-23 at 12 44 05

@vinivendra
Copy link
Owner

Sorry for the delay! I thought I had left a comment here but apparently I forgot 😓

This is probably happening because you are trying to translate an expression that isn't supported yet.

Can you provide more information? It'd be helpful if you could say the version of Gryphon you're using, and also if you could show the part of your code that's giving this error.

@vinivendra
Copy link
Owner

Hi @massimobio, your problem seems to be different than the original post's, but let's take a look.

I don't think I've tested Xcode support on a project with an xcworkspace yet; that might be making xcodebuild confused (which would make Gryphon confused too).

Let's try this: in your project's folder there should be a hidden folder called .gryphon. In it, there should be a file called updateASTDumps.sh. Could you show me that file's contents?

@vinivendra
Copy link
Owner

No worries! Let's try to find the problem, then we'll create a new issue if we need to.

It seems from this file that Gryphon is only asking Swift to parse three files for it:

Share Extension iOS/ShareViewController.swift
Shared/Classes/ColorExtensions.swift
Shared/Classes/Logging.swift

The file you want to translate, which I assume is called something like MixerInstrumentType.swift, doesn't seem to be on this list, which gives you that error.

Is there maybe another target on your xcproject that compiles only these files? Or another project in your xcworkspace?

@massimobio
Copy link

I use Cocoapods which is the only other project in my workspace besides the main app.
Within the main project I have a few targets and the one you listed is the iOS Share extension that only contains a few files. Is there a way to tell Gryphon which target to use?
Screen Shot 2020-05-28 at 5 53 05 PM

@vinivendra
Copy link
Owner

There isn't yet, but it shouldn't be hard to implement. I've added issue #40 to track this problem. Let me take a look and I'll let you know if I manage to fix it.

@vinivendra
Copy link
Owner

Closing this issue due to inactivity. Feel free to comment with any new information and we can reopen it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants