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 authored and DanielG committed Feb 8, 2020
1 parent 1c0f2e8 commit 53509c4
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 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 @@ -139,62 +139,67 @@ library c-h-internal
Paths_cabal_helper
autogen-modules:
Paths_cabal_helper
exposed-modules:
other-modules:
Symlink
if os(windows)
hs-source-dirs: os/win
else
hs-source-dirs: os/posix
hs-source-dirs: src

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

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-lib
type: exitcode-stdio-1.0
main-is: GhcSession.hs
other-modules: TestOptions
hs-source-dirs: tests
ghc-options: -Wall
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
import: build-deps, extensions, c-h-lib
type: exitcode-stdio-1.0
main-is: Examples.hs
hs-source-dirs: tests
ghc-options: -Wall
build-depends: cabal-helper

executable cabal-helper-main
default-language: Haskell2010
Expand Down

0 comments on commit 53509c4

Please sign in to comment.