Skip to content

Commit

Permalink
Turn private library into common stanza
Browse files Browse the repository at this point in the history
Private libraries have a bunch of bugs in cabal currently:
* haskell/cabal#6211
* haskell/cabal#6483

and devs of haskell-ide-engine are encountering this bug frequently.
To mitigate this issue, remove usage of private libraries and use
a common stanza to have the same re-use as before.

This change can be undone when the mentioned issues have been resolved.
  • Loading branch information
fendor committed Feb 8, 2020
1 parent 1c0f2e8 commit 78ea5b3
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions cabal-helper.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ common build-deps
ghc-options: -Wall


library c-h-internal
common c-h-internal
import: build-deps, extensions
exposed-modules:
other-modules:
CabalHelper.Compiletime.Cabal
CabalHelper.Compiletime.CompPrograms
CabalHelper.Compiletime.Compat.Environment
Expand All @@ -135,7 +135,6 @@ library c-h-internal
CabalHelper.Runtime.HelperMain
CabalHelper.Shared.Common
CabalHelper.Shared.InterfaceTypes
other-modules:
Paths_cabal_helper
autogen-modules:
Paths_cabal_helper
Expand All @@ -148,36 +147,33 @@ library c-h-internal
hs-source-dirs: src

library
import: build-deps, extensions
import: build-deps, extensions, c-h-internal
exposed-modules: Distribution.Helper
Distribution.Helper.Discover
other-modules:
Paths_cabal_helper
autogen-modules:
Paths_cabal_helper
hs-source-dirs: lib
build-depends: c-h-internal

test-suite compile-test
import: build-deps, extensions
import: build-deps, extensions, c-h-internal
type: exitcode-stdio-1.0
main-is: CompileTest.hs
other-modules: TestOptions
hs-source-dirs: tests
ghc-options: -Wall
build-depends: c-h-internal

test-suite programs-test
import: build-deps, extensions
import: build-deps, extensions, c-h-internal
type: exitcode-stdio-1.0
main-is: ProgramsTest.hs
hs-source-dirs: tests
ghc-options: -Wall
build-depends: c-h-internal
, pretty-show
build-depends: pretty-show

test-suite ghc-session
import: build-deps, extensions
import: build-deps, extensions, c-h-internal
type: exitcode-stdio-1.0
main-is: GhcSession.hs
other-modules: TestOptions
Expand All @@ -186,7 +182,6 @@ test-suite ghc-session
build-depends: ghc < 8.9 && >= 8.0.2
, pretty-show < 1.9 && >= 1.8.1
, cabal-helper
, c-h-internal

test-suite examples
import: build-deps, extensions
Expand Down

0 comments on commit 78ea5b3

Please sign in to comment.