From ef46660f3d37fbcc2885216a41bb7d6b10c008cf Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Tue, 19 Aug 2025 15:04:01 +1000 Subject: [PATCH 1/5] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'bellroy-nix-foss': 'github:bellroy/bellroy-nix-foss/fbbc4fed2d812e8417857ffc9451d7c6f1242d43?narHash=sha256-Fu4lFidcFBEoFaevUwf4Vkb3Jv%2BZbPuN82NZCFEym8g%3D' (2025-06-24) → 'github:bellroy/bellroy-nix-foss/72c4b556f2859a984a1eafed20bcb2027bf8d675?narHash=sha256-a650biN/2i36oG5TJVndTklSz50vNuoLFMh67fVvqWQ%3D' (2025-08-18) • Updated input 'bellroy-nix-foss/git-hooks': 'github:cachix/git-hooks.nix/fae816c55a75675f30d18c9cbdecc13b970d95d4?narHash=sha256-uLtw0iF9mQ94L831NOlQLPX9wm0qzd5yim3rcwACEoM%3D' (2025-06-23) → 'github:cachix/git-hooks.nix/4b04db83821b819bbbe32ed0a025b31e7971f22e?narHash=sha256-I0Ok1OGDwc1jPd8cs2VvAYZsHriUVFGIUqW%2B7uSsOUM%3D' (2025-08-17) • Updated input 'bellroy-nix-foss/git-hooks/flake-compat': 'github:edolstra/flake-compat/0f9255e01c2351cc7d116c072cb317785dd33b33?narHash=sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U%3D' (2023-10-04) → 'github:edolstra/flake-compat/9100a0f413b0c601e0533d1d94ffd501ce2e7885?narHash=sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX%2BfjA8Xf8PUmqCY%3D' (2025-05-12) • Updated input 'bellroy-nix-foss/nixpkgs': 'github:NixOS/nixpkgs/3078b9a9e75f1790e6d6ef9955fdc6a2d1740cc6?narHash=sha256-xT8cPLTxlktxI9vSdoBlAVK7dXgd8IK59j7ZwzkkhnI%3D' (2025-06-22) → 'github:NixOS/nixpkgs/32f313e49e42f715491e1ea7b306a87c16fe0388?narHash=sha256-nNaeJjo861wFR0tjHDyCnHs1rbRtrMgxAKMoig9Sj/w%3D' (2025-08-15) --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 82e8933..4e27d13 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1750731092, - "narHash": "sha256-Fu4lFidcFBEoFaevUwf4Vkb3Jv+ZbPuN82NZCFEym8g=", + "lastModified": 1755522139, + "narHash": "sha256-a650biN/2i36oG5TJVndTklSz50vNuoLFMh67fVvqWQ=", "owner": "bellroy", "repo": "bellroy-nix-foss", - "rev": "fbbc4fed2d812e8417857ffc9451d7c6f1242d43", + "rev": "72c4b556f2859a984a1eafed20bcb2027bf8d675", "type": "github" }, "original": { @@ -23,11 +23,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", "owner": "edolstra", "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", "type": "github" }, "original": { @@ -64,11 +64,11 @@ ] }, "locked": { - "lastModified": 1750684550, - "narHash": "sha256-uLtw0iF9mQ94L831NOlQLPX9wm0qzd5yim3rcwACEoM=", + "lastModified": 1755446520, + "narHash": "sha256-I0Ok1OGDwc1jPd8cs2VvAYZsHriUVFGIUqW+7uSsOUM=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "fae816c55a75675f30d18c9cbdecc13b970d95d4", + "rev": "4b04db83821b819bbbe32ed0a025b31e7971f22e", "type": "github" }, "original": { @@ -101,11 +101,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1750605355, - "narHash": "sha256-xT8cPLTxlktxI9vSdoBlAVK7dXgd8IK59j7ZwzkkhnI=", + "lastModified": 1755268003, + "narHash": "sha256-nNaeJjo861wFR0tjHDyCnHs1rbRtrMgxAKMoig9Sj/w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3078b9a9e75f1790e6d6ef9955fdc6a2d1740cc6", + "rev": "32f313e49e42f715491e1ea7b306a87c16fe0388", "type": "github" }, "original": { From 0fee0e60082c45e817f3548b3d60a07fb8422a76 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Tue, 19 Aug 2025 15:30:33 +1000 Subject: [PATCH 2/5] Add support for 9.12 --- flake.nix | 1 + github-actions.cabal | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 4fe8892..5aea316 100644 --- a/flake.nix +++ b/flake.nix @@ -11,6 +11,7 @@ "ghc96" "ghc98" "ghc910" + "ghc912" ]; defaultCompiler = "ghc910"; }; diff --git a/github-actions.cabal b/github-actions.cabal index 9576838..1b4f364 100644 --- a/github-actions.cabal +++ b/github-actions.cabal @@ -24,7 +24,7 @@ extra-source-files: test/golden/configuration-main.hs.txt test/golden/configuration-main.yml -tested-with: GHC ==9.6.6 || ==9.8.2 || ==9.10.1 +tested-with: GHC ==9.6.6 || ==9.8.2 || ==9.10.1 || ==9.12.1 common opts default-language: Haskell2010 From 6b28e09c26a49f58091c6c8cf4c81c6e7a9b4ac5 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Tue, 19 Aug 2025 15:49:31 +1000 Subject: [PATCH 3/5] Remove the bytestring dependency --- github-actions.cabal | 1 - test/Language/Github/Actions/WorkflowTest.hs | 11 +++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/github-actions.cabal b/github-actions.cabal index 1b4f364..4258462 100644 --- a/github-actions.cabal +++ b/github-actions.cabal @@ -82,7 +82,6 @@ test-suite spec other-modules: Language.Github.Actions.WorkflowTest build-tool-depends: tasty-discover:tasty-discover ^>=4.2.2 build-depends: - , bytestring ==0.11.5.3 || ==0.12.1.0 , filepath ^>=1.4 || ^>=1.5 , github-actions , pretty-show ^>=1.10 diff --git a/test/Language/Github/Actions/WorkflowTest.hs b/test/Language/Github/Actions/WorkflowTest.hs index e177c97..bdf1784 100644 --- a/test/Language/Github/Actions/WorkflowTest.hs +++ b/test/Language/Github/Actions/WorkflowTest.hs @@ -6,10 +6,9 @@ module Language.Github.Actions.WorkflowTest where import qualified Data.Aeson as Aeson import Data.Bifunctor (first) -import qualified Data.ByteString as BS import Data.List (isPrefixOf) import qualified Data.Text as Text -import Data.Text.Encoding (encodeUtf8) +import Data.Text.Encoding (decodeUtf8) import qualified Data.Yaml as Yaml import Hedgehog (Gen, Property, forAll, property, tripping) import Language.Github.Actions.Workflow (Workflow) @@ -50,13 +49,13 @@ test_goldenWorkflowFromYaml = do putStrLn $ "roundtrip " <> takeBaseName testYamlFilePath eitherWorkflow <- Yaml.decodeFileEither @Workflow testYamlFilePath either - (BS.writeFile outputFilePath >> (\e -> fail $ "YAML decoding failed: " ++ show e)) + (writeFile outputFilePath >> (\e -> fail $ "YAML decoding failed: " ++ show e)) (\workflow -> writeOutputFiles outputFilePath haskellOutputFilePath workflow >> pure workflow) - $ first (encodeUtf8 . Text.pack . Yaml.prettyPrintParseException) eitherWorkflow + $ first Yaml.prettyPrintParseException eitherWorkflow writeOutputFiles :: FilePath -> FilePath -> Workflow -> IO () writeOutputFiles outputFilePath haskellOutputFilePath workflow = do - BS.writeFile outputFilePath (Yaml.encode workflow) - >> BS.writeFile haskellOutputFilePath (encodeUtf8 . Text.pack $ ppShow workflow) + writeFile outputFilePath (Text.unpack . decodeUtf8 $ Yaml.encode workflow) + >> writeFile haskellOutputFilePath (ppShow workflow) hprop_WorkflowRoundTrip :: Property hprop_WorkflowRoundTrip = From 491838988c3cec20a664669e58ae683b2edf32fa Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Wed, 20 Aug 2025 15:24:47 +1000 Subject: [PATCH 4/5] Revert "Remove the bytestring dependency" This reverts commit 6b28e09c26a49f58091c6c8cf4c81c6e7a9b4ac5. --- github-actions.cabal | 1 + test/Language/Github/Actions/WorkflowTest.hs | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/github-actions.cabal b/github-actions.cabal index 4258462..1b4f364 100644 --- a/github-actions.cabal +++ b/github-actions.cabal @@ -82,6 +82,7 @@ test-suite spec other-modules: Language.Github.Actions.WorkflowTest build-tool-depends: tasty-discover:tasty-discover ^>=4.2.2 build-depends: + , bytestring ==0.11.5.3 || ==0.12.1.0 , filepath ^>=1.4 || ^>=1.5 , github-actions , pretty-show ^>=1.10 diff --git a/test/Language/Github/Actions/WorkflowTest.hs b/test/Language/Github/Actions/WorkflowTest.hs index bdf1784..e177c97 100644 --- a/test/Language/Github/Actions/WorkflowTest.hs +++ b/test/Language/Github/Actions/WorkflowTest.hs @@ -6,9 +6,10 @@ module Language.Github.Actions.WorkflowTest where import qualified Data.Aeson as Aeson import Data.Bifunctor (first) +import qualified Data.ByteString as BS import Data.List (isPrefixOf) import qualified Data.Text as Text -import Data.Text.Encoding (decodeUtf8) +import Data.Text.Encoding (encodeUtf8) import qualified Data.Yaml as Yaml import Hedgehog (Gen, Property, forAll, property, tripping) import Language.Github.Actions.Workflow (Workflow) @@ -49,13 +50,13 @@ test_goldenWorkflowFromYaml = do putStrLn $ "roundtrip " <> takeBaseName testYamlFilePath eitherWorkflow <- Yaml.decodeFileEither @Workflow testYamlFilePath either - (writeFile outputFilePath >> (\e -> fail $ "YAML decoding failed: " ++ show e)) + (BS.writeFile outputFilePath >> (\e -> fail $ "YAML decoding failed: " ++ show e)) (\workflow -> writeOutputFiles outputFilePath haskellOutputFilePath workflow >> pure workflow) - $ first Yaml.prettyPrintParseException eitherWorkflow + $ first (encodeUtf8 . Text.pack . Yaml.prettyPrintParseException) eitherWorkflow writeOutputFiles :: FilePath -> FilePath -> Workflow -> IO () writeOutputFiles outputFilePath haskellOutputFilePath workflow = do - writeFile outputFilePath (Text.unpack . decodeUtf8 $ Yaml.encode workflow) - >> writeFile haskellOutputFilePath (ppShow workflow) + BS.writeFile outputFilePath (Yaml.encode workflow) + >> BS.writeFile haskellOutputFilePath (encodeUtf8 . Text.pack $ ppShow workflow) hprop_WorkflowRoundTrip :: Property hprop_WorkflowRoundTrip = From 4c322d1c093bbaf7cd27e79d7733998514446c2a Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Wed, 20 Aug 2025 15:25:48 +1000 Subject: [PATCH 5/5] Use less-strict bounds on bytestring --- github-actions.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-actions.cabal b/github-actions.cabal index 1b4f364..ac03610 100644 --- a/github-actions.cabal +++ b/github-actions.cabal @@ -82,7 +82,7 @@ test-suite spec other-modules: Language.Github.Actions.WorkflowTest build-tool-depends: tasty-discover:tasty-discover ^>=4.2.2 build-depends: - , bytestring ==0.11.5.3 || ==0.12.1.0 + , bytestring ^>=0.11.4.0 || ^>=0.12.0.2 , filepath ^>=1.4 || ^>=1.5 , github-actions , pretty-show ^>=1.10