witchcraft icon indicating copy to clipboard operation
witchcraft copied to clipboard

Unable to use Witchcraft, iex (1.8.1)

Open doctorcorral opened this issue 6 years ago • 4 comments

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]

See recording

It gets stuck after Generated witchcraft app and my computer starts to behave so badly.

Note. Never used Witchcraft before

doctorcorral avatar Apr 08 '19 21:04 doctorcorral

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?

toraritte avatar Apr 09 '19 22:04 toraritte

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.

doctorcorral avatar Apr 12 '19 23:04 doctorcorral

Were you able to solve this? Sorry for the couple months of delay.

toraritte avatar Sep 08 '19 23:09 toraritte

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 ;)

Tuxified avatar Aug 17 '20 18:08 Tuxified