witchcraft
witchcraft copied to clipboard
Unable to use Witchcraft, iex (1.8.1)
Hello 👋 I have an issue when trying to get into an interactive session with {:witchcraft, "~> 1.0"} Interactive Elixir (1.8.1) Erlang/OTP 21 [erts-10.2.5]
It gets stuck after Generated witchcraft app and my computer starts to behave so badly.
Note. Never used Witchcraft before
A couple questions:
- What machine/OS do you use?
- Do other apps compile ok with
iex -S mix? - Did you try rebooting your computer? (This may sound stupid, but I mostly suspend my laptop, and only restart it once a couple months, or when needed, and sometimes this did solve issues.)
- Do you have a repo online that could be cloned to try it out?
Hi, thanks for the answer
- macOS 10.14.2
- Everything else works like a charm
- I did many times, just in case, but did't make any difference
- Y don't, I have nothing, just created a new project, added witchcraft to deps as described in the documentation.
Were you able to solve this? Sorry for the couple months of delay.
I think I have an idea: your own application has the same name as the package you are using. Normally Elixir would fail to compile (as it tries to compile the same module twice), however IEx allows to recompile and reload previously compiled modules (for new versions) hence you don't get the same behaviour. If you pay attention to the last part, you'll see it says:
Generated witchcraft app ==> witchcraft Compiling 1 file (.ex)
warning: redefining module Witchcraft (current version loaded from _build/dev/lib/witchcraft/ebin/Elixir.Witchcraft.beam)
lib/witchcraft.ex:1
warning: redefining module Witchcraft
Solution: rename your project.
I'm almost 100% certain about this, but feel free to let me know if I was wrong ;)