diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a43d17b..fa9b214 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" @@ -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,21 +66,9 @@ 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@v3 + - uses: actions/checkout@v4 - uses: haskell/actions/setup@v2 id: setup-haskell-cabal @@ -78,7 +85,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 }} @@ -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/" @@ -129,11 +136,11 @@ 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 + - uses: actions/checkout@v4 - uses: haskell/actions/setup@v2 name: Setup Haskell Stack @@ -141,7 +148,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/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 diff --git a/summoner-cli/examples/cabal-full/.github/workflows/ci.yml b/summoner-cli/examples/cabal-full/.github/workflows/ci.yml index ea46534..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.0"] + cabal: ["3.10.3.0"] ghc: - "8.4.4" - "8.6.5" @@ -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 @@ -57,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: @@ -74,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 7e6a195..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.0" +cabal: "3.10.3.0" cache: directories: @@ -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..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.0"] + cabal: ["3.10.3.0"] ghc: - "8.0.2" - "8.2.2" @@ -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 @@ -67,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: @@ -84,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 }} @@ -112,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" @@ -124,18 +129,19 @@ jobs: - "9.2.8" - "9.4.8" - "9.6.6" + - "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 e46b20c..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.0" +cabal: "3.10.3.0" cache: directories: @@ -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..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" @@ -25,18 +25,19 @@ jobs: - "9.2.8" - "9.4.8" - "9.6.6" + - "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 dc24183..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.0" +cabal: "3.10.3.0" cache: directories: @@ -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/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-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/Default.hs b/summoner-cli/src/Summoner/Default.hs index ff004cc..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 @@ -46,11 +47,15 @@ defaultGHC = maxBound -- | Default version of the Cabal. defaultCabal :: Text -defaultCabal = "3.0" +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 = "2.7.3" +defaultStack = "3.1.1" defaultLicenseName :: LicenseName defaultLicenseName = MIT @@ -74,13 +79,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 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..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 @@ -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/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-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 b236b63..9b2db8c 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,8 @@ library , microlens-th ^>= 0.4 , summoner ^>= 2.0.0.0 , validation-selective >= 0.0.0.0 && < 0.3 - , vty >= 5.36 && < 6.0 + , vty >= 6.0 && < 6.3 + , vty-crossplatform >= 0.2 && < 0.3 executable summon-tui import: common-options