feature: --all option for dune show targets#8167
Conversation
We change `dune show targets` to omit source files by default and add an `--all` option which will show all targets including those that come from the source tree. Signed-off-by: Ali Caglayan <alizter@gmail.com>
b25e557 to
481139c
Compare
|
While this seems like an improvement, I find it very unintuitive that I guess I still prefer |
| "Print all targets, including those that exist in the source \ | ||
| tree.") |
There was a problem hiding this comment.
"All targets including those that exist in the source tree" doesn't make much sense in either of the two worlds:
- If one considers sources to be targets, then the "including ..." part seems tautological/unnecessary, just like "including targets whose name starts with 'a'" would be unnecessary.
- If one doesn't consider sources to be targets, then the "print all targets" makes no sense.
There just seems to be no way to make things non-confusing when you use "targets" or "sources" as the starting point while taking about a generic concept (such as files). Neither targets nor sources are more general than the the other. Files are! |
|
@snowleopard I think I might have a different definition of "target" to the one you are thinking about. For me a target is anything that "dune build" accepts minus aliases (that's another story). I would be happy to remove the |
This definition is pretty inconsistent with, say, what we call targets in actions. Rules have You are designing a UX feature and it's worth thinking about the least confusing way of fitting it with all other Dune concepts.
It's not UX is hard! I think neither the current state of things, nor this PR in the current form, make for a good, non-confusing UX story. |
But also, just to reiterate, I'm far from being a UX expert. Sometimes it's worth talking to users. You can try to talk to them to find out how they think about the sources/targets distinction. We, developers, often have a very skewed view on things. |
|
OK @snowleopard thanks for your valuable feedback. I think I will draft this for now and think about it more when I have some time. |
Happy to brainstorm it at some point to try to figure out a way forward! |
We change
dune show targetsto omit source files by default and add an--alloption which will show all targets including those that come from the source tree.Addresses wish in #7784.