> Not sure how useful build with compile is, if you run mix test instead of mix compile, build won’t help it.
> Phoenix standardized on setup, but it does not include the compile command. I think a standard `mix build` interface would be most useful for: - People new to Elixir just checking out a project from source and trying to see if it compiles, using familiar semantics from other langs - People checking out a project from source with compilable deliverables, like a CLI executable, which is beyond the purview of most Phoenix applications I'm not really arguing for it, I think these use cases are rare. But if we entertain it, I'd rather amend the proposal with a `*build: ["deps.get", "compile"]*` alias in project templates rather than a hardcoded command. On Fri, Jul 14, 2023 at 3:00 AM José Valim <jose.va...@dashbit.co> wrote: > Phoenix standardized on setup, but it does not include the compile > command. Not sure how useful build with compile is, if you run mix test > instead of mix compile, build won’t help it. > > On Fri, Jul 14, 2023 at 09:11 Andrea Leopardi <an.leopa...@gmail.com> > wrote: > >> I personally like the idea of a mix build alias defined by mix new. The >> reason is that, while mix build is usually different for different >> projects, I like the idea of standardizing on the terminology "build". >> >> On 13 Jul 2023, at 21:21, Jonathan Arnett <jonarnet...@gmail.com> wrote: >> >> I'm definitely open to generating a default alias. >> >> On Thursday, July 13, 2023 at 3:17:14 PM UTC-4 christ...@gmail.com wrote: >> >>> I'd make the counter-argument: mix is a build *tool*, but not your >>> build; that's something you should define for your project. >>> >>> In pretty much all of my projects, I find myself writing a `mix build` >>> alias, as a high-level one-stop-shop command, but it looks very different >>> for each project—my Bakeware CLI application builds look very different >>> from my phoenix umbrella web application build with a custom >>> auto-asset-vendoring pipeline. >>> >>> Perhaps simply having `mix new` create a default alias for `mix build` >>> would work here? I'm very against prescribing what it means to build a >>> project, but this approach would encourage a common idiom across mix >>> projects as well as giving developers a jumping-off-point for when their >>> build's complexity grows. >>> >>> On Thursday, July 13, 2023 at 9:08:55 AM UTC-5 Jonathan Arnett wrote: >>> >>>> When I first clone an Elixir repository, usually the first thing I do >>>> is run `mix do deps.get, compile`. It gets the job done, but it's a bit >>>> verbose. Build tools in other languages (e.g. Rust's cargo, Haskell's >>>> stack, Gleam's gleam) have a "build" command that both pulls dependencies >>>> *and* compiles the app. The proposed "build" command for mix would >>>> functionally be the same running `mix do deps.get, compile`, just in a >>>> smaller package. >>>> >>>> I realize that I can make such an alias in my own projects, and I have, >>>> but I wonder if this would be useful for the larger Elixir community. >>>> >>> >> -- >> 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/7da02486-b925-42b6-90e7-4f06c667417fn%40googlegroups.com >> <https://groups.google.com/d/msgid/elixir-lang-core/7da02486-b925-42b6-90e7-4f06c667417fn%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/EACFBB2D-51DF-4698-BD79-079DC29E776C%40gmail.com >> <https://groups.google.com/d/msgid/elixir-lang-core/EACFBB2D-51DF-4698-BD79-079DC29E776C%40gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > 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/taoD_hFQd1Y/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/CAGnRm4%2BYwRB%2B11WP-EiqUWt%2ButiZqMZQmGW7vZa47pNp6Ec%2Bhw%40mail.gmail.com > <https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2BYwRB%2B11WP-EiqUWt%2ButiZqMZQmGW7vZa47pNp6Ec%2Bhw%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/CAD9kT2S0duqY2e5NBrosRKA8AW%2Bd_261L8Jn-8AZXiSv1e%3D2kg%40mail.gmail.com.