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

Don't print 'Up to date' in 'cabal run' #8828

Closed
chshersh opened this issue Mar 3, 2023 · 4 comments
Closed

Don't print 'Up to date' in 'cabal run' #8828

chshersh opened this issue Mar 3, 2023 · 4 comments

Comments

@chshersh
Copy link
Member

chshersh commented Mar 3, 2023

When running executables with cabal run, it prints an annoying line Up to date line, messing with the output and making it look less pretty.

The cabal exec command, however, doesn't print this line, make the output nicer. The cabal run command, is more preferred, as it guarantees to run the latest version of the executable and compiles it if needed.

Comparison from one of the executables:

cabal run

❯ cabal run simple-grep -- -f iris.cabal -s iris
Up to date
2: name:                iris
7:     See [README.md](https://github.com/chshersh/iris#iris) for more details.
8: homepage:            https://github.com/chshersh/iris
9: bug-reports:         https://github.com/chshersh/iris/issues
27:   location:            https://github.com/chshersh/iris.git
107: test-suite iris-test
114:     Paths_iris
117:     Paths_iris
126:     , iris

*cabal exec

❯ cabal exec simple-grep -- -f iris.cabal -s iris
2: name:                iris
7:     See [README.md](https://github.com/chshersh/iris#iris) for more details.
8: homepage:            https://github.com/chshersh/iris
9: bug-reports:         https://github.com/chshersh/iris/issues
27:   location:            https://github.com/chshersh/iris.git
107: test-suite iris-test
114:     Paths_iris
117:     Paths_iris
126:     , iris

I tried to check the code to see if it's possible to fix this log quickly. However, it seems like it's buried deep inside, and I'm not sure what is the best way to fix it.

| null pkgs && currentCommand == BuildCommand
= notice verbosity "Up to date"

Details

cabal version: 3.8.1.0
OS: Ubuntu 20.04
GHC version: 9.2.5

@chshersh chshersh added cabal-install: cmd/run attention: needs-help Help wanted with this issue/PR labels Mar 3, 2023
@ffaf1
Copy link
Collaborator

ffaf1 commented Mar 3, 2023

Related: #7790

@ulysses4ever
Copy link
Collaborator

Thanks for the report! It's a dup of #4994, which was fixed, and the fix should be released as a part of cabal-install 3.10. I suggest we close.

@ulysses4ever ulysses4ever added status: consider closing and removed attention: needs-help Help wanted with this issue/PR labels Mar 3, 2023
@chshersh
Copy link
Member Author

chshersh commented Mar 3, 2023

Nice to hear, it's closed! Wasn't aware there is a duplicate. I'm happy to close 🙌🏻

@chshersh chshersh closed this as completed Mar 3, 2023
@ulysses4ever
Copy link
Collaborator

@chshersh sure, no worries. If you have GHCup at hand, you can add the prerelease channel (see their guide) and check out cabal-install 3.9, a prerelease that should have this patch. That way we can double check that everything is going as planned.

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

No branches or pull requests

3 participants