Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flycheck-mix breaks 'recompile' in iex #5

Closed
loxs opened this issue Dec 29, 2016 · 1 comment
Closed

flycheck-mix breaks 'recompile' in iex #5

loxs opened this issue Dec 29, 2016 · 1 comment

Comments

@loxs
Copy link

loxs commented Dec 29, 2016

Hi,

I started using this layer and it works as expected... is very nice actually.
Though I encountered a very bad problem, which in my case is actually a dealbreaker and makes the whole thing totally useless.

After using flycheck-mix to write my code, if in the same time I have an interactive iex session with my project where I test things, I have no way to make my code changes available in the iex session.
Calling 'recompile' does not find any code changes and nothing gets reloaded.
The only thing that works is killing iex and running it again with iex -S mix.

Is there something I can do?

@loxs
Copy link
Author

loxs commented Jan 11, 2017

I ended up using this gen server in my project:

https://gist.github.com/loxs/5823b9e9121fc8aee442b207a93238bd

This calls recompile before emacs has the chance to. If it doesn't work for you, I have included (the commented out code) a variant which will get triggered when emacs compiles the .beam files and will reload them. So do a bit of experimentation and use what works for you.

Have in mind that it uses an older version of ":fs" - the one used by Phoenix. The newer version of :fs has a different API and you may have to do something else.
In order to use this exact version, use {:fs, "== 0.9.1"} in your mix.exs.

@loxs loxs closed this as completed Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant