cabal
                                
                                
                                
                                    cabal copied to clipboard
                            
                            
                            
                        cabal new-run: Do not print `Up to date`
I use cabal new-run in scripts within my project to call the program that I am developing there, e.g. in the test suite. This is great, because it means I never accidentally test an old binary (my colleagues have to remember running stack build before running the test suite).
But now every invocation prints Up to date, which is a bit annoying and odd-looking in the build log. Would it be unreasonable to skip printing that?
See also #4789, which seems to be a more general solution.
I guess personally, I don’t even want the Up to date on stderr (it’d still show up in the terminal as I run these scripts). But of course that’s subjective.
How about cabal -v0 new-run? That's what  I use.
I’ll have a look :-) … I guess that is good enough for me, so if others find the output useful, I’ll go with that.
I was about to report this again, only to find that I have reported before.
I'm sitting in a MuniHac workshop and was just annoyed by that string in the presenter's command output. My impression is that with the proliferation of cabal run, it's a more relevant paper cut these days.
So can we maybe remove that message in the default verbosity level?
I fully support removing it in the default verbosity. Will approve a PR if anyone gets to it. I think it’s a matter of changing notice for info here:
https://github.com/haskell/cabal/blob/519d2b444b45765ecca13dd515490a6a69750a8f/cabal-install/src/Distribution/Client/ProjectOrchestration.hs#L875
One issue though is that it’s probably not possible under the current architecture to be sensitive to whether you run v2-run or v2-build, and for the latter I think we’d want to see “Up to date”. So maybe I was too hasty in the previous message.
It seems like to address build v. run difference, one could add a Distribution.Client.ProjectOrchestration.CurrentCommand parameter to printPlan (and extend CurrentCommand with RunCommand).
Any volunteers, please? We'd help, promise. :)
@Mikolaj I'm up for it
@cbclemmer that's good to hear, thank you. What I wrote above about distinguishing run vs. build, I think, still stands, although you not necessarily need to extend the CurrentCommand type with run because build seems to be the only reasonable exception to the general rule (don't show Up to date). Therefore, inside printPlan you can just say: print the message only if the current command is build.