SourceKit Not Working

Answered

AppCode 2016.3.  I have SourceKit enabled in my Inspectors configuration but it doesn't seem to be checking code as I type.  Is there some setting that I'm missing or is SourceKit integration just not working yet in AppCode?

Here is some sample code.  I was refactoring out some code into a separate function and haven't yet supplied parameters or return values.  I expected lots of SourceKit errors until I fix it but got no complaints.

And here is my Inspectors configuration:

6 comments
Comment actions Permalink
Official comment

Hi.

Could you please try to build the target against device (if available) and see if it helps. In case it doesn't, please check what Xcode version is selected in Preferences | Tools | Xcode, open the project in Xcode and check which SourceKit errors specifically are shown there. It would be great if you could create a sample project with the problematic code snippet and send it to us (either to appcode-support@jetbrains.com or by creating issue in our tracker).

Comment actions Permalink

Changing the target to a device, clean, rebuild-all seems to have fixed it! Even as I switched back to simulator again, it seems to be working again. Can you give some background so I understand if I have the same problem in the future why this worked?

I will reply back to this thread if it stops working again.

0
Comment actions Permalink

For some projects SourceKit depends on certain files which are generated during the build process. The way AppCode's own code parser/analyser currently works requires it to be a build for device.

0
Comment actions Permalink

Is this broken again?

Cleaning, rebuilding and restarting AppCode didn't fix this issue.

Just now I switched from Xcode to give AppCode a shot, but this issue is game-breaking.

0
Comment actions Permalink

No, it should be working, and building for a device is not required anymore. Please check which resolve context is selected for a given file, and then make sure that the target/configuration corresponding to this context was built. If that does not help, please contact our support for further investigation.

0
Comment actions Permalink

I never knew about the resolve context; that said I just updated the context through the settings.

For the context I only let it resolve for devices and the current context now states:

"Swift: {MY TARGET} | iOS [arm64] | {MY SCHEME}"

However things are still not really working (I have my iPad attached). I do have an event log:

"Cannot determine module type ("RUBY_MODULE") for the following module: {MY MODULE}"

But I don't know if this has anything to do with it.

---

EDIT:

Suddenly things started working...more or less. Sometimes I get errors to show, some times I don't.

 

 

0

Please sign in to leave a comment.