Hi Boris! The compile mix tasks already returns all diagnostics as a data structure, so I would recommend you to implement your own IEx.Helper.recompile so you have access to those diagnostic values. It should be relatively straight-forward.
On Tue, Feb 23, 2021 at 7:12 AM Boris Kuznetsov <[email protected]> wrote: > Hi, > > I’m working on console application written in elixir. > I would like to make it “live editable”, so I run it with mix run > --no-halt. > > It has shortcut to trigger recompilation with IEx.Helpers.recompile(). > > The issue I have is that many parts of elixir write to stdout when you > trigger recompilation. > > So far, it has two type of messages: > 1) success / failure messages, handled by Mix.shell.info/1, > Mix.shell.error/1 > 2) compilation warning messages, handled by :elixir_errors module. > > Mix.shell allows you to define custom behaviour for its actions with > Mix.shell(Custom.MixShell). > > To do the same thing with :elixir_errors Erlang’s module, you have to > re-define it from scratch. > > Is it possible to have custom backend for :elixir_errors module? > > The issue I’m trying to resolve is my application has many virtual windows > and I want to show all warnings / errors in separate windows, i.e. > redirect output from stdout to some file as an example. > > Thank you. > > -- > You received this message because you are subscribed to the Google Groups > "elixir-lang-core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/BFA65702-1BBF-4D75-98AD-99FB782CEF6E%40achempion.com > <https://groups.google.com/d/msgid/elixir-lang-core/BFA65702-1BBF-4D75-98AD-99FB782CEF6E%40achempion.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2B__7bmyoKyW2b588688gD96tQbmQxCYh71o3-xvKSfCA%40mail.gmail.com.
