defuz / RustAutoComplete

A SublimeText binding for RACER (Rust auto completion tool)
MIT License
105 stars 20 forks source link

Creates 20+ temp files and doesn't delete them. #19

Open welbornprod opened 9 years ago

welbornprod commented 9 years ago

I noticed all of these temp files (tmp[random chars]) being created beside my source files. They were multiplying pretty fast. I can see it starting when the autocomplete popup is shown, and the more you type, the more it creates. They aren't being deleted though. If I close Sublime Text (version 3065) they are still there. Disabling 'RustAutoComplete' stops them from being created.

Any ideas on how to remedy this? I do like RustAutoComplete. It works fine except for the this one thing.

glennw commented 9 years ago

What platform are you running on?

welbornprod commented 9 years ago

I'm running on linux (specifically Kubuntu 14.04.1), but I figured out the problem. I should've paid more attention to the Sublime Text console messages. It couldn't find the racer executable. Even though racer is in my $PATH, I had set the config to {"racer": "racer"}, which I thought would point to my symlink ~/.local/bin/racer, but it wasn't finding it. I gave it a full path to my symlinked racer executable (/home/cj/.local/bin/racer) and it now works and deletes the tmp* files. I don't see them being created either though, but that could be because it's too fast.

So, no racer meant it was creating a bunch of temporary files and not deleting them. I haven't looked into the internal workings of RustAutoComplete to see why that is.

lumba commented 9 years ago

Had the same thing happen on OS X. Also had racer in my $PATH but ended up with a lot of tmp files. Did as @welbornprod described, changed the settings file so it had the full path and now everything seems to work.

nebffa commented 9 years ago

Specifying the full path to racer fixes the issue for me.

binary132 commented 9 years ago

This also happens to me on Gentoo GNU/Linux when I don't specify the full path to racer, but racer is in my PATH. This problem goes away when I use the full path to racer.

andradei commented 9 years ago

Since this is figured out, this issue should be closed, maybe with a PR that updates the README file?

typeofweb commented 9 years ago

+1 it should be made clearer in the README file

yberreby commented 9 years ago

+1 I've had this issue too

qinwf commented 9 years ago

Specifying the full path to racer fixes the issue for me too on Windows.

{  
  //  racer.exe
  "racer": "C:/Windows/System32/racer.exe",  
  //  rust
  "search_paths": [    "C:/Rust/src/src"
  ]
}
phdoerfler commented 9 years ago

I'm on Mac here, can confirm that the plugin fails to find find racer in $PATH, but when given a absolute path to a symlink to racer, it will work. +1 to not changing the README, but to fix the way, $PATH get's evaluated

xgfone commented 8 years ago

It is a pain. qq 20151009135746

cpanato commented 8 years ago

+1

glennw commented 8 years ago

Unfortunately I don't have time to maintain this project right now. If anyone else is interested, I'd be happy to transfer the project to a new maintainer?

defuz commented 8 years ago

@glennw I sent you a private message on Reddit.

sanmai-NL commented 8 years ago

Is this project still maintained, @defuz? The temp files should not be needed when your run racer in daemon mode.

defuz commented 8 years ago

@sanmai-NL

Sorry for late response. I have implemented the use of daemon mode in separate branch:

https://github.com/defuz/RustAutoComplete/blob/daemon-mode/RustAutoComplete.py

It works well on OS X (and, I think, on Linux). I have not tested it on Windows yet.

Unfortunately, the ability to pass content via stdin was merged to Racer repository only three days ago, and it has not been published yet.

https://github.com/phildawes/racer/pull/467

I want to wait until it is published in the cargo and then update the plugin. Once again, sorry it took so long to answer.

kirhgoff commented 8 years ago

Sorry, cannot understand from the thread how to resolve the issue. Have RustAutoComplete plugin installed in Sublime 3 and it creates a lot of temp files in src folder. What should I do to get rid of those?

Ryman commented 8 years ago

@kirhgoff Ensuring that your path to racer is a fully explicit path seems to resolve it.

kirhgoff commented 8 years ago

Thank you, had to read README more thoroughly, it does work for me now