commercialhaskell / commercialhaskell/stack
Building a project with multiple packages indents compiler output, increasing vim woe
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
Like any decent editor, vim can catch and parse compiler output, creating a jump list for errors. Unfortunately, configuring it is as ancient and wizardly as vim itself. The fact that stack will output compiler errors with or without leading spaces, depending on whether or not multiple packages are being built, makes it harder than I want to deal with. I am stuck building packages one at a time.
```
## WHOLE PROJECT
stripe-core-2.1.0: build
-- While building package stripe-core-2.1.0 using:
/home/b/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.22.4.0-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.4.0 build lib:stripe-core --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
Logs have been written to: /home/b/src/Haskell/stripe/.stack-work/logs/stripe-core-2.1.0.log
Preprocessing library stripe-core-2.1.0...
[ 1 of 25] Compiling Web.Stripe.Error ( src/Web/Stripe/Error.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Web/Stripe/Error.o )
/home/b/src/Haskell/stripe/stripe-core/src/Web/Stripe/Error.hs:17:1: Warning:
The import of ‘Control.Applicative’ is redundant
except perhaps to import instances from ‘Control.Applicative’
To import instances alone, use: import Control.Applicative()
:
Failing due to -Werror.
## SINGLE PACKAGE
stripe-core-2.1.0: configure
Configuring stripe-core-2.1.0...
stripe-core-2.1.0: build
Preprocessing library stripe-core-2.1.0...
[ 1 of 25] Compiling Web.Stripe.Error ( src/Web/Stripe/Error.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Web/Stripe/Error.o )
/home/b/src/Haskell/stripe/stripe-core/src/Web/Stripe/Error.hs:17:1: Warning:
The import of ‘Control.Applicative’ is redundant
except perhaps to import instances from ‘Control.Applicative’
To import instances alone, use: import Control.Applicative()
:
Failing due to -Werror.
-- While building package stripe-core-2.1.0 using:
/home/b/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.22.4.0-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.4.0 build lib:stripe-core --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
```
Contributor guide
Research direction
Reproduce the differing compiler output from whole-project and single-package builds using the examples in the issue. Trace Stack's build-output handling and compare the two formatting paths. Done means compiler diagnostics use consistent indentation that Vim can parse in both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100