Invoking dune without parameters

dune

is an alias for

man dune

I think an alias for

dune build

would have been a better choice.

It depends of your point of view. What you describe looks like make behavior. In the Rust world, cargo (the equivalent of dune?) shows the help.

By default, showing the help is beginner friendly. On the other hand, doing an action, like start a build, would target experienced users.

Also dune build creates files. Running dune (aliased to a build) in a wrong directory would pollute it. More explicit typing, dune build, makes it less likely to happen. This not an issue if dune defaults to the help.

Why do you think it would be a better choice?

dune --help is quite universal, isnā€™t it?
I feel that dune as an alias of man dune is confusing, as many shortcuts are.

1 Like

Why do you think it would be a better choice?

It would save me typing ā€˜buildā€™
and hence make me more efficient.
And, also default to what make does, which existed way before
any Rust-related thingy.

PS: I guess I qualify as an experienced user of computers

You can also write a very small and simple makefile that invokes dune with the right options. I do that (also for rustā€™s cargo) and it works great. Also it makes it possible to choose whether the default behavior is ā€œbuildā€ or ā€œbuild + run testā€.

3 Likes