Hey guys,
I just installed Elixir 1.10 on my Arch Linux and I am starting to learn this nice language.
I am experiencing some problems with my compiler.
I created a new project:
mix new cards
This worked fine. The project was created. However after I make a change to the .ex file in the lib folder and save it and then type recompile iex returns :noop. Oddly enough if I do:
recompile force: true
Then it works fine and the new code is compiled and accessible.
I get the same behavior with mix. âmix compile --forceâ works but âmix compileâ doesnât output anything.
Yes I made sure that I made and saved changes to the file before trying to recompile and I made sure I am in my project when trying to recompile. Any ideas?
System:
Arch Linux
FS: ext4 mounted on /
Not a virtual machine
I am using Atom, it definitely doesnât compile on save in my case.
However I did install a bunch of Elixir packages. Maybe I should remove them and try again?
mix compile doesnât do anything for me. âmix compile --forceâ works.
So assuming you have closed your editor (atom had similar problems with some plugins AFAIK) and used the touch trick, and still there happens no recompilation?
Thatâs really weird, can you show the full transcript of trying it?
By the way hereâs what I discovered:
If there are no errors in the code recompile returns :noop but if I write some random string and then do recompile I get errors:
iex(42)> recompile
:noop
iex(43)> recompile
:noop
iex(44)> recompile
:noop
iex(45)> recompile
:noop
iex(46)> recompile
Compiling 1 file (.ex)
warning: variable "gababsdahsadh" does not exist and is being expanded to "gababsdahsadh()", please use parentheses to remove the ambiguity or change the variable name
lib/cards.ex:41: Cards
== Compilation error in file lib/cards.ex ==
** (CompileError) lib/cards.ex:41: undefined function gababsdahsadh/0
** (exit) shutdown: 1
(mix 1.10.1) lib/mix/tasks/compile.all.ex:62: Mix.Tasks.Compile.All.do_compile/4
(mix 1.10.1) lib/mix/tasks/compile.all.ex:27: anonymous fn/2 in Mix.Tasks.Compile.All.run/1
(mix 1.10.1) lib/mix/tasks/compile.all.ex:43: Mix.Tasks.Compile.All.with_logger_app/2
(mix 1.10.1) lib/mix/task.ex:330: Mix.Task.run_task/3
(mix 1.10.1) lib/mix/tasks/compile.ex:96: Mix.Tasks.Compile.run/1
(mix 1.10.1) lib/mix/task.ex:330: Mix.Task.run_task/3
(iex 1.10.1) lib/iex/helpers.ex:104: IEx.Helpers.recompile/1
iex(46)>
I did remove some Atom autocomplete-elixir package that was giving out an error. ârecompileâ seems to be working fine now:
iex(46)> recompile
Compiling 1 file (.ex)
warning: variable "muff" is unused (if the variable is not meant to be used, prefix it with an underscore)
lib/cards.ex:41: Cards.bro/2
:ok
iex(47)>