-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend irony to cover Swift #259
Comments
Only libclang. which is one of the reason it's easy to use.
As much as I would like it to be a good idea, I honestly don't think it is, you may be better of rolling your own even if I understand that's what you would like to avoid. There is honestly not much of value in irony-mode, it's just some glue to libclang. If you don't use libclang, it's not super-useful. The communication between the server/emacs is also fairly trivial and one might be better of using something else. If only Emacs has some protobuf/msgpack/capnproto library or such, that would be nice IMHO, tools could be made more generic but still efficient. I see that company-sourcekit answer somewhat the problems for completion. syntax checking I don't know if there is already something, but there is nothing more in irony-mode for now. I don't think irony-server will ever grow too much, it will always be a simple "libclang-server". I would like to integrate other tools in the future maybe, like kythe.io if necessary, clang-tidy or similar refactoring tools. So there might be some general improvment with regard to the communication with external tools that can be worked together and could be useful for plenty of other projects. By the way, I see that Switch has an IDE library, which might be relevant to you: |
Let me check my comprehension of your response. Please correct me if I'm missing the point. :-) Any time we're passing big buffers between Emacs and external processes, it bogs down. Thus, people tend to move all the functionality they can into external processes to cut Emacs out of the loop to the greatest extent possible - we see this pattern with Robe for Ruby, Irony for (Objective-)C/C++, Tern for JavaScript, etc. The end result is language tooling that does its work on the server side and can't really be maintained and extended in elisp. Emacs 25 will land soon and we'll be able to load dynamic modules for the first time. Using that, we can create a dynamic Emacs module for Cap'n Proto so that we can move more language tool support into elisp without repeatedly incurring big serialization costs. With that in place, we can efficiently share Emacs buffers with a compiler process for Swift or C++ or whatever, that likewise shares its parse tree with Emacs, maybe using a standard system like kythe.io. On top of that we build an elisp framework that reads the capnp stream and generates relevant data structures for completions, documentation, refactoring, etc either by leveraging tools that are already provided by Semantic or rolling out new tools as necessary. Am I missing any big pieces? Does this sound like a more viable idea than trying to extend/reuse Irony? Is it a better idea than creating Yet Another External Language Support Server especially for Swift? |
I'm not totally sure to understand, to me there is some pros and cons to have external tools do the hard work, non-exhaustive list: Cons:
Pros:
Interesting, yes that would appeal to me, do you have a link to the module support in Emacs, I take a look from time to time to emacs-devel but I could not see a link to explain how module will work.
Sounds okay to me.
I think so.
Well, I'm not really opposed to dedicated server tools that provide the functionality to multiple editors, communicating using a cross-language serialization language (json, capnproto, ...). |
Sorry for the late reply. So, it seems that writing our own parsing or utilizing the Swift IDE library would be a good start? Would it be wise or needed to wait until emacs 25 to land? I took a look at @ryanprior What do you think the best route to take is? Especially with all this new found knowledge. |
swift-mode
has this open issue: swift-emacs/swift-mode#123We want to build tool support for Swift, so we're going to want to have a server to provide the necessary info. Since irony's server already uses llvm and libclang, is it a good idea to extend irony using Apple's llvm swift infrastructure and build on top of that?
cc: @nicklanasa
The text was updated successfully, but these errors were encountered: