From 9dc5f2c69d6c5a51d18a208d2eeff49f5d34f169 Mon Sep 17 00:00:00 2001 From: Veronika Romashkina Date: Sun, 20 Oct 2024 17:04:43 +0100 Subject: [PATCH 1/8] Support new GHCs on CI --- summoner-cli/summoner.cabal | 36 ++++++++++++++++++++++++--------- summoner-tui/summoner-tui.cabal | 26 +++++++++++++++++++----- 2 files changed, 47 insertions(+), 15 deletions(-) diff --git a/summoner-cli/summoner.cabal b/summoner-cli/summoner.cabal index a015811..6419e7e 100644 --- a/summoner-cli/summoner.cabal +++ b/summoner-cli/summoner.cabal @@ -1,6 +1,6 @@ cabal-version: 3.0 name: summoner -version: 2.0.1.1 +version: 2.0.2.0 synopsis: Tool for scaffolding fully configured batteries-included production-level Haskell projects. description: Tool for scaffolding fully configured batteries-included production-level Haskell projects. See [README.md](https://github.com/kowainik/summoner#-summoner) for details. @@ -10,7 +10,7 @@ license: MPL-2.0 license-file: LICENSE author: Veronika Romashkina, Dmitrii Kovanikov maintainer: Kowainik -copyright: 2018-2022 Kowainik +copyright: 2018-2024 Kowainik category: CLI, CLI Tool, Development build-type: Simple stability: stable @@ -21,7 +21,11 @@ tested-with: GHC == 8.4.4 GHC == 8.8.4 GHC == 8.10.7 GHC == 9.0.2 - GHC == 9.2.4 + GHC == 9.2.8 + GHC == 9.4.7 + GHC == 9.6.6 + GHC == 9.8.2 + GHC == 9.10.1 extra-source-files: examples/summoner-default.toml @@ -74,7 +78,7 @@ source-repository head location: git@github.com:kowainik/summoner.git common common-options - build-depends: base >= 4.11 && < 4.19 + build-depends: base >= 4.11 && < 4.21 , relude >= 1.0.0.0 && < 1.3 mixins: base hiding (Prelude) @@ -98,6 +102,18 @@ common common-options -hiedir=../.hie if impl(ghc >= 8.10) ghc-options: -Wunused-packages + if impl(ghc >= 9.0) + ghc-options: -Winvalid-haddock + if impl(ghc >= 9.2) + ghc-options: -Wredundant-bang-patterns + -Woperator-whitespace + if impl(ghc >= 9.4 && < 9.10) + ghc-options: -Wforall-identifier + if impl(ghc >= 9.4) + ghc-options: -Wredundant-strictness-flags + if impl(ghc >= 9.8) + ghc-options: -Wterm-variable-capture + -Winconsistent-flags default-extensions: DeriveGeneric DerivingStrategies @@ -148,14 +164,14 @@ library build-depends: colourista ^>= 0.1.0.1 , directory ^>= 1.3.0.2 - , filepath ^>= 1.4.1.2 - , generic-data >= 0.8.0.0 && < 1.1 + , filepath >= 1.4.1.2 && < 1.6 + , generic-data >= 0.8.0.0 && < 1.2 , gitrev ^>= 1.3.1 , microaeson ^>= 0.1.0.0 , optparse-applicative >= 0.16 && < 0.19 , process ^>= 1.6.1.0 - , shellmet ^>= 0.0.3.0 - , time >= 1.8 && < 1.14 + , shellmet >= 0.0.3.0 && < 0.0.6 + , time >= 1.8 && < 1.15 , tomland ^>= 1.3.0.0 , validation-selective >= 0.1.0.0 && < 0.3 @@ -189,9 +205,9 @@ test-suite summoner-test build-depends: directory , filepath - , hedgehog >= 0.5.3 && < 1.3 + , hedgehog >= 0.5.3 && < 1.6 , hspec >= 2.4.8 - , hspec-hedgehog ^>= 0.0.1.1 + , hspec-hedgehog >= 0.0.1.1 && < 0.4 , tomland , tree-diff >= 0.0.2 && < 0.4 , summoner diff --git a/summoner-tui/summoner-tui.cabal b/summoner-tui/summoner-tui.cabal index b236b63..bb022f2 100644 --- a/summoner-tui/summoner-tui.cabal +++ b/summoner-tui/summoner-tui.cabal @@ -1,6 +1,6 @@ cabal-version: 3.0 name: summoner-tui -version: 2.0.1.1 +version: 2.0.2.0 synopsis: Tool for scaffolding fully configured batteries-included production-level Haskell projects using TUI. description: Tool for scaffolding fully configured batteries-included production-level Haskell projects using TUI. See [README.md](https://github.com/kowainik/summoner#-summoner) for details. @@ -10,7 +10,7 @@ license: MPL-2.0 license-file: LICENSE author: Veronika Romashkina, Dmitrii Kovanikov maintainer: Kowainik -copyright: 2018-2022 Kowainik +copyright: 2018-2024 Kowainik category: TUI, TUI Tool, Development build-type: Simple stability: experimental @@ -21,14 +21,18 @@ tested-with: GHC == 8.4.4 GHC == 8.8.4 GHC == 8.10.7 GHC == 9.0.2 - GHC == 9.2.4 + GHC == 9.2.8 + GHC == 9.4.7 + GHC == 9.6.6 + GHC == 9.8.2 + GHC == 9.10.1 source-repository head type: git location: git@github.com:kowainik/summoner.git common common-options - build-depends: base >= 4.11 && < 4.19 + build-depends: base >= 4.11 && < 4.21 , relude >= 1.0.0.0 && < 1.3 mixins: base hiding (Prelude) @@ -52,6 +56,18 @@ common common-options -hiedir=../.hie if impl(ghc >= 8.10) ghc-options: -Wunused-packages + if impl(ghc >= 9.0) + ghc-options: -Winvalid-haddock + if impl(ghc >= 9.2) + ghc-options: -Wredundant-bang-patterns + -Woperator-whitespace + if impl(ghc >= 9.4 && < 9.10) + ghc-options: -Wforall-identifier + if impl(ghc >= 9.4) + ghc-options: -Wredundant-strictness-flags + if impl(ghc >= 9.8) + ghc-options: -Wterm-variable-capture + -Winconsistent-flags default-extensions: DeriveGeneric DerivingStrategies @@ -88,7 +104,7 @@ library , microlens-th ^>= 0.4 , summoner ^>= 2.0.0.0 , validation-selective >= 0.0.0.0 && < 0.3 - , vty >= 5.36 && < 6.0 + , vty >= 5.36 && < 6.3 executable summon-tui import: common-options From b56c795aff34d62c7e393222e01df5e7c6a50ce1 Mon Sep 17 00:00:00 2001 From: Veronika Romashkina Date: Sun, 20 Oct 2024 18:05:12 +0100 Subject: [PATCH 2/8] Upgrade GHC version with which Summoner creates projects --- .../examples/cabal-full/.github/workflows/ci.yml | 5 +++++ summoner-cli/examples/cabal-full/.travis.yml | 1 + summoner-cli/examples/cabal-full/appveyor.yml | 4 ++-- .../examples/cabal-full/cabal-full.cabal | 15 ++++++++++++++- .../examples/cabal-minimal/cabal-minimal.cabal | 16 ++++++++++++++-- summoner-cli/examples/cabalScript.hs | 2 +- .../full-batteries/.github/workflows/ci.yml | 6 ++++++ summoner-cli/examples/full-batteries/.travis.yml | 4 ++++ .../examples/full-batteries/appveyor.yml | 4 ++-- .../examples/full-batteries/full-batteries.cabal | 3 ++- .../examples/full-batteries/stack-9.6.6.yaml | 1 + summoner-cli/examples/full-batteries/stack.yaml | 2 +- .../examples/stack-full/.github/workflows/ci.yml | 1 + summoner-cli/examples/stack-full/.travis.yml | 3 +++ .../examples/stack-full/stack-9.6.6.yaml | 1 + .../examples/stack-full/stack-full.cabal | 15 ++++++++++++++- summoner-cli/examples/stack-full/stack.yaml | 2 +- summoner-cli/examples/stackScript.hs | 2 +- summoner-cli/examples/summoner-default.toml | 4 ++-- summoner-cli/src/Summoner/GhcVer.hs | 16 ++++++++++------ summoner-cli/src/Summoner/Template/Cabal.hs | 12 ++++++++++++ summoner-cli/test/Test/Show.hs | 5 +++-- summoner-tui/src/Summoner/Tui.hs | 4 +++- summoner-tui/src/Summoner/Tui/Field.hs | 10 ++++++++++ summoner-tui/summoner-tui.cabal | 3 ++- 25 files changed, 116 insertions(+), 25 deletions(-) create mode 100644 summoner-cli/examples/full-batteries/stack-9.6.6.yaml create mode 100644 summoner-cli/examples/stack-full/stack-9.6.6.yaml diff --git a/summoner-cli/examples/cabal-full/.github/workflows/ci.yml b/summoner-cli/examples/cabal-full/.github/workflows/ci.yml index ea46534..b87e611 100644 --- a/summoner-cli/examples/cabal-full/.github/workflows/ci.yml +++ b/summoner-cli/examples/cabal-full/.github/workflows/ci.yml @@ -26,7 +26,10 @@ jobs: - "9.2.8" - "9.4.8" - "9.6.6" + - "9.8.2" exclude: + - os: macOS-latest + ghc: 9.6.6 - os: macOS-latest ghc: 9.4.8 - os: macOS-latest @@ -41,6 +44,8 @@ jobs: ghc: 8.6.5 - os: macOS-latest ghc: 8.4.4 + - os: windows-latest + ghc: 9.6.6 - os: windows-latest ghc: 9.4.8 - os: windows-latest diff --git a/summoner-cli/examples/cabal-full/.travis.yml b/summoner-cli/examples/cabal-full/.travis.yml index 7e6a195..74ce8d7 100644 --- a/summoner-cli/examples/cabal-full/.travis.yml +++ b/summoner-cli/examples/cabal-full/.travis.yml @@ -19,6 +19,7 @@ jobs: - ghc: 9.2.8 - ghc: 9.4.8 - ghc: 9.6.6 + - ghc: 9.8.2 install: # HLint check diff --git a/summoner-cli/examples/cabal-full/appveyor.yml b/summoner-cli/examples/cabal-full/appveyor.yml index f565698..4f8c87e 100644 --- a/summoner-cli/examples/cabal-full/appveyor.yml +++ b/summoner-cli/examples/cabal-full/appveyor.yml @@ -21,12 +21,12 @@ environment: CABOPTS: --store-dir=C:\\SR matrix: - - GHCVER: 9.6.6 + - GHCVER: 9.8.2 install: - choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2 - choco install -y cabal --version 3.6.2.0 - - choco install -y ghc --version 9.6.6 + - choco install -y ghc --version 9.8.2 - refreshenv before_build: diff --git a/summoner-cli/examples/cabal-full/cabal-full.cabal b/summoner-cli/examples/cabal-full/cabal-full.cabal index 02be898..0b18e70 100644 --- a/summoner-cli/examples/cabal-full/cabal-full.cabal +++ b/summoner-cli/examples/cabal-full/cabal-full.cabal @@ -24,13 +24,14 @@ tested-with: GHC == 8.4.4 GHC == 9.2.8 GHC == 9.4.8 GHC == 9.6.6 + GHC == 9.8.2 source-repository head type: git location: https://github.com/kowainik/cabal-full.git common common-options - build-depends: base >= 4.11.1.0 && < 4.19 + build-depends: base >= 4.11.1.0 && < 4.20 , relude mixins: base hiding (Prelude) @@ -54,6 +55,18 @@ common common-options -hiedir=.hie if impl(ghc >= 8.10) ghc-options: -Wunused-packages + if impl(ghc >= 9.0) + ghc-options: -Winvalid-haddock + if impl(ghc >= 9.2) + ghc-options: -Wredundant-bang-patterns + -Woperator-whitespace + if impl(ghc >= 9.4 && < 9.10) + ghc-options: -Wforall-identifier + if impl(ghc >= 9.4) + ghc-options: -Wredundant-strictness-flags + if impl(ghc >= 9.8) + ghc-options: -Wterm-variable-capture + -Winconsistent-flags default-language: Haskell2010 default-extensions: DeriveGeneric diff --git a/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal b/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal index 29c9e05..b45f7b1 100644 --- a/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal +++ b/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal @@ -12,10 +12,10 @@ copyright: 2022 Kowainik build-type: Simple extra-doc-files: README.md CHANGELOG.md -tested-with: GHC == 9.6.6 +tested-with: GHC == 9.8.2 common common-options - build-depends: base ^>= 4.18.2.1 + build-depends: base ^>= 4.19.1.0 ghc-options: -Wall -Wcompat @@ -35,6 +35,18 @@ common common-options -hiedir=.hie if impl(ghc >= 8.10) ghc-options: -Wunused-packages + if impl(ghc >= 9.0) + ghc-options: -Winvalid-haddock + if impl(ghc >= 9.2) + ghc-options: -Wredundant-bang-patterns + -Woperator-whitespace + if impl(ghc >= 9.4 && < 9.10) + ghc-options: -Wforall-identifier + if impl(ghc >= 9.4) + ghc-options: -Wredundant-strictness-flags + if impl(ghc >= 9.8) + ghc-options: -Wterm-variable-capture + -Winconsistent-flags default-language: Haskell2010 diff --git a/summoner-cli/examples/cabalScript.hs b/summoner-cli/examples/cabalScript.hs index 71534f6..c54a3cc 100644 --- a/summoner-cli/examples/cabalScript.hs +++ b/summoner-cli/examples/cabalScript.hs @@ -1,7 +1,7 @@ #!/usr/bin/env cabal {- cabal: build-depends: - , base ^>= 4.18.2.1 + , base ^>= 4.19.1.0 -} main :: IO () diff --git a/summoner-cli/examples/full-batteries/.github/workflows/ci.yml b/summoner-cli/examples/full-batteries/.github/workflows/ci.yml index 4508ffd..f5c159f 100644 --- a/summoner-cli/examples/full-batteries/.github/workflows/ci.yml +++ b/summoner-cli/examples/full-batteries/.github/workflows/ci.yml @@ -28,7 +28,10 @@ jobs: - "9.2.8" - "9.4.8" - "9.6.6" + - "9.8.2" exclude: + - os: macOS-latest + ghc: 9.6.6 - os: macOS-latest ghc: 9.4.8 - os: macOS-latest @@ -47,6 +50,8 @@ jobs: ghc: 8.2.2 - os: macOS-latest ghc: 8.0.2 + - os: windows-latest + ghc: 9.6.6 - os: windows-latest ghc: 9.4.8 - os: windows-latest @@ -124,6 +129,7 @@ jobs: - "9.2.8" - "9.4.8" - "9.6.6" + - "9.8.2" steps: - uses: actions/checkout@v2 diff --git a/summoner-cli/examples/full-batteries/.travis.yml b/summoner-cli/examples/full-batteries/.travis.yml index e46b20c..e4b97c4 100644 --- a/summoner-cli/examples/full-batteries/.travis.yml +++ b/summoner-cli/examples/full-batteries/.travis.yml @@ -23,6 +23,7 @@ jobs: - ghc: 9.2.8 - ghc: 9.4.8 - ghc: 9.6.6 + - ghc: 9.8.2 - ghc: 8.0.2 env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-8.0.2.yaml" @@ -52,6 +53,9 @@ jobs: env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-9.4.8.yaml" - ghc: 9.6.6 + env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-9.6.6.yaml" + + - ghc: 9.8.2 env: STACK_YAML="$TRAVIS_BUILD_DIR/stack.yaml" allow_failures: diff --git a/summoner-cli/examples/full-batteries/appveyor.yml b/summoner-cli/examples/full-batteries/appveyor.yml index f565698..4f8c87e 100644 --- a/summoner-cli/examples/full-batteries/appveyor.yml +++ b/summoner-cli/examples/full-batteries/appveyor.yml @@ -21,12 +21,12 @@ environment: CABOPTS: --store-dir=C:\\SR matrix: - - GHCVER: 9.6.6 + - GHCVER: 9.8.2 install: - choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2 - choco install -y cabal --version 3.6.2.0 - - choco install -y ghc --version 9.6.6 + - choco install -y ghc --version 9.8.2 - refreshenv before_build: diff --git a/summoner-cli/examples/full-batteries/full-batteries.cabal b/summoner-cli/examples/full-batteries/full-batteries.cabal index 9a1799e..c02c9ac 100644 --- a/summoner-cli/examples/full-batteries/full-batteries.cabal +++ b/summoner-cli/examples/full-batteries/full-batteries.cabal @@ -26,13 +26,14 @@ tested-with: GHC == 8.0.2 GHC == 9.2.8 GHC == 9.4.8 GHC == 9.6.6 + GHC == 9.8.2 source-repository head type: git location: https://github.com/kowainik/full-batteries.git common common-options - build-depends: base >= 4.9.1.0 && < 4.19 + build-depends: base >= 4.9.1.0 && < 4.20 , relude mixins: base hiding (Prelude) diff --git a/summoner-cli/examples/full-batteries/stack-9.6.6.yaml b/summoner-cli/examples/full-batteries/stack-9.6.6.yaml new file mode 100644 index 0000000..f47039c --- /dev/null +++ b/summoner-cli/examples/full-batteries/stack-9.6.6.yaml @@ -0,0 +1 @@ +resolver: lts-22.38 diff --git a/summoner-cli/examples/full-batteries/stack.yaml b/summoner-cli/examples/full-batteries/stack.yaml index 86cc76a..5f020d3 100644 --- a/summoner-cli/examples/full-batteries/stack.yaml +++ b/summoner-cli/examples/full-batteries/stack.yaml @@ -1 +1 @@ -resolver: lts-22.34 +resolver: nightly-2024-10-11 diff --git a/summoner-cli/examples/stack-full/.github/workflows/ci.yml b/summoner-cli/examples/stack-full/.github/workflows/ci.yml index 6b737ef..e46ba3c 100644 --- a/summoner-cli/examples/stack-full/.github/workflows/ci.yml +++ b/summoner-cli/examples/stack-full/.github/workflows/ci.yml @@ -25,6 +25,7 @@ jobs: - "9.2.8" - "9.4.8" - "9.6.6" + - "9.8.2" steps: - uses: actions/checkout@v2 diff --git a/summoner-cli/examples/stack-full/.travis.yml b/summoner-cli/examples/stack-full/.travis.yml index dc24183..b6e67a1 100644 --- a/summoner-cli/examples/stack-full/.travis.yml +++ b/summoner-cli/examples/stack-full/.travis.yml @@ -35,6 +35,9 @@ jobs: env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-9.4.8.yaml" - ghc: 9.6.6 + env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-9.6.6.yaml" + + - ghc: 9.8.2 env: STACK_YAML="$TRAVIS_BUILD_DIR/stack.yaml" allow_failures: diff --git a/summoner-cli/examples/stack-full/stack-9.6.6.yaml b/summoner-cli/examples/stack-full/stack-9.6.6.yaml new file mode 100644 index 0000000..f47039c --- /dev/null +++ b/summoner-cli/examples/stack-full/stack-9.6.6.yaml @@ -0,0 +1 @@ +resolver: lts-22.38 diff --git a/summoner-cli/examples/stack-full/stack-full.cabal b/summoner-cli/examples/stack-full/stack-full.cabal index 476297d..9204348 100644 --- a/summoner-cli/examples/stack-full/stack-full.cabal +++ b/summoner-cli/examples/stack-full/stack-full.cabal @@ -24,13 +24,14 @@ tested-with: GHC == 8.4.4 GHC == 9.2.8 GHC == 9.4.8 GHC == 9.6.6 + GHC == 9.8.2 source-repository head type: git location: https://github.com/kowainik/stack-full.git common common-options - build-depends: base >= 4.11.1.0 && < 4.19 + build-depends: base >= 4.11.1.0 && < 4.20 , relude mixins: base hiding (Prelude) @@ -54,6 +55,18 @@ common common-options -hiedir=.hie if impl(ghc >= 8.10) ghc-options: -Wunused-packages + if impl(ghc >= 9.0) + ghc-options: -Winvalid-haddock + if impl(ghc >= 9.2) + ghc-options: -Wredundant-bang-patterns + -Woperator-whitespace + if impl(ghc >= 9.4 && < 9.10) + ghc-options: -Wforall-identifier + if impl(ghc >= 9.4) + ghc-options: -Wredundant-strictness-flags + if impl(ghc >= 9.8) + ghc-options: -Wterm-variable-capture + -Winconsistent-flags default-language: Haskell2010 default-extensions: DeriveGeneric diff --git a/summoner-cli/examples/stack-full/stack.yaml b/summoner-cli/examples/stack-full/stack.yaml index 86cc76a..5f020d3 100644 --- a/summoner-cli/examples/stack-full/stack.yaml +++ b/summoner-cli/examples/stack-full/stack.yaml @@ -1 +1 @@ -resolver: lts-22.34 +resolver: nightly-2024-10-11 diff --git a/summoner-cli/examples/stackScript.hs b/summoner-cli/examples/stackScript.hs index e681986..a1f91cb 100644 --- a/summoner-cli/examples/stackScript.hs +++ b/summoner-cli/examples/stackScript.hs @@ -1,6 +1,6 @@ #!/usr/bin/env stack {- stack - --resolver lts-22.34 + --resolver nightly-2024-10-11 script --package base -} diff --git a/summoner-cli/examples/summoner-default.toml b/summoner-cli/examples/summoner-default.toml index 17aece1..b3b0d79 100644 --- a/summoner-cli/examples/summoner-default.toml +++ b/summoner-cli/examples/summoner-default.toml @@ -48,9 +48,9 @@ license = "MIT" # travis = true # Travis CI # appveyor = true # AppVeyor CI -# List of additional GHC versions to support besides 9.6.6. +# List of additional GHC versions to support besides 9.8.2. # Run the 'summon show ghc' command to see the list of all supported GHC versions. -# ghcVersions = ["9.2.8", "9.4.8"] +# ghcVersions = ["9.4.8", "9.6.6"] # List of default-extensions in the .cabal file # extensions = [ "ConstraintKinds" diff --git a/summoner-cli/src/Summoner/GhcVer.hs b/summoner-cli/src/Summoner/GhcVer.hs index 0714824..c38ed7b 100644 --- a/summoner-cli/src/Summoner/GhcVer.hs +++ b/summoner-cli/src/Summoner/GhcVer.hs @@ -1,6 +1,6 @@ {- | Module : Summoner.GhcVer -Copyright : (c) 2017-2022 Kowainik +Copyright : (c) 2017-2024 Kowainik SPDX-License-Identifier : MPL-2.0 Maintainer : Kowainik Stability : Stable @@ -38,8 +38,9 @@ data GhcVer | Ghc8107 | Ghc902 | Ghc928 - | Ghc945 + | Ghc948 | Ghc966 + | Ghc982 deriving stock (Eq, Ord, Show, Enum, Bounded) -- | Converts 'GhcVer' into dot-separated string. @@ -53,8 +54,9 @@ showGhcVer = \case Ghc8107 -> "8.10.7" Ghc902 -> "9.0.2" Ghc928 -> "9.2.8" - Ghc945 -> "9.4.8" + Ghc948 -> "9.4.8" Ghc966 -> "9.6.6" + Ghc982 -> "9.8.2" {- | These are old GHC versions that are not working with default GHC versions when using Stack. @@ -76,8 +78,9 @@ latestLts = \case Ghc8107 -> "lts-18.28" Ghc902 -> "lts-19.33" Ghc928 -> "lts-20.26" - Ghc945 -> "lts-21.25" - Ghc966 -> "lts-22.34" + Ghc948 -> "lts-21.25" + Ghc966 -> "lts-22.38" + Ghc982 -> "nightly-2024-10-11" -- | Represents PVP versioning (4 numbers). data Pvp = Pvp @@ -102,8 +105,9 @@ baseVerPvp = \case Ghc8107 -> Pvp 4 14 3 0 Ghc902 -> Pvp 4 15 1 0 Ghc928 -> Pvp 4 16 4 0 - Ghc945 -> Pvp 4 17 0 0 + Ghc948 -> Pvp 4 17 2 1 Ghc966 -> Pvp 4 18 2 1 + Ghc982 -> Pvp 4 19 1 0 -- | Returns corresponding @base@ version of the given GHC version. baseVer :: GhcVer -> Text diff --git a/summoner-cli/src/Summoner/Template/Cabal.hs b/summoner-cli/src/Summoner/Template/Cabal.hs index b53f1ab..7f2fa22 100644 --- a/summoner-cli/src/Summoner/Template/Cabal.hs +++ b/summoner-cli/src/Summoner/Template/Cabal.hs @@ -144,6 +144,18 @@ cabalFile Settings{..} = File (toString settingsRepo ++ ".cabal") cabalFileConte , " -hiedir=.hie" , " if impl(ghc >= 8.10)" , " ghc-options: -Wunused-packages" + , " if impl(ghc >= 9.0)" + , " ghc-options: -Winvalid-haddock" + , " if impl(ghc >= 9.2)" + , " ghc-options: -Wredundant-bang-patterns" + , " -Woperator-whitespace" + , " if impl(ghc >= 9.4 && < 9.10)" + , " ghc-options: -Wforall-identifier" + , " if impl(ghc >= 9.4)" + , " ghc-options: -Wredundant-strictness-flags" + , " if impl(ghc >= 9.8)" + , " ghc-options: -Wterm-variable-capture" + , " -Winconsistent-flags" ] libraryStanza :: Text diff --git a/summoner-cli/test/Test/Show.hs b/summoner-cli/test/Test/Show.hs index 8316637..1f59124 100644 --- a/summoner-cli/test/Test/Show.hs +++ b/summoner-cli/test/Test/Show.hs @@ -22,6 +22,7 @@ goldenGhcTable = , "GHC-8.10.7 base-4.14.3.0 lts-18.28" , "GHC-9.0.2 base-4.15.1.0 lts-19.33" , "GHC-9.2.8 base-4.16.4.0 lts-20.26" - , "GHC-9.4.8 base-4.17.0.0 lts-21.25" - , "GHC-9.6.6 base-4.18.2.1 lts-22.34" + , "GHC-9.4.8 base-4.17.2.1 lts-21.25" + , "GHC-9.6.6 base-4.18.2.1 lts-22.38" + , "GHC-9.8.2 base-4.19.1.0 nightly-2024-10-11" ] diff --git a/summoner-tui/src/Summoner/Tui.hs b/summoner-tui/src/Summoner/Tui.hs index ede84d6..3c11f03 100644 --- a/summoner-tui/src/Summoner/Tui.hs +++ b/summoner-tui/src/Summoner/Tui.hs @@ -53,6 +53,8 @@ import Summoner.Tui.Widget (borderLabel, listInBorder) import qualified Brick (on) import qualified Graphics.Vty as V +import qualified Graphics.Vty.Config as VConfig +import qualified Graphics.Vty.CrossPlatform as VC import qualified Paths_summoner_tui as Meta (version) @@ -352,7 +354,7 @@ runApp app s = do where buildVty :: IO V.Vty buildVty = do - v <- V.mkVty =<< V.standardIOConfig + v <- VC.mkVty VConfig.defaultConfig V.setMode (V.outputIface v) V.Mouse True pure v diff --git a/summoner-tui/src/Summoner/Tui/Field.hs b/summoner-tui/src/Summoner/Tui/Field.hs index ec4389f..d762f53 100644 --- a/summoner-tui/src/Summoner/Tui/Field.hs +++ b/summoner-tui/src/Summoner/Tui/Field.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE Rank2Types #-} {- | @@ -23,6 +24,9 @@ module Summoner.Tui.Field import Brick (BrickEvent (..), EventM, Location (..), Widget, attrName, clickable, showCursor, str, vBox, withAttr, withDefAttr, (<+>)) import Brick.AttrMap (AttrName) +#if MIN_VERSION_brick(2,2,0) +import Brick.Forms (FormFieldVisibilityMode (ShowCompositeField)) +#endif import Brick.Forms (FormField (..), FormFieldState (..), checkboxCustomField, focusedFormInputAttr, radioCustomField) import Lens.Micro (Lens', lens, (^.)) @@ -40,6 +44,9 @@ strField t _ = FormFieldState , formFieldRenderHelper = renderString , formFieldConcat = vBox , formFieldUpdate = flip const +#if MIN_VERSION_brick(2,2,0) + , formFieldVisibilityMode = ShowCompositeField +#endif } where -- looool @@ -99,6 +106,9 @@ activeCheckboxField stLens isActive name label initialState = FormFieldState , formFieldRenderHelper = id , formFieldConcat = vBox , formFieldUpdate = flip const +#if MIN_VERSION_brick(2,2,0) + , formFieldVisibilityMode = ShowCompositeField +#endif } where initVal, isEnabled :: Bool diff --git a/summoner-tui/summoner-tui.cabal b/summoner-tui/summoner-tui.cabal index bb022f2..9b2db8c 100644 --- a/summoner-tui/summoner-tui.cabal +++ b/summoner-tui/summoner-tui.cabal @@ -104,7 +104,8 @@ library , microlens-th ^>= 0.4 , summoner ^>= 2.0.0.0 , validation-selective >= 0.0.0.0 && < 0.3 - , vty >= 5.36 && < 6.3 + , vty >= 6.0 && < 6.3 + , vty-crossplatform >= 0.2 && < 0.3 executable summon-tui import: common-options From 744efd0ae9d84b3f10ad17c9cc32e2991719eac8 Mon Sep 17 00:00:00 2001 From: Veronika Romashkina Date: Sat, 26 Oct 2024 18:39:09 +0100 Subject: [PATCH 3/8] Build newer stack settings --- .github/workflows/ci.yml | 4 ++-- stack.yaml | 14 +++++--------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a43d17b..06a0ea1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -129,8 +129,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - stack: ["2.7.3"] - ghc: ["9.0.2"] + stack: ["3.1"] + ghc: ["9.6.6"] steps: - uses: actions/checkout@v3 diff --git a/stack.yaml b/stack.yaml index 97eff2d..d42a3e7 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,15 +1,11 @@ -resolver: lts-19.31 +resolver: lts-22.39 packages: - summoner-cli/ - summoner-tui/ extra-deps: - - brick-1.3 - - bimap-0.5.0 # for brick - - text-zipper-0.12 # for brick - - colourista-0.1.0.2 - - tomland-1.3.3.2 - - validation-selective-0.1.0.1 - - vty-5.37 - - selective-0.4.2 + - tomland-1.3.3.3 + - validation-selective-0.2.0.0 + +allow-newer: true \ No newline at end of file From 3bd2697f092736b986ab8a82562db163e7843db0 Mon Sep 17 00:00:00 2001 From: Veronika Romashkina Date: Sat, 26 Oct 2024 20:06:09 +0100 Subject: [PATCH 4/8] Use newer Cabal to support newer GHCs --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06a0ea1..90c1b13 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macOS-latest, windows-latest] - cabal: ["3.6"] + cabal: ["3.10"] ghc: - "8.4.4" - "8.6.5" From c3365a8d5f1d08cf2ce78f1d13c1040451370baf Mon Sep 17 00:00:00 2001 From: Veronika Romashkina Date: Sat, 26 Oct 2024 20:46:53 +0100 Subject: [PATCH 5/8] Update some defaults --- .github/workflows/ci.yml | 8 ++++---- .../examples/cabal-full/.github/workflows/ci.yml | 8 ++++---- summoner-cli/examples/cabal-full/.travis.yml | 2 +- .../examples/cabal-full/cabal-full.cabal | 2 +- .../examples/cabal-minimal/cabal-minimal.cabal | 2 +- .../full-batteries/.github/workflows/ci.yml | 16 ++++++++-------- summoner-cli/examples/full-batteries/.travis.yml | 2 +- .../examples/full-batteries/full-batteries.cabal | 2 +- .../examples/stack-full/.github/workflows/ci.yml | 8 ++++---- summoner-cli/examples/stack-full/.travis.yml | 2 +- summoner-cli/examples/stack-full/appveyor.yml | 2 +- .../examples/stack-full/stack-full.cabal | 2 +- summoner-cli/src/Summoner/Default.hs | 10 +++++----- 13 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90c1b13..c3a323f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,7 +61,7 @@ jobs: ghc: 9.6.6 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: haskell/actions/setup@v2 id: setup-haskell-cabal @@ -78,7 +78,7 @@ jobs: run: | cabal freeze - - uses: actions/cache@v3 + - uses: actions/cache@v4 name: Cache ~/.cabal/store with: path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} @@ -133,7 +133,7 @@ jobs: ghc: ["9.6.6"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: haskell/actions/setup@v2 name: Setup Haskell Stack @@ -141,7 +141,7 @@ jobs: ghc-version: ${{ matrix.ghc }} stack-version: ${{ matrix.stack }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 name: Cache ~/.stack with: path: ~/.stack diff --git a/summoner-cli/examples/cabal-full/.github/workflows/ci.yml b/summoner-cli/examples/cabal-full/.github/workflows/ci.yml index b87e611..d16979b 100644 --- a/summoner-cli/examples/cabal-full/.github/workflows/ci.yml +++ b/summoner-cli/examples/cabal-full/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] - cabal: ["3.0"] + cabal: ["3.10"] ghc: - "8.4.4" - "8.6.5" @@ -62,9 +62,9 @@ jobs: ghc: 8.4.4 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: haskell/actions/setup@v1.2 + - uses: haskell/actions/setup@v2 id: setup-haskell-cabal name: Setup Haskell with: @@ -79,7 +79,7 @@ jobs: run: | cabal freeze - - uses: actions/cache@v2 + - uses: actions/cache@v4 name: Cache ~/.cabal/store with: path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} diff --git a/summoner-cli/examples/cabal-full/.travis.yml b/summoner-cli/examples/cabal-full/.travis.yml index 74ce8d7..b627779 100644 --- a/summoner-cli/examples/cabal-full/.travis.yml +++ b/summoner-cli/examples/cabal-full/.travis.yml @@ -3,7 +3,7 @@ language: haskell git: depth: 5 -cabal: "3.0" +cabal: "3.10" cache: directories: diff --git a/summoner-cli/examples/cabal-full/cabal-full.cabal b/summoner-cli/examples/cabal-full/cabal-full.cabal index 0b18e70..9f4f217 100644 --- a/summoner-cli/examples/cabal-full/cabal-full.cabal +++ b/summoner-cli/examples/cabal-full/cabal-full.cabal @@ -1,4 +1,4 @@ -cabal-version: 3.0 +cabal-version: 3.10 name: cabal-full version: 0.0.0.0 synopsis: Cabal-only example with all integrations diff --git a/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal b/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal index b45f7b1..7d8a742 100644 --- a/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal +++ b/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal @@ -1,4 +1,4 @@ -cabal-version: 3.0 +cabal-version: 3.10 name: cabal-minimal version: 0.0.0.0 synopsis: Minimal cabal-only test project diff --git a/summoner-cli/examples/full-batteries/.github/workflows/ci.yml b/summoner-cli/examples/full-batteries/.github/workflows/ci.yml index f5c159f..e945444 100644 --- a/summoner-cli/examples/full-batteries/.github/workflows/ci.yml +++ b/summoner-cli/examples/full-batteries/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] - cabal: ["3.0"] + cabal: ["3.10"] ghc: - "8.0.2" - "8.2.2" @@ -72,9 +72,9 @@ jobs: ghc: 8.0.2 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: haskell/actions/setup@v1.2 + - uses: haskell/actions/setup@v2 id: setup-haskell-cabal name: Setup Haskell with: @@ -89,7 +89,7 @@ jobs: run: | cabal freeze - - uses: actions/cache@v2 + - uses: actions/cache@v4 name: Cache ~/.cabal/store with: path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} @@ -117,7 +117,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - stack: ["2.7.3"] + stack: ["3.1.1"] ghc: - "8.0.2" - "8.2.2" @@ -132,16 +132,16 @@ jobs: - "9.8.2" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' - - uses: haskell/actions/setup@v1.2 + - uses: haskell/actions/setup@v2 name: Setup Haskell Stack with: ghc-version: ${{ matrix.ghc }} stack-version: ${{ matrix.stack }} - - uses: actions/cache@v2 + - uses: actions/cache@v4 name: Cache ~/.stack with: path: ~/.stack diff --git a/summoner-cli/examples/full-batteries/.travis.yml b/summoner-cli/examples/full-batteries/.travis.yml index e4b97c4..4263755 100644 --- a/summoner-cli/examples/full-batteries/.travis.yml +++ b/summoner-cli/examples/full-batteries/.travis.yml @@ -3,7 +3,7 @@ language: haskell git: depth: 5 -cabal: "3.0" +cabal: "3.10" cache: directories: diff --git a/summoner-cli/examples/full-batteries/full-batteries.cabal b/summoner-cli/examples/full-batteries/full-batteries.cabal index c02c9ac..4148507 100644 --- a/summoner-cli/examples/full-batteries/full-batteries.cabal +++ b/summoner-cli/examples/full-batteries/full-batteries.cabal @@ -1,4 +1,4 @@ -cabal-version: 3.0 +cabal-version: 3.10 name: full-batteries version: 0.0.0.0 synopsis: Full-featured test project diff --git a/summoner-cli/examples/stack-full/.github/workflows/ci.yml b/summoner-cli/examples/stack-full/.github/workflows/ci.yml index e46ba3c..6bb1f3d 100644 --- a/summoner-cli/examples/stack-full/.github/workflows/ci.yml +++ b/summoner-cli/examples/stack-full/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - stack: ["2.7.3"] + stack: ["3.1.1"] ghc: - "8.4.4" - "8.6.5" @@ -28,16 +28,16 @@ jobs: - "9.8.2" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' - - uses: haskell/actions/setup@v1.2 + - uses: haskell/actions/setup@v2 name: Setup Haskell Stack with: ghc-version: ${{ matrix.ghc }} stack-version: ${{ matrix.stack }} - - uses: actions/cache@v2 + - uses: actions/cache@v4 name: Cache ~/.stack with: path: ~/.stack diff --git a/summoner-cli/examples/stack-full/.travis.yml b/summoner-cli/examples/stack-full/.travis.yml index b6e67a1..180521f 100644 --- a/summoner-cli/examples/stack-full/.travis.yml +++ b/summoner-cli/examples/stack-full/.travis.yml @@ -3,7 +3,7 @@ language: haskell git: depth: 5 -cabal: "3.0" +cabal: "3.10" cache: directories: diff --git a/summoner-cli/examples/stack-full/appveyor.yml b/summoner-cli/examples/stack-full/appveyor.yml index ddfd6ab..b6ce36e 100644 --- a/summoner-cli/examples/stack-full/appveyor.yml +++ b/summoner-cli/examples/stack-full/appveyor.yml @@ -10,7 +10,7 @@ branches: environment: STACK_ROOT: C:\sr - STACK_VERSION: 2.7.3 + STACK_VERSION: 3.1.1 # Workaround a gnarly bug https://github.com/haskell/cabal/issues/5386 # See: https://www.fpcomplete.com/blog/2018/06/sed-a-debugging-story diff --git a/summoner-cli/examples/stack-full/stack-full.cabal b/summoner-cli/examples/stack-full/stack-full.cabal index 9204348..15f442f 100644 --- a/summoner-cli/examples/stack-full/stack-full.cabal +++ b/summoner-cli/examples/stack-full/stack-full.cabal @@ -1,4 +1,4 @@ -cabal-version: 3.0 +cabal-version: 3.10 name: stack-full version: 0.0.0.0 synopsis: Stack-only example with all integrations diff --git a/summoner-cli/src/Summoner/Default.hs b/summoner-cli/src/Summoner/Default.hs index ff004cc..479df26 100644 --- a/summoner-cli/src/Summoner/Default.hs +++ b/summoner-cli/src/Summoner/Default.hs @@ -46,11 +46,11 @@ defaultGHC = maxBound -- | Default version of the Cabal. defaultCabal :: Text -defaultCabal = "3.0" +defaultCabal = "3.10" -- | Default version of the Stack. defaultStack :: Text -defaultStack = "2.7.3" +defaultStack = "3.1.1" defaultLicenseName :: LicenseName defaultLicenseName = MIT @@ -74,13 +74,13 @@ defaultDescription :: Text defaultDescription = "See README for more info" ghcActionsCheckoutVersion :: Text -ghcActionsCheckoutVersion = "@v2" +ghcActionsCheckoutVersion = "@v4" ghcActionsSetupHaskellVersion :: Text -ghcActionsSetupHaskellVersion = "@v1.2" +ghcActionsSetupHaskellVersion = "@v2" ghcActionsCacheVersion :: Text -ghcActionsCacheVersion = "@v2" +ghcActionsCacheVersion = "@v4" currentYear :: IO Text currentYear = do From 49403a9d82f44fe23d96cf6edb68c94b66239168 Mon Sep 17 00:00:00 2001 From: Veronika Romashkina Date: Mon, 28 Oct 2024 18:11:15 +0000 Subject: [PATCH 6/8] Try cabal 3.10 as default --- summoner-cli/examples/cabal-full/.github/workflows/ci.yml | 2 +- summoner-cli/examples/cabal-full/.travis.yml | 2 +- summoner-cli/examples/cabal-full/cabal-full.cabal | 2 +- summoner-cli/examples/cabal-minimal/cabal-minimal.cabal | 2 +- summoner-cli/examples/full-batteries/.github/workflows/ci.yml | 2 +- summoner-cli/examples/full-batteries/.travis.yml | 2 +- summoner-cli/examples/full-batteries/full-batteries.cabal | 2 +- summoner-cli/examples/stack-full/.travis.yml | 2 +- summoner-cli/examples/stack-full/stack-full.cabal | 2 +- summoner-cli/src/Summoner/Default.hs | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/summoner-cli/examples/cabal-full/.github/workflows/ci.yml b/summoner-cli/examples/cabal-full/.github/workflows/ci.yml index d16979b..7715708 100644 --- a/summoner-cli/examples/cabal-full/.github/workflows/ci.yml +++ b/summoner-cli/examples/cabal-full/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] - cabal: ["3.10"] + cabal: ["3.10.3.0"] ghc: - "8.4.4" - "8.6.5" diff --git a/summoner-cli/examples/cabal-full/.travis.yml b/summoner-cli/examples/cabal-full/.travis.yml index b627779..0376abc 100644 --- a/summoner-cli/examples/cabal-full/.travis.yml +++ b/summoner-cli/examples/cabal-full/.travis.yml @@ -3,7 +3,7 @@ language: haskell git: depth: 5 -cabal: "3.10" +cabal: "3.10.3.0" cache: directories: diff --git a/summoner-cli/examples/cabal-full/cabal-full.cabal b/summoner-cli/examples/cabal-full/cabal-full.cabal index 9f4f217..69e1f06 100644 --- a/summoner-cli/examples/cabal-full/cabal-full.cabal +++ b/summoner-cli/examples/cabal-full/cabal-full.cabal @@ -1,4 +1,4 @@ -cabal-version: 3.10 +cabal-version: 3.10.3.0 name: cabal-full version: 0.0.0.0 synopsis: Cabal-only example with all integrations diff --git a/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal b/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal index 7d8a742..c22c1f0 100644 --- a/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal +++ b/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal @@ -1,4 +1,4 @@ -cabal-version: 3.10 +cabal-version: 3.10.3.0 name: cabal-minimal version: 0.0.0.0 synopsis: Minimal cabal-only test project diff --git a/summoner-cli/examples/full-batteries/.github/workflows/ci.yml b/summoner-cli/examples/full-batteries/.github/workflows/ci.yml index e945444..f79f98d 100644 --- a/summoner-cli/examples/full-batteries/.github/workflows/ci.yml +++ b/summoner-cli/examples/full-batteries/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] - cabal: ["3.10"] + cabal: ["3.10.3.0"] ghc: - "8.0.2" - "8.2.2" diff --git a/summoner-cli/examples/full-batteries/.travis.yml b/summoner-cli/examples/full-batteries/.travis.yml index 4263755..8403541 100644 --- a/summoner-cli/examples/full-batteries/.travis.yml +++ b/summoner-cli/examples/full-batteries/.travis.yml @@ -3,7 +3,7 @@ language: haskell git: depth: 5 -cabal: "3.10" +cabal: "3.10.3.0" cache: directories: diff --git a/summoner-cli/examples/full-batteries/full-batteries.cabal b/summoner-cli/examples/full-batteries/full-batteries.cabal index 4148507..79f9a19 100644 --- a/summoner-cli/examples/full-batteries/full-batteries.cabal +++ b/summoner-cli/examples/full-batteries/full-batteries.cabal @@ -1,4 +1,4 @@ -cabal-version: 3.10 +cabal-version: 3.10.3.0 name: full-batteries version: 0.0.0.0 synopsis: Full-featured test project diff --git a/summoner-cli/examples/stack-full/.travis.yml b/summoner-cli/examples/stack-full/.travis.yml index 180521f..c63cca2 100644 --- a/summoner-cli/examples/stack-full/.travis.yml +++ b/summoner-cli/examples/stack-full/.travis.yml @@ -3,7 +3,7 @@ language: haskell git: depth: 5 -cabal: "3.10" +cabal: "3.10.3.0" cache: directories: diff --git a/summoner-cli/examples/stack-full/stack-full.cabal b/summoner-cli/examples/stack-full/stack-full.cabal index 15f442f..8c5789d 100644 --- a/summoner-cli/examples/stack-full/stack-full.cabal +++ b/summoner-cli/examples/stack-full/stack-full.cabal @@ -1,4 +1,4 @@ -cabal-version: 3.10 +cabal-version: 3.10.3.0 name: stack-full version: 0.0.0.0 synopsis: Stack-only example with all integrations diff --git a/summoner-cli/src/Summoner/Default.hs b/summoner-cli/src/Summoner/Default.hs index 479df26..4b583e0 100644 --- a/summoner-cli/src/Summoner/Default.hs +++ b/summoner-cli/src/Summoner/Default.hs @@ -46,7 +46,7 @@ defaultGHC = maxBound -- | Default version of the Cabal. defaultCabal :: Text -defaultCabal = "3.10" +defaultCabal = "3.10.3.0" -- | Default version of the Stack. defaultStack :: Text From 41f555ec3b6b2aae847f87f92ff3684a4f59918b Mon Sep 17 00:00:00 2001 From: Veronika Romashkina Date: Mon, 28 Oct 2024 20:29:00 +0000 Subject: [PATCH 7/8] Specify the cabla version for the cabal file separately --- summoner-cli/examples/cabal-full/cabal-full.cabal | 2 +- summoner-cli/examples/cabal-minimal/cabal-minimal.cabal | 2 +- summoner-cli/examples/full-batteries/full-batteries.cabal | 2 +- summoner-cli/examples/stack-full/stack-full.cabal | 2 +- summoner-cli/src/Summoner/Default.hs | 5 +++++ summoner-cli/src/Summoner/Template/Cabal.hs | 4 ++-- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/summoner-cli/examples/cabal-full/cabal-full.cabal b/summoner-cli/examples/cabal-full/cabal-full.cabal index 69e1f06..0b18e70 100644 --- a/summoner-cli/examples/cabal-full/cabal-full.cabal +++ b/summoner-cli/examples/cabal-full/cabal-full.cabal @@ -1,4 +1,4 @@ -cabal-version: 3.10.3.0 +cabal-version: 3.0 name: cabal-full version: 0.0.0.0 synopsis: Cabal-only example with all integrations diff --git a/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal b/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal index c22c1f0..b45f7b1 100644 --- a/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal +++ b/summoner-cli/examples/cabal-minimal/cabal-minimal.cabal @@ -1,4 +1,4 @@ -cabal-version: 3.10.3.0 +cabal-version: 3.0 name: cabal-minimal version: 0.0.0.0 synopsis: Minimal cabal-only test project diff --git a/summoner-cli/examples/full-batteries/full-batteries.cabal b/summoner-cli/examples/full-batteries/full-batteries.cabal index 79f9a19..c02c9ac 100644 --- a/summoner-cli/examples/full-batteries/full-batteries.cabal +++ b/summoner-cli/examples/full-batteries/full-batteries.cabal @@ -1,4 +1,4 @@ -cabal-version: 3.10.3.0 +cabal-version: 3.0 name: full-batteries version: 0.0.0.0 synopsis: Full-featured test project diff --git a/summoner-cli/examples/stack-full/stack-full.cabal b/summoner-cli/examples/stack-full/stack-full.cabal index 8c5789d..9204348 100644 --- a/summoner-cli/examples/stack-full/stack-full.cabal +++ b/summoner-cli/examples/stack-full/stack-full.cabal @@ -1,4 +1,4 @@ -cabal-version: 3.10.3.0 +cabal-version: 3.0 name: stack-full version: 0.0.0.0 synopsis: Stack-only example with all integrations diff --git a/summoner-cli/src/Summoner/Default.hs b/summoner-cli/src/Summoner/Default.hs index 4b583e0..3077fad 100644 --- a/summoner-cli/src/Summoner/Default.hs +++ b/summoner-cli/src/Summoner/Default.hs @@ -12,6 +12,7 @@ This module contains some default values to use. module Summoner.Default ( defaultGHC , defaultCabal + , defaultCabalVersion , defaultStack , defaultLicenseName , defaultOwner @@ -48,6 +49,10 @@ defaultGHC = maxBound defaultCabal :: Text defaultCabal = "3.10.3.0" +-- | Default version of the Cabal specified in the *.cabal* file. +defaultCabalVersion :: Text +defaultCabalVersion = "3.0" + -- | Default version of the Stack. defaultStack :: Text defaultStack = "3.1.1" diff --git a/summoner-cli/src/Summoner/Template/Cabal.hs b/summoner-cli/src/Summoner/Template/Cabal.hs index 7f2fa22..f337003 100644 --- a/summoner-cli/src/Summoner/Template/Cabal.hs +++ b/summoner-cli/src/Summoner/Template/Cabal.hs @@ -16,7 +16,7 @@ module Summoner.Template.Cabal import Colourista (indent) import Summoner.CustomPrelude (CustomPrelude (..)) -import Summoner.Default (defaultCabal) +import Summoner.Default (defaultCabalVersion) import Summoner.GhcVer (cabalBaseVersions, showGhcVer) import Summoner.License (LicenseName (..)) import Summoner.Settings (Settings (..)) @@ -43,7 +43,7 @@ cabalFile Settings{..} = File (toString settingsRepo ++ ".cabal") cabalFileConte cabalHeader :: Text cabalHeader = unlines $ - [ "cabal-version: " <> defaultCabal + [ "cabal-version: " <> defaultCabalVersion , "name: " <> settingsRepo , "version: 0.0.0.0" , "synopsis: " <> settingsDescription From c5448dee1394752a442c275e3e9acc62bd211838 Mon Sep 17 00:00:00 2001 From: Veronika Romashkina Date: Mon, 28 Oct 2024 21:38:43 +0000 Subject: [PATCH 8/8] Update CI --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c3a323f..fa9b214 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,17 @@ jobs: - "9.2.4" - "9.4.8" - "9.6.6" + - "9.8.2" + - "9.10.1" exclude: + - os: macOS-latest + ghc: 9.6.6 + - os: macOS-latest + ghc: 9.4.8 + - os: macOS-latest + ghc: 9.2.4 + - os: macOS-latest + ghc: 9.0.2 - os: macOS-latest ghc: 8.10.7 - os: macOS-latest @@ -38,6 +48,15 @@ jobs: - os: macOS-latest ghc: 8.4.4 + + - os: windows-latest + ghc: 9.6.6 + - os: windows-latest + ghc: 9.4.8 + - os: windows-latest + ghc: 9.2.4 + - os: windows-latest + ghc: 9.0.2 - os: windows-latest ghc: 8.10.7 - os: windows-latest @@ -47,18 +66,6 @@ jobs: - os: windows-latest ghc: 8.4.4 - # On Windows 9.4 and 9.6 we get the following, so disabling - # them for now. - # - # ghc-9.6.6.exe: C:\sr\ghc-9.6.6\hashable-1.4.7.0-30c04c59e98d75fc2789d517f4b0591876c2983e\lib\libHShashable-1.4.7.0-30c04c59e98d75fc2789d517f4b0591876c2983e.a(#5:FFI.o): Not a x86_64 PE+ file. - # ghc-9.6.6.exe: Unknown COFF 4 type in getHeaderInfo. - # - # : error: - # loadArchive "C:\\sr\\ghc-9.6.6\\hashable-1.4.7.0-30c04c59e98d75fc2789d517f4b0591876c2983e\\lib\\libHShashable-1.4.7.0-30c04c59e98d75fc2789d517f4b0591876c2983e.a": failed - - os: windows-latest - ghc: 9.4.8 - - os: windows-latest - ghc: 9.6.6 steps: - uses: actions/checkout@v4 @@ -96,28 +103,28 @@ jobs: run: | cabal test all - - if: matrix.ghc == '9.6.6' + - if: matrix.ghc == '9.8.2' name: Build 'cabal-minimal' run: | cd "summoner-cli/examples/cabal-minimal/" echo "packages: ." > cabal.project cabal build all - - if: matrix.ghc == '9.6.6' + - if: matrix.ghc == '9.8.2' name: Build 'cabal-full' run: | cd "summoner-cli/examples/cabal-full/" echo "packages: ." > cabal.project cabal build all - - if: matrix.ghc == '9.6.6' + - if: matrix.ghc == '9.8.2' name: Build 'stack-full' run: | cd "summoner-cli/examples/stack-full/" echo "packages: ." > cabal.project cabal build all - - if: matrix.ghc == '9.6.6' + - if: matrix.ghc == '9.8.2' name: Build 'full-batteries' run: | cd "summoner-cli/examples/full-batteries/"