[elixir-core:11724] [Proposal] Translate error reports from gen_statem

2024-03-27 Thread Cameron Duley
Several popular Elixir libraries use gen_statem internally, given it's very useful for managing data over persistent connections. However Elixir's default translations for Erlang log messages don't capture termination reports from gen_statem. As a result, gen_statem terminations leave no

[elixir-core:11725] [Proposal] introduce with_env in ExUnit

2024-03-27 Thread Daniel Kukula
Currently, tests that use env variables can't be run async because the environment is shared. My proposal is to introduce a with_env function that will accept a function to execute and a mapping of params that the functions in System will accept as env variables: Now: System.put_env("PORT",

Re: [elixir-core:11725] [Proposal] Translate error reports from gen_statem

2024-03-27 Thread José Valim
I would love to see a PR that implements translation for gen_statem, so we can evaluate if it makes sense to merge it into Elixir. On Wed, Mar 27, 2024 at 4:10 PM Cameron Duley wrote: > Several popular Elixir libraries use gen_statem internally, given it's > very useful for managing data over

Re: [elixir-core:11726] [Proposal] introduce with_env in ExUnit

2024-03-27 Thread José Valim
I don't see a strong need to make this part of ExUnit, especially because: 1. We should avoid mutating the global state in tests 2. We should avoid reading system environment variables in code (use config/runtime.exs instead) Those can add to their own suites if necessary. :) On Wed, Mar 27,