Heyo, I spoke with the team. Let's go with amending the documentation. I created an issue to track this: https://github.com/elixir-lang/elixir/issues/11737
Feel free to grab it! Andrea On Wed, Mar 30, 2022, at 11:54 AM, Johanna Larsson wrote: > I'm happy to take a stab at it, whichever direction we want to go. > > On Wed, Mar 30, 2022 at 7:53 AM Andrea Leopardi <an.leopa...@gmail.com> wrote: >> Hey there, >> >> I like this idea. I don't feel strongly on whether this is a new pair of >> functions (start_supervised_link/2 and start_supervised_link!/2) or if this >> is a callout in the docs for the existing start_supervised* functions, but I >> like the idea of having one of those two 🙃 >> >> If others in the team agree, we can open an issue for this in the tracker to >> keep track of it. >> >> Andrea >> >> On Tuesday, March 29, 2022 at 6:57:36 PM UTC+2 johanna.a...@gmail.com wrote: >>> Hello all! >>> >>> Basically, `start_supervised` in ExUnit is great in lots of ways. It >>> integrates well with the ExUnit test lifecycle and provides nice >>> guarantees. What it doesn't do is ensure that any failure in the process >>> you're testing is properly propagated to the test process. This means you >>> risk scenarios where your assertions are all fine, but behind the scenes >>> the process actually crashed. This is assuming your final assertions in the >>> test don't need the process to still be alive, or you're doing Mox stuff >>> and verifying expectations. >>> >>> I've found myself frequently, although not always, adding a `Process.link` >>> of the pid of the supervised process to guarantee it's not silently >>> crashing during tests, and I've caught broken tests this way. You get nice >>> and pretty outputs and test failures. >>> >>> This is a super simple proposal to add a `link` version of >>> `start_supervised` that ensures the supervised process is also linked to >>> the test process, with some nice docs highlighting the difference. I guess >>> it's as much about the docs as anything else, since it's easy to link >>> manually! >> >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "elixir-lang-core" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/elixir-lang-core/V-Kkr4erDN4/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> elixir-lang-core+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/elixir-lang-core/98c29853-41f2-4bdc-88e6-37524d7798e2n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/elixir-lang-core/98c29853-41f2-4bdc-88e6-37524d7798e2n%40googlegroups.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 elixir-lang-core+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/CAKL9qdTL%3Di9mgH2-46-RZme5VE675LkfepR%3DQPTGNK_kH3Q4dQ%40mail.gmail.com > > <https://groups.google.com/d/msgid/elixir-lang-core/CAKL9qdTL%3Di9mgH2-46-RZme5VE675LkfepR%3DQPTGNK_kH3Q4dQ%40mail.gmail.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 elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/2097564a-8d80-4a64-9749-6a8cabd62618%40www.fastmail.com.