tonini / alchemist.el

Elixir Tooling Integration Into Emacs
http://www.alchemist-elixir.org
906 stars 103 forks source link

mix credo doesn't work from emacs (works from terminal) #300

Closed mandarvaze closed 7 years ago

mandarvaze commented 7 years ago

I have latest release version (0.7) of credo I'm using spacemacs `Alchemist version: 1.8.2 (package: 20170402.2339)

mix credo works well from the terminal/command line.

When I run mix credo (Using C-c a x credo) I get the following error :

Could not find Hex, which is needed to build dependency :credo
Shall I install Hex? (if running non-interactively, use: "mix local.hex --force") [Yn] 

I get similar error when I save the file (I think the source of the problem is same, error message is slightly different)

Suspicious state from syntax checker elixir-credo: Flycheck checker elixir-credo returned non-zero exit code 1, but its output contained no errors: Could not find Hex, which is needed to build dependency :credo
Shall I install Hex? (if running non-interactively, use: "mix local.hex --force") [Yn] ** (Mix) Could not find an SCM for dependency :credo from Cards.Mixfile

Try installing a more recent version of elixir-credo, and please open a bug report if the issue persists in the latest release.  Thanks!
tonini commented 7 years ago

Hi @mandarvaze I tried to reproduce the issue you have but so far everything works well.

I think maybe an issue could be because emacs don't call the right elixir mix. What kind of OS and emacs setup are you using, and do you have a specific environment setup in your emacs config?

mandarvaze commented 7 years ago

I'm using Spacemacs (Version 0.200.9) I'm on macOS Sierra credo and 'alchemist` versions already mentioned above.

I do not have any special environment setup (that I know of) But if anything - what specific thing to look for ?

Could there be any PATH related issues ? If yes, how can I troubleshoot ?

mandarvaze commented 7 years ago

Based on your suggestion related to "specific environment setup", I tried something, and now things seem to be working. I used to start my emacs as HOME=~/spacemacs emacs & I think this was messing things up.

Now I just start emacs "normally", and "weirdness" seems to have gone away.

Thanks for this amazing tool.