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

Feature request: Super fast output of all warnings #1179

Open
nh2 opened this issue Jan 12, 2013 · 3 comments
Open

Feature request: Super fast output of all warnings #1179

nh2 opened this issue Jan 12, 2013 · 3 comments
Labels
Cabal: other old-milestone: ⊥ Moved from https://github.com/haskell/cabal/milestone/5 type: enhancement
Milestone

Comments

@nh2
Copy link
Member

nh2 commented Jan 12, 2013

For SublimeHaskell (and potentially all other editors and similar tools) we need to quickly be able to list all warnings of a cabal project.

cabal build does not show warnings on already compiled modules, so we currently use

cabal build --ghc-options="-fforce-recomp -Wall -fno-code"

to quickly get all warnings of the project. This is obviously slow since all code has to be re-compiled (even though code generation can be skipped).

It would be nice if cabal could use its knowledge of which code has no changes to maintain a cache of warnings and error messages that can be queried super quickly.

We could then add an option cabal build --check that only typechecks the project and prints out all errors/warnings of unchanged files from the cache, so that a no-op typecheck with warnings is instant and can give feedback very quickly or even as you type.

@nh2
Copy link
Member Author

nh2 commented Nov 27, 2014

@ttuegel ttuegel added this to the Cabal-1.24 milestone Apr 23, 2015
@23Skidoo 23Skidoo modified the milestones: Cabal 1.24, Cabal 1.26 Feb 21, 2016
@ezyang ezyang modified the milestones: Cabal 2.0, Sep 6, 2016
@ezyang
Copy link
Contributor

ezyang commented Sep 8, 2016

This is actually annoying to do in the current architecture, because ghc --make spews out all of the warnings into one stderr, so you'd have to parse and separate them out by hand.

I actually implemented warning caching in ghc-shake https://github.com/ezyang/ghc-shake which is a drop-in replacement for ghc. Warnings are put in *.log files so if you use find dist-newstyle/build/ -name "*.log" -exec cat {} \; you'll see all the warnings. Works pretty well for me.

This won't get fixed unless someone steps up to do it.

@jneira
Copy link
Member

jneira commented Apr 28, 2022

Not sure if that behaviour should be included in cabal itselfor in a external tool.

@andreabedini andreabedini added the old-milestone: ⊥ Moved from https://github.com/haskell/cabal/milestone/5 label Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cabal: other old-milestone: ⊥ Moved from https://github.com/haskell/cabal/milestone/5 type: enhancement
Projects
None yet
Development

No branches or pull requests

6 participants