commercialhaskell / stack

The Haskell Tool Stack
http://haskellstack.org
BSD 3-Clause "New" or "Revised" License
3.98k stars 845 forks source link

--ghc-options (or --fast / --pedantic) get applied to extra-deps #1631

Open mgsloan opened 8 years ago

mgsloan commented 8 years ago

See https://github.com/haskell/haskell-ide-engine/pull/165#issuecomment-170285974 . The issue is that ghc-options get applied to a package like this

- location:
    git: https://github.com/kazu-yamamoto/ghc-mod.git
    commit: b9bd4ebf77b22d2d9061d647d7799ddcc7c51228
  extra-dep: true

Even though apply-ghc-options is its default value, local.

cocreature commented 8 years ago

I thought #1272 was the same issue (which is why I didn’t already open one). That issues is closed but with a comment that #1265 will fix this which is still open.

mgsloan commented 8 years ago

I see! I didn't find that issue since it's specific to --pedantic, and closed. I'm going to leave this one open for now to avoid further dupes.

mboes commented 8 years ago

Perhaps there's a short term fix for this one? The extra-dep/snapshots unification sounds like it might take a while longer still, but in the meantime some projects effectively can't use --pedantic.

borsboom commented 8 years ago

extra-deps are currently local packages, so having those flags apply when apply-ghc-options: local is technically correct. The problem is that extra-deps shouldn't be local packages, and that's one of the things that the extra-dep/snapshot unification addresses. I'd rather that any time spent on this be put toward the extra-dep/custom snapshot unification than a temporary hack. That really is the #1 thing to get finished for Stack right now; a lot of other things are blocked on it.