Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade Hedgehog to version 1.4 #1117

Merged
merged 2 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ packages:

optimization: 0

allow-newer: hedgehog-classes:hedgehog

Comment on lines +12 to +13
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intentionally did not sign-off this commit so CI would break and this would not be merged without discussing:

  • Do we want to merge this with allow-newer (if so, I need to reword the commit message to be conventional-commits, and maybe rebase it first so both commits will build cleanly; I'll not squash, to make it trivial to revert once upstream makes a release)
  • Do we want to wait for upstream to fix it (bump hedgehog upper bound 1.3 -> 1.5 hedgehogqa/haskell-hedgehog-classes#52)
  • Did we want some other option?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine. It's more important that we get the GHC 9.6 work moving.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream plans to cut a new release this weekend, so I'll wait until next week to merge this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge. I have opened #1122 to track removing the allow-newer when a release happens.

package *
ghc-options: -fwrite-ide-info
benchmarks: True
Expand Down
2 changes: 1 addition & 1 deletion primer-api/primer-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ library primer-api-hedgehog

build-depends:
, base
, hedgehog ^>=1.1
, hedgehog ^>=1.4
, primer-api
, primer:{primer, primer-hedgehog, primer-testlib}

Expand Down
4 changes: 2 additions & 2 deletions primer-service/primer-service.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ test-suite service-test
, aeson-pretty
, base
, bytestring
, hedgehog ^>=1.1
, hedgehog ^>=1.4
, hedgehog-quickcheck ^>=0.1.1
, hspec ^>=2.10
, openapi3
Expand All @@ -207,7 +207,7 @@ test-suite service-test
, tasty ^>=1.4.1
, tasty-discover ^>=5.0
, tasty-golden ^>=2.3.5
, tasty-hedgehog ^>=1.3
, tasty-hedgehog ^>=1.4.0.2
, tasty-hspec ^>=1.2.0.1
, tasty-hunit ^>=0.10.0
, text
Expand Down
6 changes: 3 additions & 3 deletions primer/primer.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ library primer-hedgehog
, base
, containers
, extra
, hedgehog ^>=1.1
, hedgehog ^>=1.4
, mmorph ^>=1.2.0
, mtl
, primer
, primer-testlib
, tasty-discover ^>=5.0
, tasty-hedgehog ^>=1.3
, tasty-hedgehog ^>=1.4.0.2

library primer-testlib
visibility: public
Expand Down Expand Up @@ -269,7 +269,7 @@ test-suite primer-test
, extra
, filepath
, hedgehog
, hedgehog-classes ^>=0.2.5.3
, hedgehog-classes ^>=0.2.5.4
, logging-effect
, mtl
, optics
Expand Down
2 changes: 1 addition & 1 deletion primer/test/Tests/Action/Available.hs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ tasty_available_actions_accepted = withTests 500 $
KHole m -> [getID m]
KType m -> [getID m]
KFun m k1 k2 -> [getID m] <> allKindIDs k1 <> allKindIDs k2
id <- Gen.element $ allKindIDs k
id <- Gen.element @[] $ allKindIDs k
pure
( "forTypeDefParamKindNode"
,
Expand Down
2 changes: 1 addition & 1 deletion primer/test/Tests/Eval/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import Test.Tasty.HUnit (Assertion, (@?=))
-- * the type of the term
genDirTm :: PropertyT WT (Dir, Expr, Type' ())
genDirTm = do
dir <- forAllT $ Gen.element [Chk, Syn]
dir <- forAllT $ Gen.element @[] [Chk, Syn]
(t', ty) <- case dir of
Chk -> do
ty' <- forAllT $ genWTType $ KType ()
Expand Down
2 changes: 1 addition & 1 deletion primer/test/Tests/Questions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ genSTE' =
Right (ty, True) -> Global (qualifyName m n, ty)
in evalExprGen 0 $ Gen.list (Range.linear 0 20) $ toSTE' <$> genModuleName <*> genName <*> g
where
genModuleName = ModuleName <$> Gen.element [["M"], ["M1"]]
genModuleName = ModuleName <$> Gen.element @[] [["M"], ["M1"]]

genSTE :: Gen ShadowedVarsExpr
genSTE = deal . nubOrdOn nameSTE' <$> genSTE'
Expand Down