From 20412da3ec10eaef922862cc1d69794af260dfb0 Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Tue, 4 Jun 2024 07:35:02 -0400 Subject: [PATCH 1/6] Add makefile for generated test files - Refined deletions - Add delete-cabal-golden .PHONY - .PHONY delete-*, xargs --no-run-if-empty - Generate .cabal files using dhall-hpack-cabal - Add recipes for generate-yaml - Add recipes for generate-json - Add delete-(json|yaml)-golden .PHONY - Leave a note about dependencies in the makefile --- Makefile | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..42059e1 --- /dev/null +++ b/Makefile @@ -0,0 +1,139 @@ +# NOTE: Dependencies are intentionally not listed. + +.PHONY: delete-golden +delete-golden: \ + delete-cabal-golden \ + delete-json-golden \ + delete-yaml-golden + +.PHONY: delete-cabal-golden +delete-cabal-golden: + cd test-suite-golden \ + && find -type f \ + | grep --perl-regexp ".*\.cabal\.golden$$" \ + | xargs --no-run-if-empty --max-args=1 --verbose rm + +.PHONY: delete-json-golden +delete-json-golden: + cd test-suite-golden \ + && find -type f \ + | grep --perl-regexp ".*\.json\.golden$$" \ + | xargs --no-run-if-empty --max-args=1 --verbose rm + +.PHONY: delete-yaml-golden +delete-yaml-golden: + cd test-suite-golden \ + && find -type f \ + | grep --perl-regexp ".*\.yaml\.golden$$" \ + | xargs --no-run-if-empty --max-args=1 --verbose rm + +.PHONY: delete-generated +.PHONY: delete-generated-cabal +.PHONY: delete-generated-json +.PHONY: delete-generated-yaml +delete-generated: \ + delete-generated-cabal \ + delete-generated-json \ + delete-generated-yaml + +delete-generated-cabal: + cd test-suite-golden \ + && find -type f \ + | grep --perl-regexp ".*(? $@ + +$(KY)/when-dependencies.json: + dhall-hpack-json --package-dhall=$(@:.json=.dhall) > $@ + +$(KY)/with-GHC2021.json: + dhall-hpack-json --package-dhall=$(@:.json=.dhall) > $@ + +$(KY)/%/package.json: + cd $(@D) && dhall-hpack-json > $(@F) + +$(RW)/%.json: + dhall-hpack-json --package-dhall=$(@:.json=.dhall) > $@ + +.PHONY: generate-yaml +generate-yaml: \ + $(KY)/empty-inferred/package.yaml \ + $(KY)/empty-package.yaml \ + $(KY)/with-GHC2021.yaml \ + $(KY)/when-dependencies.yaml \ + $(KY)/import-relative/package.yaml \ + $(KY)/import-local/package.yaml \ + $(KY)/empty-inferred/package.yaml \ + $(RW)/stack/stack.yaml \ + $(RW)/hpack/hpack.yaml + +$(KY)/empty-package.yaml: + dhall-hpack-yaml --package-dhall=$(@:.yaml=.dhall) > $@ + +$(KY)/when-dependencies.yaml: + dhall-hpack-yaml --package-dhall=$(@:.yaml=.dhall) > $@ + +$(KY)/with-GHC2021.yaml: + dhall-hpack-yaml --package-dhall=$(@:.yaml=.dhall) > $@ + +$(KY)/%/package.yaml: + cd $(@D) && dhall-hpack-yaml > $(@F) + +$(RW)/%.yaml: + dhall-hpack-yaml --package-dhall=$(@:.yaml=.dhall) > $@ From 7d2cf185f05b17aab2ab79d7899327ebe41cf46f Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Thu, 30 May 2024 13:46:16 -0400 Subject: [PATCH 2/6] Use let binding for goldenFile in each test --- test-suite-golden/src/Golden.hs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/test-suite-golden/src/Golden.hs b/test-suite-golden/src/Golden.hs index 18f2d60..43f8051 100644 --- a/test-suite-golden/src/Golden.hs +++ b/test-suite-golden/src/Golden.hs @@ -55,47 +55,52 @@ goldenTestSet title dhallFiles = do [ testGroup ".dhall to .cabal" [ goldenVsFile (testName dhallFile) - (cabalFile -<.> goldExt Cabal) + goldenFile cabalFile (writeDhallCabal dhallFile) | dhallFile <- dhallFiles , let cabalFile = cabalFilePath dhallFile + , let goldenFile = cabalFile -<.> goldExt Cabal ] , testGroup ".dhall to dhall" [ goldenVsString (testName dhallFile) - (dhallFile -<.> goldExt Dhall) + goldenFile (fmap fromString . showDhall $ dhallFile) | dhallFile <- dhallFiles + , let goldenFile = dhallFile -<.> goldExt Dhall ] , testGroup ".dhall to json" [ goldenVsFile (testName dhallFile) - (dhallFile -<.> goldExt Json) + goldenFile jsonFile (writeJson dhallFile jsonFile) | dhallFile <- dhallFiles , let jsonFile = dhallFile -<.> ".json" + , let goldenFile = dhallFile -<.> goldExt Json ] , testGroup ".dhall to yaml" [ goldenVsFile (testName dhallFile) - (dhallFile -<.> goldExt Yaml) + goldenFile yamlFile (writeYaml dhallFile yamlFile) | dhallFile <- dhallFiles , let yamlFile = dhallFile -<.> ".yaml" + , let goldenFile = dhallFile -<.> goldExt Yaml ] , testGroup ".yaml to .cabal" [ goldenVsFile (testName dhallFile) - (cabalFile -<.> goldExt Cabal) + goldenFile cabalFile (writeYamlCabal yamlFile cabalFile yamlCabalFile) | dhallFile <- dhallFiles , let yamlFile = dhallFile -<.> ".yaml" , let cabalFile = cabalFilePath dhallFile , let yamlCabalFile = yamlFile <.> ".cabal" + , let goldenFile = cabalFile -<.> goldExt Cabal ] ] From 70e940d3172d179edbb82bb1027de1ca38ade5e1 Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Tue, 4 Jun 2024 10:27:53 -0400 Subject: [PATCH 3/6] Normalize file endings with EOL before EOF --- test-suite-golden/src/Golden.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test-suite-golden/src/Golden.hs b/test-suite-golden/src/Golden.hs index 43f8051..a4640c1 100644 --- a/test-suite-golden/src/Golden.hs +++ b/test-suite-golden/src/Golden.hs @@ -150,11 +150,13 @@ writeJson :: FilePath -> FilePath -> IO () writeJson dhallFile jsonFile = do s <- showJson Nothing dhallFile writeFile jsonFile s + appendFile jsonFile $ unlines [""] writeYaml :: FilePath -> FilePath -> IO () writeYaml dhallFile yamlFile = do s <- showYaml Nothing dhallFile writeFile yamlFile s + appendFile yamlFile $ unlines [""] cabalFilePath :: FilePath -> FilePath cabalFilePath p From c67a9c498321ba1fccb540d17d61c09133b556d4 Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Thu, 30 May 2024 11:15:51 -0400 Subject: [PATCH 4/6] Use hpack-0.36.0 in tests - Regenerate .cabal files - Regenerate .yaml files - Regenerate .cabal.golden files - Normalize file endings in golden tests --- .../test-files/key/empty-inferred/empty-inferred.cabal | 4 +--- .../test-files/key/empty-inferred/empty-inferred.cabal.golden | 4 +--- .../test-files/key/empty-inferred/package.json.golden | 2 +- test-suite-golden/test-files/key/empty-inferred/package.yaml | 1 + .../test-files/key/empty-inferred/package.yaml.cabal | 2 +- .../test-files/key/empty-inferred/package.yaml.golden | 1 + test-suite-golden/test-files/key/empty-package.cabal | 4 +--- test-suite-golden/test-files/key/empty-package.cabal.golden | 4 +--- test-suite-golden/test-files/key/empty-package.json.golden | 2 +- test-suite-golden/test-files/key/empty-package.yaml | 1 + test-suite-golden/test-files/key/empty-package.yaml.cabal | 2 +- test-suite-golden/test-files/key/empty-package.yaml.golden | 1 + .../test-files/key/import-local/import-local.cabal | 4 +--- .../test-files/key/import-local/import-local.cabal.golden | 4 +--- .../test-files/key/import-local/package.json.golden | 2 +- test-suite-golden/test-files/key/import-local/package.yaml | 1 + .../test-files/key/import-local/package.yaml.cabal | 2 +- .../test-files/key/import-local/package.yaml.golden | 1 + .../test-files/key/import-relative/import-relative.cabal | 4 +--- .../key/import-relative/import-relative.cabal.golden | 4 +--- .../test-files/key/import-relative/package.json.golden | 2 +- test-suite-golden/test-files/key/import-relative/package.yaml | 1 + .../test-files/key/import-relative/package.yaml.cabal | 2 +- .../test-files/key/import-relative/package.yaml.golden | 1 + test-suite-golden/test-files/key/when-dependencies.cabal | 4 +--- .../test-files/key/when-dependencies.cabal.golden | 4 +--- .../test-files/key/when-dependencies.json.golden | 2 +- test-suite-golden/test-files/key/when-dependencies.yaml | 1 + test-suite-golden/test-files/key/when-dependencies.yaml.cabal | 2 +- .../test-files/key/when-dependencies.yaml.golden | 1 + test-suite-golden/test-files/key/with-GHC2021.cabal | 2 +- test-suite-golden/test-files/key/with-GHC2021.cabal.golden | 2 +- test-suite-golden/test-files/key/with-GHC2021.json.golden | 2 +- test-suite-golden/test-files/key/with-GHC2021.yaml | 1 + test-suite-golden/test-files/key/with-GHC2021.yaml.cabal | 2 +- test-suite-golden/test-files/key/with-GHC2021.yaml.golden | 1 + test-suite-golden/test-files/real-world/hpack/hpack.cabal | 4 +--- .../test-files/real-world/hpack/hpack.cabal.golden | 4 +--- .../test-files/real-world/hpack/hpack.json.golden | 2 +- test-suite-golden/test-files/real-world/hpack/hpack.yaml | 1 + .../test-files/real-world/hpack/hpack.yaml.cabal | 2 +- .../test-files/real-world/hpack/hpack.yaml.golden | 1 + test-suite-golden/test-files/real-world/stack/stack.cabal | 4 +--- .../test-files/real-world/stack/stack.cabal.golden | 4 +--- .../test-files/real-world/stack/stack.json.golden | 2 +- test-suite-golden/test-files/real-world/stack/stack.yaml | 1 + .../test-files/real-world/stack/stack.yaml.cabal | 2 +- .../test-files/real-world/stack/stack.yaml.golden | 1 + 48 files changed, 48 insertions(+), 60 deletions(-) diff --git a/test-suite-golden/test-files/key/empty-inferred/empty-inferred.cabal b/test-suite-golden/test-files/key/empty-inferred/empty-inferred.cabal index c81814d..6ba08e7 100644 --- a/test-suite-golden/test-files/key/empty-inferred/empty-inferred.cabal +++ b/test-suite-golden/test-files/key/empty-inferred/empty-inferred.cabal @@ -1,10 +1,8 @@ cabal-version: 1.12 --- This file has been generated from package.dhall by hpack version 0.31.0. +-- This file has been generated from package.dhall by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack --- --- hash: 9f10239d716ef4564587e29b36c0e3b74056721733790211e20061a86a0feb53 name: empty-inferred version: 0.0.0 diff --git a/test-suite-golden/test-files/key/empty-inferred/empty-inferred.cabal.golden b/test-suite-golden/test-files/key/empty-inferred/empty-inferred.cabal.golden index c81814d..6ba08e7 100644 --- a/test-suite-golden/test-files/key/empty-inferred/empty-inferred.cabal.golden +++ b/test-suite-golden/test-files/key/empty-inferred/empty-inferred.cabal.golden @@ -1,10 +1,8 @@ cabal-version: 1.12 --- This file has been generated from package.dhall by hpack version 0.31.0. +-- This file has been generated from package.dhall by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack --- --- hash: 9f10239d716ef4564587e29b36c0e3b74056721733790211e20061a86a0feb53 name: empty-inferred version: 0.0.0 diff --git a/test-suite-golden/test-files/key/empty-inferred/package.json.golden b/test-suite-golden/test-files/key/empty-inferred/package.json.golden index 9e26dfe..0967ef4 100644 --- a/test-suite-golden/test-files/key/empty-inferred/package.json.golden +++ b/test-suite-golden/test-files/key/empty-inferred/package.json.golden @@ -1 +1 @@ -{} \ No newline at end of file +{} diff --git a/test-suite-golden/test-files/key/empty-inferred/package.yaml b/test-suite-golden/test-files/key/empty-inferred/package.yaml index 0967ef4..311847d 100644 --- a/test-suite-golden/test-files/key/empty-inferred/package.yaml +++ b/test-suite-golden/test-files/key/empty-inferred/package.yaml @@ -1 +1,2 @@ {} + diff --git a/test-suite-golden/test-files/key/empty-inferred/package.yaml.cabal b/test-suite-golden/test-files/key/empty-inferred/package.yaml.cabal index a207e69..37250c5 100644 --- a/test-suite-golden/test-files/key/empty-inferred/package.yaml.cabal +++ b/test-suite-golden/test-files/key/empty-inferred/package.yaml.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack diff --git a/test-suite-golden/test-files/key/empty-inferred/package.yaml.golden b/test-suite-golden/test-files/key/empty-inferred/package.yaml.golden index 0967ef4..311847d 100644 --- a/test-suite-golden/test-files/key/empty-inferred/package.yaml.golden +++ b/test-suite-golden/test-files/key/empty-inferred/package.yaml.golden @@ -1 +1,2 @@ {} + diff --git a/test-suite-golden/test-files/key/empty-package.cabal b/test-suite-golden/test-files/key/empty-package.cabal index bb081c4..3ac6f97 100644 --- a/test-suite-golden/test-files/key/empty-package.cabal +++ b/test-suite-golden/test-files/key/empty-package.cabal @@ -1,10 +1,8 @@ cabal-version: 1.12 --- This file has been generated from empty-package.dhall by hpack version 0.31.0. +-- This file has been generated from empty-package.dhall by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack --- --- hash: e0a74f511d829cae53cd712664781db312951dd773249603163ba1b1e32afd04 name: empty-package version: 0.0.0 diff --git a/test-suite-golden/test-files/key/empty-package.cabal.golden b/test-suite-golden/test-files/key/empty-package.cabal.golden index bb081c4..3ac6f97 100644 --- a/test-suite-golden/test-files/key/empty-package.cabal.golden +++ b/test-suite-golden/test-files/key/empty-package.cabal.golden @@ -1,10 +1,8 @@ cabal-version: 1.12 --- This file has been generated from empty-package.dhall by hpack version 0.31.0. +-- This file has been generated from empty-package.dhall by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack --- --- hash: e0a74f511d829cae53cd712664781db312951dd773249603163ba1b1e32afd04 name: empty-package version: 0.0.0 diff --git a/test-suite-golden/test-files/key/empty-package.json.golden b/test-suite-golden/test-files/key/empty-package.json.golden index 7f12fc2..5b4e1dd 100644 --- a/test-suite-golden/test-files/key/empty-package.json.golden +++ b/test-suite-golden/test-files/key/empty-package.json.golden @@ -1,3 +1,3 @@ { "name": "empty-package" -} \ No newline at end of file +} diff --git a/test-suite-golden/test-files/key/empty-package.yaml b/test-suite-golden/test-files/key/empty-package.yaml index f7b96a7..1a977ba 100644 --- a/test-suite-golden/test-files/key/empty-package.yaml +++ b/test-suite-golden/test-files/key/empty-package.yaml @@ -1 +1,2 @@ name: empty-package + diff --git a/test-suite-golden/test-files/key/empty-package.yaml.cabal b/test-suite-golden/test-files/key/empty-package.yaml.cabal index 6385a26..4ce39e3 100644 --- a/test-suite-golden/test-files/key/empty-package.yaml.cabal +++ b/test-suite-golden/test-files/key/empty-package.yaml.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from empty-package.yaml by hpack version 0.35.0. +-- This file has been generated from empty-package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack diff --git a/test-suite-golden/test-files/key/empty-package.yaml.golden b/test-suite-golden/test-files/key/empty-package.yaml.golden index f7b96a7..1a977ba 100644 --- a/test-suite-golden/test-files/key/empty-package.yaml.golden +++ b/test-suite-golden/test-files/key/empty-package.yaml.golden @@ -1 +1,2 @@ name: empty-package + diff --git a/test-suite-golden/test-files/key/import-local/import-local.cabal b/test-suite-golden/test-files/key/import-local/import-local.cabal index 9d02537..8a6d582 100644 --- a/test-suite-golden/test-files/key/import-local/import-local.cabal +++ b/test-suite-golden/test-files/key/import-local/import-local.cabal @@ -1,10 +1,8 @@ cabal-version: 1.12 --- This file has been generated from package.dhall by hpack version 0.31.0. +-- This file has been generated from package.dhall by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack --- --- hash: fb3f09267f149cb49eb030ac951c27be9964aa0d51e91460e5b2d59ee1a5082f name: import-local version: 0.0.0 diff --git a/test-suite-golden/test-files/key/import-local/import-local.cabal.golden b/test-suite-golden/test-files/key/import-local/import-local.cabal.golden index 9d02537..8a6d582 100644 --- a/test-suite-golden/test-files/key/import-local/import-local.cabal.golden +++ b/test-suite-golden/test-files/key/import-local/import-local.cabal.golden @@ -1,10 +1,8 @@ cabal-version: 1.12 --- This file has been generated from package.dhall by hpack version 0.31.0. +-- This file has been generated from package.dhall by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack --- --- hash: fb3f09267f149cb49eb030ac951c27be9964aa0d51e91460e5b2d59ee1a5082f name: import-local version: 0.0.0 diff --git a/test-suite-golden/test-files/key/import-local/package.json.golden b/test-suite-golden/test-files/key/import-local/package.json.golden index 06c823e..ae93b98 100644 --- a/test-suite-golden/test-files/key/import-local/package.json.golden +++ b/test-suite-golden/test-files/key/import-local/package.json.golden @@ -1,3 +1,3 @@ { "name": "import-local" -} \ No newline at end of file +} diff --git a/test-suite-golden/test-files/key/import-local/package.yaml b/test-suite-golden/test-files/key/import-local/package.yaml index fda7745..fc87965 100644 --- a/test-suite-golden/test-files/key/import-local/package.yaml +++ b/test-suite-golden/test-files/key/import-local/package.yaml @@ -1 +1,2 @@ name: import-local + diff --git a/test-suite-golden/test-files/key/import-local/package.yaml.cabal b/test-suite-golden/test-files/key/import-local/package.yaml.cabal index ed2dc17..3b699ca 100644 --- a/test-suite-golden/test-files/key/import-local/package.yaml.cabal +++ b/test-suite-golden/test-files/key/import-local/package.yaml.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack diff --git a/test-suite-golden/test-files/key/import-local/package.yaml.golden b/test-suite-golden/test-files/key/import-local/package.yaml.golden index fda7745..fc87965 100644 --- a/test-suite-golden/test-files/key/import-local/package.yaml.golden +++ b/test-suite-golden/test-files/key/import-local/package.yaml.golden @@ -1 +1,2 @@ name: import-local + diff --git a/test-suite-golden/test-files/key/import-relative/import-relative.cabal b/test-suite-golden/test-files/key/import-relative/import-relative.cabal index 32492d4..17e45db 100644 --- a/test-suite-golden/test-files/key/import-relative/import-relative.cabal +++ b/test-suite-golden/test-files/key/import-relative/import-relative.cabal @@ -1,10 +1,8 @@ cabal-version: 1.12 --- This file has been generated from package.dhall by hpack version 0.31.0. +-- This file has been generated from package.dhall by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack --- --- hash: 989056d21c3910e06ec15967716df134a39f43c561858afff828d22802a22005 name: import-relative version: 0.0.0 diff --git a/test-suite-golden/test-files/key/import-relative/import-relative.cabal.golden b/test-suite-golden/test-files/key/import-relative/import-relative.cabal.golden index 32492d4..17e45db 100644 --- a/test-suite-golden/test-files/key/import-relative/import-relative.cabal.golden +++ b/test-suite-golden/test-files/key/import-relative/import-relative.cabal.golden @@ -1,10 +1,8 @@ cabal-version: 1.12 --- This file has been generated from package.dhall by hpack version 0.31.0. +-- This file has been generated from package.dhall by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack --- --- hash: 989056d21c3910e06ec15967716df134a39f43c561858afff828d22802a22005 name: import-relative version: 0.0.0 diff --git a/test-suite-golden/test-files/key/import-relative/package.json.golden b/test-suite-golden/test-files/key/import-relative/package.json.golden index d079ee1..94f8eae 100644 --- a/test-suite-golden/test-files/key/import-relative/package.json.golden +++ b/test-suite-golden/test-files/key/import-relative/package.json.golden @@ -1,3 +1,3 @@ { "name": "import-relative" -} \ No newline at end of file +} diff --git a/test-suite-golden/test-files/key/import-relative/package.yaml b/test-suite-golden/test-files/key/import-relative/package.yaml index 2928b15..83c4f69 100644 --- a/test-suite-golden/test-files/key/import-relative/package.yaml +++ b/test-suite-golden/test-files/key/import-relative/package.yaml @@ -1 +1,2 @@ name: import-relative + diff --git a/test-suite-golden/test-files/key/import-relative/package.yaml.cabal b/test-suite-golden/test-files/key/import-relative/package.yaml.cabal index 25f7f5f..e607e17 100644 --- a/test-suite-golden/test-files/key/import-relative/package.yaml.cabal +++ b/test-suite-golden/test-files/key/import-relative/package.yaml.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack diff --git a/test-suite-golden/test-files/key/import-relative/package.yaml.golden b/test-suite-golden/test-files/key/import-relative/package.yaml.golden index 2928b15..83c4f69 100644 --- a/test-suite-golden/test-files/key/import-relative/package.yaml.golden +++ b/test-suite-golden/test-files/key/import-relative/package.yaml.golden @@ -1 +1,2 @@ name: import-relative + diff --git a/test-suite-golden/test-files/key/when-dependencies.cabal b/test-suite-golden/test-files/key/when-dependencies.cabal index 515f84b..e670b62 100644 --- a/test-suite-golden/test-files/key/when-dependencies.cabal +++ b/test-suite-golden/test-files/key/when-dependencies.cabal @@ -1,10 +1,8 @@ cabal-version: 1.12 --- This file has been generated from when-dependencies.dhall by hpack version 0.31.1. +-- This file has been generated from when-dependencies.dhall by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack --- --- hash: a1d315a919b697e7986a0c149715373427427e43104f82f05f394a439793907f name: when-dependencies version: 0.0.0 diff --git a/test-suite-golden/test-files/key/when-dependencies.cabal.golden b/test-suite-golden/test-files/key/when-dependencies.cabal.golden index 515f84b..e670b62 100644 --- a/test-suite-golden/test-files/key/when-dependencies.cabal.golden +++ b/test-suite-golden/test-files/key/when-dependencies.cabal.golden @@ -1,10 +1,8 @@ cabal-version: 1.12 --- This file has been generated from when-dependencies.dhall by hpack version 0.31.1. +-- This file has been generated from when-dependencies.dhall by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack --- --- hash: a1d315a919b697e7986a0c149715373427427e43104f82f05f394a439793907f name: when-dependencies version: 0.0.0 diff --git a/test-suite-golden/test-files/key/when-dependencies.json.golden b/test-suite-golden/test-files/key/when-dependencies.json.golden index 24ebd7f..ed6e6ef 100644 --- a/test-suite-golden/test-files/key/when-dependencies.json.golden +++ b/test-suite-golden/test-files/key/when-dependencies.json.golden @@ -15,4 +15,4 @@ ] } } -} \ No newline at end of file +} diff --git a/test-suite-golden/test-files/key/when-dependencies.yaml b/test-suite-golden/test-files/key/when-dependencies.yaml index dcd2eef..c6aa23d 100644 --- a/test-suite-golden/test-files/key/when-dependencies.yaml +++ b/test-suite-golden/test-files/key/when-dependencies.yaml @@ -9,3 +9,4 @@ when: dependencies: - base == 4.* - yaml-pretty-extras + diff --git a/test-suite-golden/test-files/key/when-dependencies.yaml.cabal b/test-suite-golden/test-files/key/when-dependencies.yaml.cabal index a54934c..f5b4075 100644 --- a/test-suite-golden/test-files/key/when-dependencies.yaml.cabal +++ b/test-suite-golden/test-files/key/when-dependencies.yaml.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from when-dependencies.yaml by hpack version 0.35.0. +-- This file has been generated from when-dependencies.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack diff --git a/test-suite-golden/test-files/key/when-dependencies.yaml.golden b/test-suite-golden/test-files/key/when-dependencies.yaml.golden index dcd2eef..c6aa23d 100644 --- a/test-suite-golden/test-files/key/when-dependencies.yaml.golden +++ b/test-suite-golden/test-files/key/when-dependencies.yaml.golden @@ -9,3 +9,4 @@ when: dependencies: - base == 4.* - yaml-pretty-extras + diff --git a/test-suite-golden/test-files/key/with-GHC2021.cabal b/test-suite-golden/test-files/key/with-GHC2021.cabal index 5687970..cff6b99 100644 --- a/test-suite-golden/test-files/key/with-GHC2021.cabal +++ b/test-suite-golden/test-files/key/with-GHC2021.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from with-GHC2021.dhall by hpack version 0.34.6. +-- This file has been generated from with-GHC2021.dhall by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack diff --git a/test-suite-golden/test-files/key/with-GHC2021.cabal.golden b/test-suite-golden/test-files/key/with-GHC2021.cabal.golden index 5687970..cff6b99 100644 --- a/test-suite-golden/test-files/key/with-GHC2021.cabal.golden +++ b/test-suite-golden/test-files/key/with-GHC2021.cabal.golden @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from with-GHC2021.dhall by hpack version 0.34.6. +-- This file has been generated from with-GHC2021.dhall by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack diff --git a/test-suite-golden/test-files/key/with-GHC2021.json.golden b/test-suite-golden/test-files/key/with-GHC2021.json.golden index c61b4e4..ac5d02c 100644 --- a/test-suite-golden/test-files/key/with-GHC2021.json.golden +++ b/test-suite-golden/test-files/key/with-GHC2021.json.golden @@ -52,4 +52,4 @@ "main": "Main.hs", "source-dirs": "src" } -} \ No newline at end of file +} diff --git a/test-suite-golden/test-files/key/with-GHC2021.yaml b/test-suite-golden/test-files/key/with-GHC2021.yaml index fb33d57..94c4f75 100644 --- a/test-suite-golden/test-files/key/with-GHC2021.yaml +++ b/test-suite-golden/test-files/key/with-GHC2021.yaml @@ -49,3 +49,4 @@ default-extensions: executable: main: Main.hs source-dirs: src + diff --git a/test-suite-golden/test-files/key/with-GHC2021.yaml.cabal b/test-suite-golden/test-files/key/with-GHC2021.yaml.cabal index c1ad5ba..750958c 100644 --- a/test-suite-golden/test-files/key/with-GHC2021.yaml.cabal +++ b/test-suite-golden/test-files/key/with-GHC2021.yaml.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from with-GHC2021.yaml by hpack version 0.35.0. +-- This file has been generated from with-GHC2021.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack diff --git a/test-suite-golden/test-files/key/with-GHC2021.yaml.golden b/test-suite-golden/test-files/key/with-GHC2021.yaml.golden index fb33d57..94c4f75 100644 --- a/test-suite-golden/test-files/key/with-GHC2021.yaml.golden +++ b/test-suite-golden/test-files/key/with-GHC2021.yaml.golden @@ -49,3 +49,4 @@ default-extensions: executable: main: Main.hs source-dirs: src + diff --git a/test-suite-golden/test-files/real-world/hpack/hpack.cabal b/test-suite-golden/test-files/real-world/hpack/hpack.cabal index 73b1eb2..f217f51 100644 --- a/test-suite-golden/test-files/real-world/hpack/hpack.cabal +++ b/test-suite-golden/test-files/real-world/hpack/hpack.cabal @@ -1,10 +1,8 @@ cabal-version: 1.12 --- This file has been generated from hpack.dhall by hpack version 0.31.0. +-- This file has been generated from hpack.dhall by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack --- --- hash: 6233d5bc3d8cc3400d64ab30856182d4a593d9245bfdd5096e1287213cc3ae31 name: hpack version: 0.31.1 diff --git a/test-suite-golden/test-files/real-world/hpack/hpack.cabal.golden b/test-suite-golden/test-files/real-world/hpack/hpack.cabal.golden index 73b1eb2..f217f51 100644 --- a/test-suite-golden/test-files/real-world/hpack/hpack.cabal.golden +++ b/test-suite-golden/test-files/real-world/hpack/hpack.cabal.golden @@ -1,10 +1,8 @@ cabal-version: 1.12 --- This file has been generated from hpack.dhall by hpack version 0.31.0. +-- This file has been generated from hpack.dhall by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack --- --- hash: 6233d5bc3d8cc3400d64ab30856182d4a593d9245bfdd5096e1287213cc3ae31 name: hpack version: 0.31.1 diff --git a/test-suite-golden/test-files/real-world/hpack/hpack.json.golden b/test-suite-golden/test-files/real-world/hpack/hpack.json.golden index 45f4994..f85132d 100644 --- a/test-suite-golden/test-files/real-world/hpack/hpack.json.golden +++ b/test-suite-golden/test-files/real-world/hpack/hpack.json.golden @@ -70,4 +70,4 @@ "build-tools": "hspec-discover" } } -} \ No newline at end of file +} diff --git a/test-suite-golden/test-files/real-world/hpack/hpack.yaml b/test-suite-golden/test-files/real-world/hpack/hpack.yaml index c33f70d..a052224 100644 --- a/test-suite-golden/test-files/real-world/hpack/hpack.yaml +++ b/test-suite-golden/test-files/real-world/hpack/hpack.yaml @@ -59,3 +59,4 @@ tests: - template-haskell - HUnit >= 1.6.0.0 build-tools: hspec-discover + diff --git a/test-suite-golden/test-files/real-world/hpack/hpack.yaml.cabal b/test-suite-golden/test-files/real-world/hpack/hpack.yaml.cabal index a4f2c39..4daeaa1 100644 --- a/test-suite-golden/test-files/real-world/hpack/hpack.yaml.cabal +++ b/test-suite-golden/test-files/real-world/hpack/hpack.yaml.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from hpack.yaml by hpack version 0.35.0. +-- This file has been generated from hpack.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack diff --git a/test-suite-golden/test-files/real-world/hpack/hpack.yaml.golden b/test-suite-golden/test-files/real-world/hpack/hpack.yaml.golden index c33f70d..a052224 100644 --- a/test-suite-golden/test-files/real-world/hpack/hpack.yaml.golden +++ b/test-suite-golden/test-files/real-world/hpack/hpack.yaml.golden @@ -59,3 +59,4 @@ tests: - template-haskell - HUnit >= 1.6.0.0 build-tools: hspec-discover + diff --git a/test-suite-golden/test-files/real-world/stack/stack.cabal b/test-suite-golden/test-files/real-world/stack/stack.cabal index c7ee96e..4522099 100644 --- a/test-suite-golden/test-files/real-world/stack/stack.cabal +++ b/test-suite-golden/test-files/real-world/stack/stack.cabal @@ -1,10 +1,8 @@ cabal-version: 2.0 --- This file has been generated from stack.dhall by hpack version 0.35.0. +-- This file has been generated from stack.dhall by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack --- --- hash: 645c43bbed2e4ee44172441652f686f9df4f80fe34991062b018c2410e276567 name: stack version: 1.10.0 diff --git a/test-suite-golden/test-files/real-world/stack/stack.cabal.golden b/test-suite-golden/test-files/real-world/stack/stack.cabal.golden index c7ee96e..4522099 100644 --- a/test-suite-golden/test-files/real-world/stack/stack.cabal.golden +++ b/test-suite-golden/test-files/real-world/stack/stack.cabal.golden @@ -1,10 +1,8 @@ cabal-version: 2.0 --- This file has been generated from stack.dhall by hpack version 0.35.0. +-- This file has been generated from stack.dhall by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack --- --- hash: 645c43bbed2e4ee44172441652f686f9df4f80fe34991062b018c2410e276567 name: stack version: 1.10.0 diff --git a/test-suite-golden/test-files/real-world/stack/stack.json.golden b/test-suite-golden/test-files/real-world/stack/stack.json.golden index dfbdc44..40c3a96 100644 --- a/test-suite-golden/test-files/real-world/stack/stack.json.golden +++ b/test-suite-golden/test-files/real-world/stack/stack.json.golden @@ -407,4 +407,4 @@ ] } } -} \ No newline at end of file +} diff --git a/test-suite-golden/test-files/real-world/stack/stack.yaml b/test-suite-golden/test-files/real-world/stack/stack.yaml index ff98918..67ee8a3 100644 --- a/test-suite-golden/test-files/real-world/stack/stack.yaml +++ b/test-suite-golden/test-files/real-world/stack/stack.yaml @@ -356,3 +356,4 @@ tests: - hspec - stack - smallcheck + diff --git a/test-suite-golden/test-files/real-world/stack/stack.yaml.cabal b/test-suite-golden/test-files/real-world/stack/stack.yaml.cabal index a39d238..8985fb2 100644 --- a/test-suite-golden/test-files/real-world/stack/stack.yaml.cabal +++ b/test-suite-golden/test-files/real-world/stack/stack.yaml.cabal @@ -1,6 +1,6 @@ cabal-version: 2.0 --- This file has been generated from stack.yaml by hpack version 0.35.0. +-- This file has been generated from stack.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack diff --git a/test-suite-golden/test-files/real-world/stack/stack.yaml.golden b/test-suite-golden/test-files/real-world/stack/stack.yaml.golden index ff98918..67ee8a3 100644 --- a/test-suite-golden/test-files/real-world/stack/stack.yaml.golden +++ b/test-suite-golden/test-files/real-world/stack/stack.yaml.golden @@ -356,3 +356,4 @@ tests: - hspec - stack - smallcheck + From f654d60d59fe1026e3313d7afea442dac462e35e Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Tue, 4 Jun 2024 10:11:39 -0400 Subject: [PATCH 5/6] Bump version to 0.5.8 and bump copyright year --- package.dhall | 4 ++-- project-stackage/lts-20.26.config | 2 +- project-stackage/lts-21.25.config | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.dhall b/package.dhall index 2c8499f..51422a7 100644 --- a/package.dhall +++ b/package.dhall @@ -18,10 +18,10 @@ let deps = in let exe-deps = [ "optparse-applicative" ] in { name = "hpack-dhall" - , version = "0.5.7" + , version = "0.5.8" , maintainer = "Phil de Joux " , copyright = - "© 2018 - 2022 Phil de Joux, © 2018 - 2022 Block Scope Limited" + "© 2018 - 2024 Phil de Joux, © 2018 - 2024 Block Scope Limited" , license = "BSD3" , license-file = "LICENSE" , category = "Development" diff --git a/project-stackage/lts-20.26.config b/project-stackage/lts-20.26.config index a6020eb..b3cf143 100644 --- a/project-stackage/lts-20.26.config +++ b/project-stackage/lts-20.26.config @@ -1154,7 +1154,7 @@ constraints: abstract-deque ==0.3, hourglass-orphans ==0.1.0.0, hp2pretty ==0.10, -- hpack ==0.35.2, - hpack-dhall ==0.5.7, + -- hpack-dhall ==0.5.7, hpc installed, hpc-codecov ==0.3.0.0, hpc-lcov ==1.1.1, diff --git a/project-stackage/lts-21.25.config b/project-stackage/lts-21.25.config index 1d4c149..e71cc43 100644 --- a/project-stackage/lts-21.25.config +++ b/project-stackage/lts-21.25.config @@ -1134,7 +1134,7 @@ constraints: abstract-deque ==0.3, hourglass-orphans ==0.1.0.0, hp2pretty ==0.10, -- hpack ==0.35.2, - hpack-dhall ==0.5.7, + -- hpack-dhall ==0.5.7, hpc installed, hpc-codecov ==0.3.0.0, hpc-lcov ==1.1.1, From 566545a9f37b6b1aed884580a8845cf5845ff35c Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Tue, 4 Jun 2024 10:12:12 -0400 Subject: [PATCH 6/6] Regenerate package --- hpack-dhall.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hpack-dhall.cabal b/hpack-dhall.cabal index fd07efd..66a7bd3 100644 --- a/hpack-dhall.cabal +++ b/hpack-dhall.cabal @@ -5,7 +5,7 @@ cabal-version: 1.12 -- see: https://github.com/sol/hpack name: hpack-dhall -version: 0.5.7 +version: 0.5.8 synopsis: hpack's dhalling description: Use hpack phrasing in dhall to write cabal files. . @@ -22,7 +22,7 @@ category: Development homepage: https://github.com/cabalism/hpack-dhall#readme bug-reports: https://github.com/cabalism/hpack-dhall/issues maintainer: Phil de Joux -copyright: © 2018 - 2022 Phil de Joux, © 2018 - 2022 Block Scope Limited +copyright: © 2018 - 2024 Phil de Joux, © 2018 - 2024 Block Scope Limited license: BSD3 license-file: LICENSE build-type: Simple