Skip to content
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

Error occured, code: 255 when calling PadawanGenerateIndex #15

Open
cprn opened this issue May 16, 2016 · 13 comments
Open

Error occured, code: 255 when calling PadawanGenerateIndex #15

cprn opened this issue May 16, 2016 · 13 comments
Labels

Comments

@cprn
Copy link

cprn commented May 16, 2016

I just installed padawan server and plugin. Running :PadawanGenerateIndex in root of composer project returns Error occured, code: 255. My home dir .composer/vendor/bin is in $PATH, I run neovim on Ubuntu GNOME 16.04 (up to date) and successfully called sudo pecl install event-2.0.4.tgz (which should provide ext-event). What else can I do? How do I debug this?

@mkusher
Copy link
Member

mkusher commented May 16, 2016

Can you run: :! echo $PATH in neovim and check whether composer's bin in there?

@cprn
Copy link
Author

cprn commented May 17, 2016

Yes, it is in the $PATH - both :echo $PATH and :!echo $PATH.

@mkusher
Copy link
Member

mkusher commented May 17, 2016

@cprn can you manually run $ padawan generate in the project root?

@bezhermoso
Copy link

I am also running into this issue, and can verify that Composer's bin directory is on my path.

padawan generate works.

python << endpython
import vim
from padawan import client
filepath = vim.eval("expand('%:p')")
client.Generate(filepath)
endpython

...works

@cprn
Copy link
Author

cprn commented May 18, 2016

When I open empty buffer in a project directory and call :PadawanGenerateIndex error 255 occurs but it works if I open any path or window, i.e.:

COMMAND ACTIONS RESULT
vim :PadawanGenerateIndex Error 255
vim . :PadawanGenerateIndex Success
vim file.php :PadawanGenerateIndex Success
vim :Explore :PadawanGenerateIndex
vim :NERDTreeToggle :PadawanGenerateIndex

Tiny detail: I use nvim but that shouldn't matter, should it?

@mkusher
Copy link
Member

mkusher commented May 18, 2016

hm. It looks like the issue occurs when there is now file in a buffer

@mkusher mkusher added the bug label May 18, 2016
@iwyg
Copy link

iwyg commented Jun 2, 2016

I can confirm that error. With no buffer loaded, I get error 255.

@greg0ire
Copy link

IMO, the problem comes from this line % refers to the current file, which is not defined when you use vim without any argument. So the question is : how to get the current working directory when no file is opened?

@mkusher
Copy link
Member

mkusher commented Jul 23, 2016

@greg0ire :pwd should work, so we just need to add check whether current file is specified. If not than use :pwd else report error. I think this will solve the issue

@greg0ire
Copy link

Why not use :pwd all the time?

@cprn
Copy link
Author

cprn commented Oct 4, 2016

In regards to using :pwd all the time... Doesn't it force the user to always start vim in project directory?

:pwd
/home/cprn/
:vsp tmp/foobar.txt   " opens buffer with file in different working directory
:pwd
/home/cprn/           " even though I'm in a buffer with different directory

@mkusher
Copy link
Member

mkusher commented Oct 5, 2016

or do :cd if you're switching projects

@cprn
Copy link
Author

cprn commented Oct 5, 2016

Okay... Then I find it sensible to always use :pwd assuming you display correct error message instead of just 255 when current :pwd isn't the project root. Alternatively in such case you can interactively ask the user where the project root is but I think it would be an overkill, :cd should be enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants