Skip to content
Permalink
Browse files

;stack: simplify stack file names

  • Loading branch information
simonmichael committed Jan 27, 2020
1 parent ce7929b commit b9763b9bddbc4405b1021ad38deffa9e794114e0
@@ -1378,9 +1378,9 @@ This can take a while! To save time, you can build individual packages, eg just
Note stack does not fetch C libraries such as curses or terminfo, which you might need to install yourself, using your system's package manager.
In case of trouble, see [download](/download.html#link-errors).

If you want to use an older snapshot/GHC for some reason, specify one of the older stack-ghc*.yaml files:
If you want to use an older snapshot/GHC for some reason, specify one of the older stack-*.yaml files:
stack --stack-yaml stack-ghc8.2.yaml build
stack --stack-yaml stack-8.2.yaml build
### Run in place
@@ -391,7 +391,7 @@ buildplantest: $(call def-help,buildplantest, stack build --dry-run all hledger
buildplantest-all: $(call def-help,buildplantest-all, stack build --dry-run all hledger packages ensuring an install plan with each ghc version/stackage snapshot )
for F in stack-*.yaml stack.yaml; do make --no-print-directory buildplantest-$$F; done

buildplantest-%: $(call def-help,buildplantest-STACKFILE, stack build --dry-run all hledger packages ensuring an install plan with the given stack yaml file; eg make buildplantest-stack-ghc8.2.yaml )
buildplantest-%: $(call def-help,buildplantest-STACKFILE, stack build --dry-run all hledger packages ensuring an install plan with the given stack yaml file; eg make buildplantest-stack-8.2.yaml )
$(STACK) build --dry-run --test --bench --stack-yaml=$*

buildtest: $(call def-help,buildtest, force-rebuild all hledger packages/modules quickly ensuring no warnings with default snapshot) \
@@ -400,7 +400,7 @@ buildtest: $(call def-help,buildtest, force-rebuild all hledger packages/modules
buildtest-all: $(call def-help,buildtest-all, force-rebuild all hledger packages/modules quickly ensuring no warnings with each ghc version/stackage snapshot )
for F in stack-*.yaml stack.yaml; do make --no-print-directory buildtest-$$F; done

buildtest-%: $(call def-help,buildtest-STACKFILE, force-rebuild all hledger packages/modules quickly ensuring no warnings with the given stack yaml file; eg make buildtest-stack-ghc8.2.yaml )
buildtest-%: $(call def-help,buildtest-STACKFILE, force-rebuild all hledger packages/modules quickly ensuring no warnings with the given stack yaml file; eg make buildtest-stack-8.2.yaml )
$(STACK) build --test --bench $(SKIPTESTSBENCHS) --fast --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror --stack-yaml=$*

incr-buildtest: $(call def-help,incr-buildtest, build any outdated hledger packages/modules quickly ensuring no warnings with default snapshot. Wont detect warnings in up-to-date modules.) \
@@ -409,15 +409,15 @@ incr-buildtest: $(call def-help,incr-buildtest, build any outdated hledger packa
incr-buildtest-all: $(call def-help,incr-buildtest-all, build any outdated hledger packages/modules quickly ensuring no warnings with each ghc version/stackage snapshot. Wont detect warnings in up-to-date modules. )
for F in stack-*.yaml stack.yaml; do make --no-print-directory incr-buildtest-$$F; done

incr-buildtest-%: $(call def-help,incr-buildtest-STACKFILE, build any outdated hledger packages/modules quickly ensuring no warnings with the stack yaml file; eg make buildtest-stack-ghc8.2.yaml. Wont detect warnings in up-to-date modules. )
incr-buildtest-%: $(call def-help,incr-buildtest-STACKFILE, build any outdated hledger packages/modules quickly ensuring no warnings with the stack yaml file; eg make buildtest-stack-8.2.yaml. Wont detect warnings in up-to-date modules. )
$(STACK) build --test --bench $(SKIPTESTSBENCHS) --fast --ghc-options=-Werror --stack-yaml=$*

pkgtest: $(call def-help,pkgtest, run the test suites in each package )
@($(STACKTEST) && echo $@ PASSED) || (echo $@ FAILED; false)

# doctest with ghc 8.4 on mac requires a workaround, see hledger-lib/package.yaml.
# Or, could run it with ghc 8.2:
# @($(STACKTEST) --stack-yaml stack-ghc8.2.yaml hledger-lib:test:doctest && echo $@ PASSED) || (echo $@ FAILED; false)
# @($(STACKTEST) --stack-yaml stack-8.2.yaml hledger-lib:test:doctest && echo $@ PASSED) || (echo $@ FAILED; false)
doctest: $(call def-help,doctest, run the doctests in hledger-lib module/function docs )
@($(STACKTEST) hledger-lib:test:doctest && echo $@ PASSED) || (echo $@ FAILED; false)

@@ -465,12 +465,6 @@ haddocktest: $(call def-help,haddocktest, run haddock to make sure it can genera
cabalfiletest: $(call def-help,cabalfiletest, run cabal check to test cabal file syntax )
@(make --no-print-directory cabalcheck && echo $@ PASSED) || (echo $@ FAILED; false)

allghcstest: $(call def-help,allghcstest, build/test/benchmark with all supported GHC versions/stackage snapshots and warning-free) \
test-stack-ghc7.10.yaml \
test-stack-ghc8.0.yaml \
test-stack-ghc8.2.yaml \
test-stack.yaml \

test-stack%yaml:
$(STACK) --stack-yaml stack$*yaml clean
$(STACK) --stack-yaml stack$*yaml build --ghc-options="$(WARNINGS) -Werror" --test --bench --haddock --no-haddock-deps
@@ -1,7 +1,7 @@
#!/usr/bin/env stack
{- stack exec
--verbosity=info
--stack-yaml=stack-ghc8.6.yaml
--stack-yaml=stack-8.6.yaml
--package base-prelude
--package directory
--package extra
@@ -12,7 +12,7 @@
ghc
-}
-- Normally uses the project's default resolver & extra deps (stack.yaml).
-- Currently using stack-ghc8.6.yaml (& building two sets of deps) because of
-- Currently using stack-8.6.yaml (& building two sets of deps) because of
-- https://github.com/iconnect/regex/issues/173#issuecomment-570836346
{-
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b9763b9

Please sign in to comment.
You can’t perform that action at this time.