vishnevskiy / ElixirSublime

Elixir plugin for SublimeText 3 providing code completion and linting.
MIT License
364 stars 25 forks source link

New Hex versions break the plugin #28

Open eproxus opened 8 years ago

eproxus commented 8 years ago

Whenever a newer Hex version is available, there is a chance that the old version somehow breaks. The plugin then breaks on running deps.get, e.g. with the following output in the ElixirSublime.log:

A new Hex version is available (v0.10.4), please update with `mix local.hex`
Running dependency resolution
** (UndefinedFunctionError) undefined function Access.Map.get_and_update!/3 (module Access.Map is not available)

The solution is to add the following line before getting dependencies. run_mix_task('local.hex --force')

     _socket.listen(1)
     _socket.settimeout(5)

+    run_mix_task('local.hex --force')
     run_mix_task('deps.get')

(Diff based on PR #25)