alchemist.vim icon indicating copy to clipboard operation
alchemist.vim copied to clipboard

Dependency on syslog python module breaks Windows compatibility

Open ilkka opened this issue 7 years ago • 3 comments
trafficstars

On Windows Python doesn't have that module but e.g. elixir_sense.py depends on it. You might want to either ship a shim or maybe depend on some library that abstracts it away.

ilkka avatar Nov 09 '18 11:11 ilkka

Ah, actually that's not enough because elixir_sense.py also does some manual path building at https://github.com/slashmili/alchemist.vim/blob/35e7e3062d1661b1c081765ed05bd8f0f5265183/elixir_sense.py#L218 which doesn't work on Windows.

ilkka avatar Nov 09 '18 11:11 ilkka

And now that I started drafting a PR to address this, there are even trickier bits like how one branch of _get_tmp_dir defaults to /tmp/alchemist_server'. I guess it would be possible to have win / not-win branches with the win branch using something like c:\temp\alchemist_serverbut it's not pretty. Would it be possible to just usetempfile.mkdtemp` even though I guess the dir has to be persistent?

ilkka avatar Nov 09 '18 11:11 ilkka

Hi @ilkka, sorry for the late response.

The syslog is only there for debugging purpose, we can disable that module in windows.

Same goes for the alchemist_server we can return different value when this is running on windows.

https://docs.python.org/3/library/os.html#os.name

slashmili avatar Nov 10 '18 22:11 slashmili