From fb9fd42ebf67c52b5f1f93edfa93ab7162bde7f1 Mon Sep 17 00:00:00 2001 From: Robert Benson Date: Tue, 23 Sep 2025 16:45:43 -0400 Subject: [PATCH 1/6] Move markdown-unlit from dependencies to build-tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids unused-package warnings and removes the need for empty imports. 🤖 Generated with Claude Code --- graphula.cabal | 5 +++-- package.yaml | 7 ++++--- test/README.lhs | 1 - 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/graphula.cabal b/graphula.cabal index be2d762..c609d1a 100644 --- a/graphula.cabal +++ b/graphula.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.37.0. +-- This file has been generated from package.yaml by hpack version 0.38.1. -- -- see: https://github.com/sol/hpack @@ -78,13 +78,14 @@ test-suite readme hs-source-dirs: test ghc-options: -Weverything -Wno-all-missed-specialisations -Wno-implicit-prelude -Wno-missing-import-lists -Wno-safe -Wno-unsafe -pgmL markdown-unlit + build-tool-depends: + markdown-unlit:markdown-unlit build-depends: QuickCheck , base <5 , generic-arbitrary , graphula , hspec - , markdown-unlit , monad-logger , persistent , persistent-sqlite diff --git a/package.yaml b/package.yaml index bc4f3b5..969bbb8 100644 --- a/package.yaml +++ b/package.yaml @@ -61,20 +61,19 @@ tests: ghc-options: -pgmL markdown-unlit source-dirs: - test - + #BLANKLINE dependencies: - QuickCheck - generic-arbitrary - graphula - hspec - - markdown-unlit - monad-logger - persistent - persistent-sqlite - resourcet - transformers - unliftio-core - + #BLANKLINE when: - condition: impl(ghc >= 8.8) ghc-options: @@ -82,6 +81,8 @@ tests: - condition: "flag(persistent-template)" dependencies: - persistent-template + build-tools: + - markdown-unlit flags: persistent-template: diff --git a/test/README.lhs b/test/README.lhs index fda2924..343be64 100644 --- a/test/README.lhs +++ b/test/README.lhs @@ -45,7 +45,6 @@ import Graphula import Test.Hspec import Test.QuickCheck import Test.QuickCheck.Arbitrary.Generic -import Text.Markdown.Unlit () instance (ToBackendKey SqlBackend a) => Arbitrary (Key a) where arbitrary = toSqlKey <$> arbitrary From 37945cda71eac366c646ab460d2e7739a747736b Mon Sep 17 00:00:00 2001 From: Robert Benson Date: Tue, 23 Sep 2025 16:47:31 -0400 Subject: [PATCH 2/6] fix yaml crap --- package.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.yaml b/package.yaml index 969bbb8..50ce2c2 100644 --- a/package.yaml +++ b/package.yaml @@ -61,7 +61,7 @@ tests: ghc-options: -pgmL markdown-unlit source-dirs: - test - #BLANKLINE + dependencies: - QuickCheck - generic-arbitrary @@ -73,7 +73,7 @@ tests: - resourcet - transformers - unliftio-core - #BLANKLINE + when: - condition: impl(ghc >= 8.8) ghc-options: From 03780cdcb4a53df4d3162706a642aad1646ab57c Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 23 Sep 2025 22:32:44 +0000 Subject: [PATCH 3/6] Update nightly resolver to current version Change from nightly-2023-07-25 to nightly to use the current nightly snapshot. Co-Authored-By: robert.benson@renaissance.com --- stack-nightly.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack-nightly.yaml b/stack-nightly.yaml index ba559fb..5124b4a 100644 --- a/stack-nightly.yaml +++ b/stack-nightly.yaml @@ -1 +1 @@ -resolver: nightly-2023-07-25 +resolver: nightly From 93213a259f8a7b1d4933203db1eb644277ab3935 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 23 Sep 2025 23:08:16 +0000 Subject: [PATCH 4/6] Fix deprecated System.Random.split usage Replace deprecated 'split' function with 'splitGen' for compatibility with newer random library versions in nightly snapshots Co-Authored-By: robert.benson@renaissance.com --- src/Graphula/Arbitrary.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Graphula/Arbitrary.hs b/src/Graphula/Arbitrary.hs index 878786e..4604680 100644 --- a/src/Graphula/Arbitrary.hs +++ b/src/Graphula/Arbitrary.hs @@ -8,7 +8,7 @@ import Prelude import Control.Monad.IO.Unlift (MonadIO, liftIO) import Data.IORef (readIORef, writeIORef) import Graphula.Class (MonadGraphulaBackend, askGen) -import System.Random (split) +import System.Random (splitGen) import Test.QuickCheck (Gen) import Test.QuickCheck.Gen (unGen) @@ -22,7 +22,7 @@ generate gen = do genRef <- askGen g <- liftIO $ readIORef genRef let - (g1, g2) = split g + (g1, g2) = splitGen g x = unGen gen g1 30 liftIO $ writeIORef genRef g2 pure x From 375162284f4d74a49d1f0dc9d7e3bbf9845c491e Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 23 Sep 2025 23:12:24 +0000 Subject: [PATCH 5/6] Revert to using System.Random.split with deprecation warning suppression The split function is deprecated but will remain available for backward compatibility. Using splitGen breaks older Stack resolvers that don't have the SplitGen type class. Added pragma to suppress deprecation warning. Co-Authored-By: robert.benson@renaissance.com --- src/Graphula/Arbitrary.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Graphula/Arbitrary.hs b/src/Graphula/Arbitrary.hs index 4604680..855fca7 100644 --- a/src/Graphula/Arbitrary.hs +++ b/src/Graphula/Arbitrary.hs @@ -1,4 +1,5 @@ -- | 'Arbitrary' operations that respect Graphula's seed +{-# OPTIONS_GHC -Wno-deprecations #-} module Graphula.Arbitrary ( generate ) where @@ -8,7 +9,7 @@ import Prelude import Control.Monad.IO.Unlift (MonadIO, liftIO) import Data.IORef (readIORef, writeIORef) import Graphula.Class (MonadGraphulaBackend, askGen) -import System.Random (splitGen) +import System.Random (split) import Test.QuickCheck (Gen) import Test.QuickCheck.Gen (unGen) @@ -22,7 +23,7 @@ generate gen = do genRef <- askGen g <- liftIO $ readIORef genRef let - (g1, g2) = splitGen g + (g1, g2) = split g x = unGen gen g1 30 liftIO $ writeIORef genRef g2 pure x From e7c3bc5a05c7dd57f5593a8a953507dbc7700e45 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 23 Sep 2025 23:13:47 +0000 Subject: [PATCH 6/6] Use concrete nightly snapshot date Specify nightly-2025-09-23 instead of just 'nightly' for reproducible builds. Co-Authored-By: robert.benson@renaissance.com --- stack-nightly.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack-nightly.yaml b/stack-nightly.yaml index 5124b4a..9ea1c07 100644 --- a/stack-nightly.yaml +++ b/stack-nightly.yaml @@ -1 +1 @@ -resolver: nightly +resolver: nightly-2025-09-23