Feature request: Super fast output of all warnings
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
For [SublimeHaskell](https://github.com/SublimeHaskell/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.
Contributor guide
Research direction
No files, tests, or entry points are named. Start by tracing how `cabal build` decides whether modules are rebuilt and where warnings and errors are produced; done means a cache-backed check mode can report diagnostics for unchanged modules without recompiling them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100