mirror of
https://github.com/composewell/streamly.git
synced 2024-08-16 23:10:36 +03:00
Remove doctests
Should use cabal-docspec instead.
This commit is contained in:
parent
b9b94b32ab
commit
624158d678
9
.github/workflows/haskell.yml
vendored
9
.github/workflows/haskell.yml
vendored
@ -59,7 +59,6 @@ jobs:
|
|||||||
- 8.6.5+fusion-plugin
|
- 8.6.5+fusion-plugin
|
||||||
- 8.6.5+streamk
|
- 8.6.5+streamk
|
||||||
- 8.4.4+debug
|
- 8.4.4+debug
|
||||||
- doctests
|
|
||||||
cabal_version: ["3.4"]
|
cabal_version: ["3.4"]
|
||||||
include:
|
include:
|
||||||
- name: 9.0.1
|
- name: 9.0.1
|
||||||
@ -116,14 +115,6 @@ jobs:
|
|||||||
cabal_project: cabal.project
|
cabal_project: cabal.project
|
||||||
cabal_build_options: "--flag debug --flag -opt"
|
cabal_build_options: "--flag debug --flag -opt"
|
||||||
runner: ubuntu-latest
|
runner: ubuntu-latest
|
||||||
- name: doctests
|
|
||||||
ghc_version: 8.8.3
|
|
||||||
build: cabal-v2
|
|
||||||
cabal_build_options: "--flag doctests"
|
|
||||||
cabal_build_targets: doctests
|
|
||||||
disable_sdist_build: "y"
|
|
||||||
disable_dist_checks: "y"
|
|
||||||
runner: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
cabal.project
|
cabal.project
|
||||||
cabal.project.ci
|
cabal.project.ci
|
||||||
cabal.project.coverage
|
cabal.project.coverage
|
||||||
|
cabal.project.doctest
|
||||||
cabal.project.hpc-coveralls
|
cabal.project.hpc-coveralls
|
||||||
hie.yaml
|
hie.yaml
|
||||||
stack.yaml
|
stack.yaml
|
||||||
|
4
Setup.hs
4
Setup.hs
@ -1,6 +1,6 @@
|
|||||||
module Main (main) where
|
module Main (main) where
|
||||||
|
|
||||||
import Distribution.Extra.Doctest (defaultMainAutoconfWithDoctests)
|
import Distribution.Simple
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = defaultMainAutoconfWithDoctests "doctests"
|
main = defaultMainWithHooks autoconfUserHooks
|
||||||
|
2
cabal.project.doctest
Normal file
2
cabal.project.doctest
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
packages: streamly.cabal
|
||||||
|
, docs/streamly-docs.cabal
|
@ -1,6 +1,6 @@
|
|||||||
module Main (main) where
|
module Main (main) where
|
||||||
|
|
||||||
import Distribution.Extra.Doctest (defaultMainWithDoctests)
|
import Distribution.Simple
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = defaultMainWithDoctests "streamly-docs-doctests"
|
main = defaultMain
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
module Main where
|
|
||||||
|
|
||||||
import Build_doctests (flags, pkgs, module_sources)
|
|
||||||
import Data.Foldable (traverse_)
|
|
||||||
import System.Environment.Compat (getArgs, unsetEnv)
|
|
||||||
import Test.DocTest (doctest)
|
|
||||||
|
|
||||||
import qualified Data.List as List
|
|
||||||
|
|
||||||
main :: IO ()
|
|
||||||
main = do
|
|
||||||
cliArgs <- getArgs
|
|
||||||
let (cliArgs1, mods) =
|
|
||||||
if (List.null (filter (== "--modules") cliArgs))
|
|
||||||
then (cliArgs, module_sources)
|
|
||||||
else (List.delete "--modules" cliArgs, [])
|
|
||||||
let args =
|
|
||||||
[ "-outputdir=./_doctests/"
|
|
||||||
, "-fobject-code"
|
|
||||||
, "--fast"
|
|
||||||
]
|
|
||||||
++ cliArgs1
|
|
||||||
++ flags
|
|
||||||
++ pkgs
|
|
||||||
++ mods
|
|
||||||
traverse_ putStrLn args
|
|
||||||
unsetEnv "GHC_ENVIRONMENT"
|
|
||||||
doctest args
|
|
@ -9,12 +9,7 @@ name: streamly-docs
|
|||||||
version: 0.0.0
|
version: 0.0.0
|
||||||
synopsis: Documentation for Streamly
|
synopsis: Documentation for Streamly
|
||||||
description: Documentation for Streamly
|
description: Documentation for Streamly
|
||||||
build-type: Custom
|
build-type: Simple
|
||||||
custom-setup
|
|
||||||
setup-depends:
|
|
||||||
base >= 4 && <5,
|
|
||||||
cabal-doctest >= 1 && <1.1,
|
|
||||||
Cabal >= 2.2 && < 4
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
-- Library
|
-- Library
|
||||||
@ -33,16 +28,3 @@ library
|
|||||||
base >= 4.9 && < 5
|
base >= 4.9 && < 5
|
||||||
, transformers >= 0.4 && < 0.6
|
, transformers >= 0.4 && < 0.6
|
||||||
, streamly
|
, streamly
|
||||||
|
|
||||||
test-suite streamly-docs-doctests
|
|
||||||
type: exitcode-stdio-1.0
|
|
||||||
default-language: Haskell2010
|
|
||||||
ghc-options: -Wall
|
|
||||||
hs-source-dirs: .
|
|
||||||
main-is: doctests.hs
|
|
||||||
autogen-modules: Build_doctests
|
|
||||||
build-depends:
|
|
||||||
base
|
|
||||||
, base-compat >= 0.10.5 && < 0.12
|
|
||||||
, doctest >= 0.15 && < 0.19
|
|
||||||
, streamly-docs
|
|
||||||
|
28
doctests.hs
28
doctests.hs
@ -1,28 +0,0 @@
|
|||||||
module Main where
|
|
||||||
|
|
||||||
import Build_doctests (flags, pkgs, module_sources)
|
|
||||||
import Data.Foldable (traverse_)
|
|
||||||
import System.Environment.Compat (getArgs, unsetEnv)
|
|
||||||
import Test.DocTest (doctest)
|
|
||||||
|
|
||||||
import qualified Data.List as List
|
|
||||||
|
|
||||||
main :: IO ()
|
|
||||||
main = do
|
|
||||||
cliArgs <- getArgs
|
|
||||||
let (cliArgs1, mods) =
|
|
||||||
if (List.null (filter (== "--modules") cliArgs))
|
|
||||||
then (cliArgs, module_sources)
|
|
||||||
else (List.delete "--modules" cliArgs, [])
|
|
||||||
let args =
|
|
||||||
[ "-outputdir=./_doctests/"
|
|
||||||
, "-fobject-code"
|
|
||||||
, "--fast"
|
|
||||||
]
|
|
||||||
++ cliArgs1
|
|
||||||
++ flags
|
|
||||||
++ pkgs
|
|
||||||
++ mods
|
|
||||||
traverse_ putStrLn args
|
|
||||||
unsetEnv "GHC_ENVIRONMENT"
|
|
||||||
doctest args
|
|
@ -45,7 +45,7 @@ category:
|
|||||||
Logic, Non-determinism, Parsing, Array, Time, Unicode, Filesystem,
|
Logic, Non-determinism, Parsing, Array, Time, Unicode, Filesystem,
|
||||||
Network
|
Network
|
||||||
stability: Stable
|
stability: Stable
|
||||||
build-type: Custom
|
build-type: Configure
|
||||||
|
|
||||||
extra-source-files:
|
extra-source-files:
|
||||||
.circleci/config.yml
|
.circleci/config.yml
|
||||||
@ -190,17 +190,6 @@ flag opt
|
|||||||
manual: True
|
manual: True
|
||||||
default: True
|
default: True
|
||||||
|
|
||||||
flag doctests
|
|
||||||
description: Build doctests test suite
|
|
||||||
manual: True
|
|
||||||
default: False
|
|
||||||
|
|
||||||
custom-setup
|
|
||||||
setup-depends:
|
|
||||||
base >= 4 && <5,
|
|
||||||
cabal-doctest >= 1 && <1.1,
|
|
||||||
Cabal >= 2.2 && < 4
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
-- Common stanzas
|
-- Common stanzas
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@ -540,19 +529,3 @@ library
|
|||||||
-- tests fail
|
-- tests fail
|
||||||
if flag(dev) && flag(inspection)
|
if flag(dev) && flag(inspection)
|
||||||
build-depends: inspection-and-dev-flags-cannot-be-used-together
|
build-depends: inspection-and-dev-flags-cannot-be-used-together
|
||||||
|
|
||||||
test-suite doctests
|
|
||||||
type: exitcode-stdio-1.0
|
|
||||||
main-is: doctests.hs
|
|
||||||
if flag(doctests)
|
|
||||||
build-depends:
|
|
||||||
base
|
|
||||||
, base-compat >= 0.10.5 && < 0.12
|
|
||||||
, doctest >= 0.15 && < 0.19
|
|
||||||
, streamly
|
|
||||||
else
|
|
||||||
buildable: False
|
|
||||||
|
|
||||||
ghc-options: -Wall -threaded
|
|
||||||
hs-source-dirs: .
|
|
||||||
default-language: Haskell2010
|
|
||||||
|
Loading…
Reference in New Issue
Block a user