Xcode broken autocomplete and never ending indexing

#1

I am running Xcode Version 8.3.2 (8E2002) and OSX 10.12.4 (16E195)

Xcode is painfully slow most files open will just be all white text no syntax highlighting. Autocomplete will just not work at all or take forever.

This does not happen with a simple from scratch ios app.

Is this happening to anyone else?

#2

hey, did you solve this? Eventhough I´m still on osx 10.9 and xcode 6.xx auto complete and syntax highlighting really suck.
I had to work for a few weeks on project exclusively on Windows 10 and VS2017 and it works really nice. auto complete is super fast. Really thinking of ditching osx.

Any clue to improve the OF/c++/xcode experience? @zach @theo

all the best!

#3

Going to bump this as I’m having the same frustrating experience, also after spending a lot of time in Visual Studio :slight_smile:

I remember chatting with @arturo about this and thinking that maybe the inclusion of glm with its bazillion header files was the source of the problem. Is there anything we can do/try to resolve this?

#4

i’ve seen some improvement in qtcreator by not including ofMain.h and instead include only the needed headers. it’s more difficult if you are using addons since those usually include ofMain themselves.

the problem is not glm (or not only) but the lots of headers that we include by default

#5

I’ll give it a try.
Anyhow, my experience on VS was really good. after getting used to the shortcuts and moving around it seems like a much better IDE than XCode, or at least less buggy.
What is really anoying on Xcode is that when you code in ObjC autocomplete works super fast, regardless of anything, while C++ (and OF) is the worst.

best

#6

I am not a fan of Xcode, it has just failed for autocomplete. I have search the internet high and low to find a solution, nothing works. I even got a new computer recently (super fast) and it still is just a .cpp of white text that indexes forever. I may need to move to qtcreator.

#7

are you using OF 0.98 / github or nightly?

do you by chance disable indexing ?

it really sounds like something is broken w/ your xcode install. I have been using 0.98 on a variety of versions of xcode and osx and not seen issues with autocomplete

maybe this is helpful

maybe check your console and see if some process like SourceKit is crashing. That seems to be an issue some folks have
https://github.com/SwiftGen/SwiftGen/issues/157

#8

Going back to xcode7 helped slightly. Xcode 8 is unusable from and auto complete perspective for me on master which is why I’m working on getting qt creator working better on macos (https://github.com/openframeworks/openFrameworks/issues/5572). Theoretically xcode 9 has a new editor and indexers and faster code completion, but we can’t compile OF of the box b/c the beta doesn’t support av foundation yet.

#9

I’ve also been having this issue. Xcode 8 and 0.10 make my computer sound like it’s a rocket ship about to take off. Autocomplete and indexing seem to work fine for some other non-OF projects I’m working on so could be related to number of different files in an OF project. Also, for some reason Xcode seems to be reindexing whole project rather than just changed files so maybe related to how Xcode project is set up? For now, I have started using AppCode - https://www.jetbrains.com/objc/. It opens Xcode projects out of the box and also supports some functionality, such as C++ refactoring, that Xcode doesn’t. However, would prefer to use Xcode as it’s free…

1 Like
#10

I’m using 0.98

#11

I am on xcode 7 (I have an older machine) and haven’t seen autocomplete issues… I’ve used xcode 8 with 0.98 without too many issues but I am not using it on this machine atm.

I wonder if there’s something we can do restructuring wise that would help. I’ve often thought it would be generally useful to loose the embedded dependency of one project in another (ie, the way OF library is a subproject of your app’s project) but I’m not sure if that would help at all with the current issue. I personally find it annoying that you can’t clean out your app object code without cleaning OF library object code which can lead to really long rebuild times. But also anything like precompiled headers, etc that might make things work better (not sure). cc @theo

#12

@zach you’re very lucky then

As for the cleaning issue, for some reason, xcode loads the openframeworks project only on the first project you open. So if you clean on any OF project that you’ve opened after it will not clean OF. I’m using xcode 6.x.x on osx 10.9.5 (mavericks). But I´m almost sure this behaviour still happens on xcode 7 and 8.
If you see the OF project like the following if you clean it will also clean the OF build.

but it will not clean the OF build if you see it as follows

hope this helps.
cheers

#13

this might be related to issues i saw recently relating to compile times - it’s quite possible that because we’re currently including lots of unneeded header files the indexer bails out after running out of memory/or time (I’ve opened an issue on github with a few suggestions)

#14

Same issue for me - no automcomplete for oF or syntax highlighting. :slight_smile:
oF 0.9.8, XCode 9, 10.12 OSX