Re: [elixir-core:9596] Shouldn't empty if .. do ..else blocks give a compilation error instead ?

2020-06-24 Thread Alessio 'Blaster' Biancalana
Hm, looks legit. Thanks for the explanation! Alessio On Wed, Jun 24, 2020 at 8:39 PM José Valim wrote: > There are constructs that rely on this. For example, if you want to have a > receive without clauses, only with an after, you would do: > > receive do > after 30_000 -> IO.puts "waited 30s"

Re: [elixir-core:9595] New API: Mix.Project.umbrella_path() :: Path.t

2020-06-24 Thread Kurtis Rainbolt-Greene
Ah, I see now in the project configuration. I also see that `umbrella?` would only return true inside the umbrella the root project, because it defines `apps_paths`. In theory, a home solution to this would be to simply define a `umbrella_path` in all of my apps. Alright, that definitely makes sens

Re: [elixir-core:9594] Shouldn't empty if .. do ..else blocks give a compilation error instead ?

2020-06-24 Thread José Valim
There are constructs that rely on this. For example, if you want to have a receive without clauses, only with an after, you would do: receive do after 30_000 -> IO.puts "waited 30s" end On Wed, Jun 24, 2020 at 5:28 PM Alessio 'Blaster' Biancalana < dottorblas...@gmail.com> wrote: > Hi! > A warn

Re: [elixir-core:9593] New API: Mix.Project.umbrella_path() :: Path.t

2020-06-24 Thread José Valim
Yes, because it is configured in the mix.exs of that application to do so. All behavior is opt-in, there is no magic detection. You have to do the same. -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop

Re: [elixir-core:9592] Shouldn't empty if .. do ..else blocks give a compilation error instead ?

2020-06-24 Thread Alessio 'Blaster' Biancalana
Hi! A warning would be great so one could watch on them using `mix compile --warnings-as-errors` :-) Alessio On Wed, Jun 24, 2020 at 5:16 PM Andrea Leopardi wrote: > It can't error out on compilation because it would be a breaking change. > However, personally I'm not against a compilation warn

Re: [elixir-core:9592] Shouldn't empty if .. do ..else blocks give a compilation error instead ?

2020-06-24 Thread Mário Guimarães
Ok, a warning is enough then, in case you cannot remember of a reason to not emit the warning :-) quarta-feira, 24 de Junho de 2020 às 16:16:12 UTC+1, Andrea Leopardi escreveu: > > It can't error out on compilation because it would be a breaking change. > However, personally I'm not against a c

Re: [elixir-core:9591] New API: Mix.Project.umbrella_path() :: Path.t

2020-06-24 Thread Kurtis Rainbolt-Greene
Except doesn't deps_path inside an application that is a part of an umbrella application return the umbrella's deps directory? -- 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,

Re: [elixir-core:9589] Shouldn't empty if .. do ..else blocks give a compilation error instead ?

2020-06-24 Thread Andrea Leopardi
It can't error out on compilation because it would be a breaking change. However, personally I'm not against a compilation warning here, but there's a chance we decided to not emit that for a reason that I can't recall right now 😅 Andrea On Wed, 24 Jun 2020 at 13:19, Mário Guimarães < mario.luis.

Re: [elixir-core:9588] Pagination of help in iex

2020-06-24 Thread Bulent Erdemir
Hi, thank you for your quick reply. I checked for pagination support in Erlang before opening this topic and yes, it's not supported in erl as well. I'm surprised no one needed this before. I wonder if I'm missing something and there's a logic behind not implementing this. On Wed, Jun 24, 2020 at

Re: [elixir-core:9587] Pagination of help in iex

2020-06-24 Thread Wojtek Mach
IEx uses erlang shell so such capability should be added there first and then IEx will get it for free. > On 24 Jun 2020, at 15:12, Bülent Erdemir wrote: > > Hi, is it possible to have pagination for help content in iex ? It's been > discussed earlier in around 2013 but not implemented since t

[elixir-core:9587] Pagination of help in iex

2020-06-24 Thread Bülent Erdemir
Hi, is it possible to have pagination for help content in iex ? It's been discussed earlier in around 2013 but not implemented since then. Maybe there's a valid reason not to. However, I'd prefer to have man pages like pagination while viewing a documention.. Regards, Bulent Erdemir -- You re

[elixir-core:9586] Shouldn't empty if .. do ..else blocks give a compilation error instead ?

2020-06-24 Thread Mário Guimarães
Hello, I just observed the following cases iex(3)> if true do ...(3)> else ...(3)> :ok ...(3)> end nil iex(4)> if false do ...(4)> :ok ...(4)> else ...(4)> end nil iex(5)> if :anything do ...(5)> else ...(5)> end nil iex(6)> Should't they give a compilation error instead due to the empty blocks?

Re: [elixir-core:9584] New API: Mix.Project.umbrella_path() :: Path.t

2020-06-24 Thread José Valim
Hi Kurtis, If I understand your description correctly, this is by design. An application inside an umbrella doesn't know it belongs to an umbrella because you should be able to also run it in isolation. That's why we explicitly have configs tha point to the parent directory. Your solution is to