I could argue that `mix setup` already fulfills this role due to being included in phoenix projects by default with the following aliases:
setup: ["deps.get", "ecto.setup", "assets.setup", "assets.build"], "ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"], On phoenix applications I run `mix setup` every time I start my server via `mix setup && iex -S mix phx.server` and I expand `mix setup` with whatever setup a particular Phoenix application needs. I'd be glad to see this pattern picked up more in the community but I'm not sure we need to change anything in core for it. Jason On Fri, Jul 14, 2023 at 2:36 PM Jonathan Arnett <jonarnet...@gmail.com> wrote: > I ultimately don't care if the name is "setup" or "build", but I do wonder > if compilation fits conceptually under the name "setup". > > To expound on my original idea, I was thinking of having a command that I > would run both on the first pull, but also fairly regularly while working > on the project. This is also the flow with Rust, Haskell, Zig, etc who > were mentioned before. In these ecosystems, whether you're adding a > dependency or just recompiling your app, you use the same command. This > flow has a nice simplicity to it. > > In reference to both the comment about Makefiles and also Wojtek's > thoughts around `iex -S mix`, one can define a default task to be run for > your project when just running `$ mix`. One could define a `setup` task as > mentioned, specify `default_task: "setup"` in your mix.exs, and then when > running `$ iex -S mix`, the app would first set itself up, then give you an > IEx shell. I'm not sure if this is a good default or not, but it *is* a > fun concept, and something I may do in my projects. > > On Friday, July 14, 2023 at 11:12:17 AM UTC-4 woj...@wojtekmach.pl wrote: > >> I just realised that for this alias: >> >> setup: [“deps.get”, “app.start”] >> >> Running: >> >> $ iex -S mix setup >> >> Just works™. Make of that what you will. :) > > -- > 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/59def4d9-5f83-4916-a280-2f273f0e5182n%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/59def4d9-5f83-4916-a280-2f273f0e5182n%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/CAHMz6kzx0DcaXXry-A_oNStq3JUOTNWxyE57dhvV3g6M9ad-hA%40mail.gmail.com.