tern.java
                                
                                 tern.java copied to clipboard
                                
                                    tern.java copied to clipboard
                            
                            
                            
                        Implement tern server with J2V8
Today it exists 2 tern server implementation :
- with Rhino : cannot be used for IDE because too slow, and out of memory problem.
- with node.js which works like a charm.
It should be interesting to implement tern server with J2V8 to :
- clean the tern server API
- compare it with node.js
Please not that some tern plugins like closure, node.js depends on node.js for some features. Ex tern plugin node uses node to resolver module name declared inside require because it needs file system API)
@maxandersen @irbull I think you will be interested with this issue. I can help you to implement tern server with J2V8, but today I cannot start it, because :
- J2V8 doesn't support Windows 64 bits (my OS) (see https://github.com/eclipsesource/J2V8/issues/31)
- Tern server API uses minimal-json JsonObject for request/response, I tell me how it can work with J2V8. See https://github.com/eclipsesource/J2V8/issues/32
- Is it possible to emulate node require function and require('fs') which are used inside the node tern plugin?
I have been investigating running tern and a few other js tools with j2v8. I am currently trying to implement a node like AMD (require()) implementation.
@gorkem very cool that you are working on this toipc.
I have started the J2V8 tern server implementation and it starts working (I will commit soon my work).
It should very cool if we could work together.
Sure.. please ping me when you do the commit.
:+1: Yes, it is cool.
@gorkem @irbull @maxandersen I have started to implement tern server with J2V8 (but I cannot use it inside Eclipse IDE -( because of java.lang.Error: Invalid V8 thread access.). See https://github.com/angelozerr/tern.java/tree/master/core/tern.server.j2v8
You will find a README with several informations like sample, limitation of J2V8 (like OSGify J2V8). I have doen that quickly and it's just a basic implementation. Any comments are welcome!