Closed JanGe closed 7 years ago
Thanks!
Hmm... tasty
seems to be rather opinionated about this replay
arg now. I think breaking compatibility is the right move here, as I don't want surprising changes in behavior when interfacing with QuickCheck either directly through tasty-quickcheck
, or proxying through tasty-hspec
.
What do you think?
Oh, and don't mind the travis failures. I'm fixing them up now.
I did a few revisions on Hackage, now the matrix is a bit greener: https://matrix.hackage.haskell.org/package/tasty-hspec
Cheers, Oleg, your Hackage Trustee.
@phadej Thanks! I will soon upload a version compatible with tasty-0.9
.
Having a function in tasty-quickcheck
certainly is the better approach. So I'd say just wait for 0.9.0.1
, bump up the min bounds and close this PR. But up to you, if you want to remain backwards copatible. 😉
@JanGe Roman did some quick work merging a patch and pushing 0.9.1, so I will just close this out and fix the code up. Thanks anyways for the patch. Cheers
Restoring compatibility after
tasty-quickcheck-0.9
introduced a breaking change in its replay seed argument. The pragmas are a bit ugly, but the only alternative I could think of was to drop backwards compatibility.Steps to reproduce with current
master
:Set
stack.yaml
toresolver: nightly-2017-06-18 extra-deps:
Run
stack build
You should see the following error:
/Users/jan/Documents/Programmierung/Haskell/tasty-hspec/Test/Tasty/Hspec.hs:91:32: error: • Couldn't match type ‘Int’ with ‘(Test.QuickCheck.Random.QCGen, Int)’ Expected type: Maybe (Test.QuickCheck.Random.QCGen, Int) Actual type: Maybe Int • In the ‘replay’ field of a record In the expression: QC.stdArgs {QC.chatty = False, QC.maxDiscardRatio = max_ratio, QC.maxSize = max_size, QC.maxSuccess = num_tests, QC.replay = replay} In an equation for ‘qc_args’: qc_args = QC.stdArgs {QC.chatty = False, QC.maxDiscardRatio = max_ratio, QC.maxSize = max_size, QC.maxSuccess = num_tests, QC.replay = replay} where QuickCheckTests num_tests = T.lookupOption opts QuickCheckReplay replay = T.lookupOption opts QuickCheckMaxSize max_size = T.lookupOption opts QuickCheckMaxRatio max_ratio = T.lookupOption opts
-- While building package tasty-hspec-1.1.3.1 using: /Users/jan/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 build lib:tasty-hspec --ghc-options " -ddump-hi -ddump-to-file" Process exited with code: ExitFailure 1