vheon / JediHTTP

Simple http wrapper around jedi
Apache License 2.0
40 stars 9 forks source link

Provide setup script #17

Closed z33ky closed 6 years ago

z33ky commented 8 years ago

I'm not too familiar with Python development, but a setup.py script to install a Python program on the system seems commonplace.

As I'd like to package this or a Linux distro, such a script would be very convenient.

vheon commented 8 years ago

I'm not too familiar with Python development

Would you believe me if I told you that neither am I 😝

Jokes aside as you may have read in the README this project was born to be used into Valloric/ycmd so I didn't bother to learn about the setup.py stuff but I'll use this opportunity to learn about it. The one concern that I have is that I vendor some third-party dependency as git submodules instead of letting the setup.py handle it I guess but I'll see if is solvable.

Can I ask why do you want to package JediHTTP? Or better, what do you want to use it for?

z33ky commented 8 years ago

This is for YCM actually. I know that the usual inclusion of completion engines is via submodules in the ycmd tree, but for packaging I want to provide a ycm-core package and one package for each completer.

vheon commented 8 years ago

Well that would not work well. We expect a specific version of the completer because is the one that we have tested and you can't even build ycmd with the build.py script because we check that those submodules have to be there and we include the third_party directory in the PYTHONPATH as one of the first directory so you will end up using the submodules anyway. As you can see I don't see the gain here and I believe that at least for this project the cloning the repo is the best way to install it 😕

z33ky commented 8 years ago

I don't build ycmd with the build.py script.

The method works for racerd (Rust) at least, though I have no idea how the other completers fare. They do have ways to install themselves outside of ycmd, but I don't know if ycmd can find them there.

z33ky commented 8 years ago

It seems I simply got lucky with racerd, but it is easy to add this functionality for Go{code,def} and tern, so I'll will open a pull request for ycmd for them. tsserver (TypeScript) also works ootb and It should be similarly straight forward for OmniSharp. If JediHTTP is provided as a regular binary in the $PATH this would also be quite easy.

vheon commented 8 years ago

Out of curiosity: how do you package ycmd?

z33ky commented 8 years ago

You can see the PKGBUILD here: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=vim-youcompleteme-core-git It should be readable if you're familiar with bash; look for the build() and package() functions.

vheon commented 8 years ago

Sorry but I still don't see the advantage here, I mean how much are you saving? The whole YouCompleteMe repo with all its recursive dependencies, so ycmd and its dependencies like JediHTTP, racerd etc is 200Mb where half of it is the .git directory. The only advantage of splitting up the "core" from its completers is only disk space; or am I missing something? I'm not saying that I will not provide the setup.py file but is a thing that I have to study to see how to implement it considering the way I used my dependencies.

z33ky commented 8 years ago

There's also their dependencies, like go, rust + cargo + racer, mono, nodejs + npm and typescript for their respective completion engine.

It certainly wouldn't be a show-stopper to not have this, but apart from JediHTTP's setup script it seems to be simple to integrate. I don't know how much, if any, additional maintenance burden this adds because I don't know ycmd's API and versioning and what not, so I thought I'd just ask to include that feature for the purpose of - from my limited viewpoint as a user - selective semantic completion support.

onilton commented 7 years ago

Can we at least add an requirements.txt? Can I open a pull request for it? To remember, right now I had to install:

waitress bottle

puremourning commented 7 years ago

No you don't. They are submodules locked to the tested version: https://github.com/vheon/JediHTTP/tree/master/vendor

You should use those.

micbou commented 6 years ago

Closing this issue as ycmd doesn't use JediHTTP anymore (see PR https://github.com/Valloric/ycmd/pull/1028).