diff --git a/.gitignore b/.gitignore index 8ee1bf9..d152bc6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .stack-work +result diff --git a/houseman.cabal b/houseman.cabal index 96eecf5..a8878e4 100644 --- a/houseman.cabal +++ b/houseman.cabal @@ -1,6 +1,10 @@ --- This file has been generated from package.yaml by hpack version 0.13.0. +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.31.2. -- -- see: https://github.com/sol/hpack +-- +-- hash: 7ad26b607f812778104a29c85ec86aaf6906f8a3bfeb3f56bb60b2ce29509485 name: houseman version: 0.1.0 @@ -12,7 +16,6 @@ license-file: LICENSE maintainer: Daisuke Fujimura category: Development build-type: Simple -cabal-version: >= 1.10 source-repository head type: git @@ -21,22 +24,23 @@ source-repository head library hs-source-dirs: src - ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N + ghc-options: -Weverything -Wno-missing-exported-signatures -Wno-missing-import-lists -Wno-missed-specialisations -Wno-all-missed-specialisations -Wno-unsafe -Wno-safe -Wno-missing-local-signatures -Wno-monomorphism-restriction -Wno-missing-export-lists -threaded -rtsopts -with-rtsopts=-N build-depends: - base >= 4.7 && < 5 + base , bytestring - , text - , unix - , process - , trifecta - , parsers - , time - , optparse-generic >= 1.1.0 - , dotenv , directory - , streaming-commons - , mtl + , dotenv , io-streams + , mtl + , optparse-generic + , parsers + , process + , streaming-commons + , tagged + , text + , time + , trifecta + , unix exposed-modules: Houseman Houseman.Internal @@ -44,29 +48,34 @@ library Houseman.Types Procfile.Parse Procfile.Types + other-modules: + Paths_houseman default-language: Haskell2010 executable houseman main-is: Main.hs + other-modules: + Paths_houseman hs-source-dirs: app - ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N + ghc-options: -Weverything -Wno-missing-exported-signatures -Wno-missing-import-lists -Wno-missed-specialisations -Wno-all-missed-specialisations -Wno-unsafe -Wno-safe -Wno-missing-local-signatures -Wno-monomorphism-restriction -Wno-missing-export-lists -threaded -rtsopts -with-rtsopts=-N build-depends: - base >= 4.7 && < 5 + base , bytestring - , text - , unix - , process - , trifecta - , parsers - , time - , optparse-generic >= 1.1.0 - , dotenv , directory - , streaming-commons - , mtl - , io-streams + , dotenv , houseman + , io-streams + , mtl + , optparse-generic + , parsers + , process + , streaming-commons + , tagged + , text + , time + , trifecta + , unix default-language: Haskell2010 test-suite spec @@ -74,29 +83,30 @@ test-suite spec main-is: Spec.hs hs-source-dirs: test - , src - ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N + src + ghc-options: -Weverything -Wno-missing-exported-signatures -Wno-missing-import-lists -Wno-missed-specialisations -Wno-all-missed-specialisations -Wno-unsafe -Wno-safe -Wno-missing-local-signatures -Wno-monomorphism-restriction -Wno-missing-export-lists -threaded -rtsopts -with-rtsopts=-N build-depends: - base >= 4.7 && < 5 + QuickCheck + , base , bytestring - , text - , unix - , process - , trifecta - , parsers - , time - , optparse-generic >= 1.1.0 - , dotenv , directory - , streaming-commons - , mtl + , dotenv + , hspec ==2.* + , interpolate , io-streams - , hspec == 2.* - , temporary + , mockery + , mtl + , optparse-generic + , parsers + , process , silently - , mockery >= 0.3 - , interpolate - , QuickCheck + , streaming-commons + , tagged + , temporary + , text + , time + , trifecta + , unix other-modules: HousemanSpec Procfile.ParseSpec @@ -106,4 +116,5 @@ test-suite spec Houseman.Types Procfile.Parse Procfile.Types + Paths_houseman default-language: Haskell2010 diff --git a/package.yaml b/package.yaml index c9d53ae..67a3362 100644 --- a/package.yaml +++ b/package.yaml @@ -6,10 +6,29 @@ license: MIT github: fujimura/houseman category: Development -ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N +ghc-options: + # For details on warnings: https://downloads.haskell.org/~ghc/master/users-guide/using-warnings.html + # This list taken from https://medium.com/mercury-bank/enable-all-the-warnings-a0517bc081c3 + # Enable all warnings with -Weverything, then disable the ones we don’t care about + - -Weverything + - -Wno-missing-exported-signatures # missing-exported-signatures turns off the more strict -Wmissing-signatures. See https://ghc.haskell.org/trac/ghc/ticket/14794#ticket + - -Wno-missing-import-lists # Requires explicit imports of _every_ function (e.g. ‘$’); too strict + - -Wno-missed-specialisations # When GHC can’t specialize a polymorphic function. No big deal and requires fixing underlying libraries to solve. + - -Wno-all-missed-specialisations # See missed-specialisations + - -Wno-unsafe # Don’t use Safe Haskell warnings + - -Wno-safe # Don’t use Safe Haskell warnings + - -Wno-missing-local-signatures # Warning for polymorphic local bindings; nothing wrong with those. + - -Wno-monomorphism-restriction # Don’t warn if the monomorphism restriction is used + + # TODO: fix these + - -Wno-missing-export-lists + + - -threaded + - -rtsopts + - -with-rtsopts=-N dependencies: - - base >= 4.7 && < 5 + - base - bytestring - text - unix @@ -17,12 +36,13 @@ dependencies: - trifecta - parsers - time - - optparse-generic >= 1.1.0 + - optparse-generic - dotenv - directory - streaming-commons - mtl - io-streams + - tagged library: source-dirs: src @@ -44,6 +64,6 @@ tests: - hspec == 2.* - temporary - silently - - mockery >= 0.3 + - mockery - interpolate - QuickCheck diff --git a/stack.yaml b/stack.yaml index 22c12df..7e5b6cf 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,16 +1,17 @@ # For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md # Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2) -resolver: lts-5.15 +resolver: lts-13.30 # Local packages, usually specified by relative directory name packages: - '.' # Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3) -extra-deps: - - optparse-generic-1.1.0 - - dotenv-0.3.0.1 + +# extra-deps: +# - optparse-generic-1.3.0@sha256:9a86164276f1d7eda9f3e3d115093b9e9c969f2a4d3cee93e1c283f300feb3d1 + # - dotenv-0.3.0.1 # Override default flag values for local packages and extra-deps flags: {} @@ -32,3 +33,7 @@ extra-package-dbs: [] # Extra directories used by stack for building # extra-include-dirs: [/path/to/dir] # extra-lib-dirs: [/path/to/dir] + +nix: + enable: true + shell-file: shell.nix diff --git a/test/fixtures/echo.sh b/test/fixtures/echo.sh index 626ccd4..69700fb 100755 --- a/test/fixtures/echo.sh +++ b/test/fixtures/echo.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#!/usr/bin/env bash echo "ECHO=${ECHO}" for var in "$@" diff --git a/test/fixtures/error.sh b/test/fixtures/error.sh index e6b915e..70d9ca9 100755 --- a/test/fixtures/error.sh +++ b/test/fixtures/error.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#!/usr/bin/env bash echo 'error' >&2 echo 'error' >&2