Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal new-run: Do not print Up to date #4994

Closed
nomeata opened this issue Jan 3, 2018 · 11 comments · Fixed by #8569
Closed

cabal new-run: Do not print Up to date #4994

nomeata opened this issue Jan 3, 2018 · 11 comments · Fixed by #8569

Comments

@nomeata
Copy link
Contributor

nomeata commented Jan 3, 2018

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?

@23Skidoo
Copy link
Member

23Skidoo commented Jan 3, 2018

See also #4789, which seems to be a more general solution.

@nomeata
Copy link
Contributor Author

nomeata commented Jan 3, 2018

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.

@peti
Copy link
Collaborator

peti commented Jan 3, 2018

How about cabal -v0 new-run? That's what I use.

@nomeata
Copy link
Contributor Author

nomeata commented Jan 3, 2018

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.

@nomeata nomeata closed this as completed Jan 3, 2018
@nomeata
Copy link
Contributor Author

nomeata commented Oct 8, 2022

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?

@nomeata nomeata reopened this Oct 8, 2022
@ulysses4ever
Copy link
Collaborator

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:

@ulysses4ever
Copy link
Collaborator

ulysses4ever commented Oct 8, 2022

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.

@ulysses4ever
Copy link
Collaborator

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).

@Mikolaj
Copy link
Member

Mikolaj commented Oct 31, 2022

Any volunteers, please? We'd help, promise. :)

@cbclemmer
Copy link
Collaborator

@Mikolaj I'm up for it

@cbclemmer cbclemmer self-assigned this Oct 31, 2022
@ulysses4ever
Copy link
Collaborator

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment