slashmili/alchemist.vim

Dependency on syslog python module breaks Windows compatibility

ilkka opened this issue · 3 comments

ilkka commented

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 commented

Ah, actually that's not enough because elixir_sense.py also does some manual path building at

log_tmp = "%s/%s" % (dir_tmp, self._get_path_unique_name(self._cwd))
which doesn't work on Windows.

ilkka commented

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?

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