Hacker News new | ask | show | jobs
by bernadus_edwin 3174 days ago
Rename refactoring swift also finally came after 2 years. Maybe xcode product manager is replaced by someone who more understand developer. Every release on xcode 9 has big impact. Gladly apple now hear developer. Before this, xcode 8 is the worst IDE
2 comments

Or more realistically and less dramatically, some these big features took a lot of effort and engineering investment before they were ready for production.

Apple tends to re-think the current technology and implements their ideal solution. This takes longer but avoids the duck tape approach I've seen in various iterations of Visual Studio. As a concrete example the refactoring tools in Xcode9 work for both C++ (for the first time!), Objective-C and Swift using the same framework.

Best of all the API to write your own refactoring tools has been carefully designed, and there have been some high quality external contributions already to the refactoring tools.

I actually think Visual Studio does refactoring pretty well. It is not a new innovation from Apple. Xcode, in this case, is just catching up with a much needed feature and I still think it's not quite there.
It looks the implementation was a significant investment. They built a language-agnostic refactoring engine into Clang and open-sourced it http://lists.llvm.org/pipermail/cfe-dev/2017-June/054286.htm...
What's wrong with the way Visual Studio does things?
Xcode 8 is still better, because Xcode 8 actually works.

Xcode 9.2 might be great, but 9.1 doesn't seem to take any interest in the most urgent problems of 9.0, i.e everything breaks as SourceKit grinds relentlessly in the background chewing up more and more memory (it reached 18 gigs physical ram on my 16 gig MacBook somehow!).

First it forgets how to find symbols, or refactor, then text entry slows so much until I have to wait a few seconds every time I type just to see what I typed, finally the editor just freezes for lengthy periods. That's just the most prominent problems.

Fortunately restart fixes these problems, but not most others.

This kind of problem is almost always extremely project-specific. There are an infinite variety of compiler flags, custom build steps, etc.

Set "defaults write com.apple.dt.Xcode IDESourceKitServiceLogLevel 3" and SourceKit will write a log to /tmp with all the details of what it is doing while indexing. A lot of people find they have header hygiene problems or module problems that happen to work while building in certain configurations but aren't actually correct, resulting in missing modules or broken headers from the indexer's point of view.

Dealing with C/C++ headers, includes, modules, et al is part of the reason a lot of editors never bother with trying to offer complicated refactoring, autocomplete, etc. It is far from trivial no matter what build system you are using.

If you file a bug report and attach your project someone on the indexer team will personally take a look.

Thank you.
If you can, you should file a radar and attach a copy of your project.
i need company approval but will try.