Skip to content

Commit

Permalink
[#401] Support GHC-8.8.2 (#405)
Browse files Browse the repository at this point in the history
* [#401] Support GHC-8.8.2

Resolves #401

* Update lts-14.27, update brick dep, improve show table
  • Loading branch information
vrom911 authored Feb 19, 2020
1 parent d510ada commit 1482bdb
Show file tree
Hide file tree
Showing 19 changed files with 40 additions and 57 deletions.
17 changes: 5 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ matrix:
- ghc: 8.2.2
- ghc: 8.4.4
- ghc: 8.6.5
- ghc: 8.8.1
- ghc: 8.8.2

# Stack, linux

- ghc: 8.6.5
- ghc: 8.8.2
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack.yaml" DEPLOY=yes
- ghc: 8.8.1
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-nightly.yaml" DEPLOY=no

# Disabled because of Travis bugs
# # macOS build
Expand All @@ -39,8 +37,8 @@ install:

- |
if [ -z "$STACK_YAML" ]; then
cabal new-update
cabal new-build all --enable-tests --enable-benchmarks
cabal v2-update
cabal v2-build all --enable-tests --enable-benchmarks
else
# install stack
curl -sSL https://get.haskellstack.org/ | sh
Expand All @@ -53,7 +51,7 @@ install:
script:
- |
if [ -z "$STACK_YAML" ]; then
cabal new-test all --enable-tests
cabal v2-test all --enable-tests
echo "Testing that generated projects are built with cabal..."
cd "$TRAVIS_BUILD_DIR/summoner-cli/test/golden/smallProject/"
Expand Down Expand Up @@ -95,8 +93,3 @@ deploy:

notifications:
email: false
slack:
rooms:
- kowainik:n60CMbB0kfJHRmYKIPmjf7Tp
on_success: change
on_failure: always
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ The changelog is available [on GitHub][2].
Add `GitHub Actions` button into TUI.
Add `githubActions` to the TOML configs.
(by [patrickt](https://github.com/patrickt), [@vrom911](https://github.com/vrom911))
* [#401](https://github.com/kowainik/summoner/issues/401):
Support GHC-8.8.2 in the project.
Make GHC-8.8.2 default for the generated projects.
* Upgrade GHC-8.6.5 LTS to `14.27`.
* __#TUI__ Allow `brick-0.52`.

## 1.4.0.0 – Dec 25, 2019 🎅

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ Here is the list of the options that can be configured to suit your needs. If op
| `fullName` | Text | Full name. |
| `email` | Text | E-mail address. |
| `license` | License | One of: `MIT`, `BSD2`, `BSD3`, `GPL-2`, `GPL-3`, `LGPL-2.1`, `LGPL-3`, `AGPL-3`, `Apache-2.0`, `MPL-2.0`, `None`. |
| `ghcVersions` | [GHC] | `summoner` uses default `GHC-8.8.1`. However, additionally you can specify other versions. For each version `x.y.z` the `stack-x.y.z.yaml` will be created. |
| `ghcVersions` | [GHC] | `summoner` uses default `GHC-8.8.2`. However, additionally you can specify other versions. For each version `x.y.z` the `stack-x.y.z.yaml` will be created. |
| `github` | Bool | Turn on `GitHub` integration by default? |
| `gitignore` | [Text] | List of files you want added to the default `.gitignore`. (Ignored if `github = false`) |
| `noUpload` | Bool | Do not upload to GitHub, but create all GitHub related files if specified (Ignored if `github = false`) |
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ environment:
CABOPTS: --store-dir=C:\\SR

matrix:
- GHCVER: 8.6.5
- GHCVER: 8.8.2

install:
- choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2
- choco install -y cabal --version 2.4.1.0
- choco install -y ghc --version 8.6.5
- choco install -y ghc --version 8.8.2
- refreshenv

before_build:
Expand Down
11 changes: 0 additions & 11 deletions stack-nightly.yaml

This file was deleted.

6 changes: 1 addition & 5 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
resolver: lts-14.12
resolver: lts-15.0

packages:
- summoner-cli/
- summoner-tui/

extra-deps:
- ansi-terminal-0.10.3
- colourista-0.0.0.0
- optparse-applicative-0.15.0.0
- relude-0.6.0.0
- tomland-1.2.1.0
12 changes: 6 additions & 6 deletions summoner-cli/src/Summoner/GhcVer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ data GhcVer
| Ghc822
| Ghc844
| Ghc865
| Ghc881
| Ghc882
deriving stock (Eq, Ord, Show, Enum, Bounded)

-- | Converts 'GhcVer' into dot-separated string.
Expand All @@ -46,7 +46,7 @@ showGhcVer = \case
Ghc822 -> "8.2.2"
Ghc844 -> "8.4.4"
Ghc865 -> "8.6.5"
Ghc881 -> "8.8.1"
Ghc882 -> "8.8.2"

-- | These are old GHC versions that are not working with default GHC versions when using Stack.
oldGhcs :: [GhcVer]
Expand All @@ -62,8 +62,8 @@ latestLts = \case
Ghc802 -> "lts-9.21"
Ghc822 -> "lts-11.22"
Ghc844 -> "lts-12.26"
Ghc865 -> "lts-14.18"
Ghc881 -> "nightly-2019-12-25"
Ghc865 -> "lts-14.27"
Ghc882 -> "lts-15.0"

-- | Represents PVP versioning (4 numbers).
data Pvp = Pvp
Expand All @@ -85,7 +85,7 @@ baseVerPvp = \case
Ghc822 -> Pvp 4 10 1 0
Ghc844 -> Pvp 4 11 1 0
Ghc865 -> Pvp 4 12 0 0
Ghc881 -> Pvp 4 13 0 0
Ghc882 -> Pvp 4 13 0 0

-- | Returns corresponding @base@ version of the given GHC version.
baseVer :: GhcVer -> Text
Expand Down Expand Up @@ -144,4 +144,4 @@ formatGhcMeta GhcMeta{..} =
<> " "
<> T.justifyLeft 14 ' ' gmBase
<> " "
<> T.justifyLeft 18 ' ' gmResolver
<> gmResolver
2 changes: 1 addition & 1 deletion summoner-cli/src/Summoner/Template/Cabal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ cabalFile Settings{..} = File (toString settingsRepo ++ ".cabal") cabalFileConte
-Wmissing-export-lists
-Wpartial-fields
|]
<> memptyIfFalse (settingsTestedVersions `hasLeast` Ghc881)
<> memptyIfFalse (settingsTestedVersions `hasLeast` Ghc882)
"-Wmissing-deriving-strategies\n"
where
hasLeast :: [GhcVer] -> GhcVer -> Bool
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/summoner.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ extra-doc-files: README.md
tested-with: GHC == 8.2.2
, GHC == 8.4.4
, GHC == 8.6.5
, GHC == 8.8.1
, GHC == 8.8.2
extra-source-files:
test/golden/fullProject/*.yml
test/golden/fullProject/*.yaml
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/test/Test/Script.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ stackScript :: Text
stackScript = [text|
#!/usr/bin/env stack
{- stack
--resolver lts-14.18
--resolver lts-14.27
script
--package base
-}
Expand Down
12 changes: 6 additions & 6 deletions summoner-cli/test/Test/Show.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ showCommandSpec = describe "show command golden tests" $

goldenGhcTable :: [Text]
goldenGhcTable =
[ "GHC-7.10.3 base-4.8.0.2 lts-6.35 "
, "GHC-8.0.2 base-4.9.1.0 lts-9.21 "
, "GHC-8.2.2 base-4.10.1.0 lts-11.22 "
, "GHC-8.4.4 base-4.11.1.0 lts-12.26 "
, "GHC-8.6.5 base-4.12.0.0 lts-14.18 "
, "GHC-8.8.1 base-4.13.0.0 nightly-2019-12-25"
[ "GHC-7.10.3 base-4.8.0.2 lts-6.35"
, "GHC-8.0.2 base-4.9.1.0 lts-9.21"
, "GHC-8.2.2 base-4.10.1.0 lts-11.22"
, "GHC-8.4.4 base-4.11.1.0 lts-12.26"
, "GHC-8.6.5 base-4.12.0.0 lts-14.27"
, "GHC-8.8.2 base-4.13.0.0 lts-15.0"
]
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-16.04
strategy:
matrix:
ghc: ["8.0.2", "8.2.2", "8.4.4", "8.6.5", "8.8.1"]
ghc: ["8.0.2", "8.2.2", "8.4.4", "8.6.5", "8.8.2"]
cabal: ["3.0"]

steps:
Expand Down
4 changes: 2 additions & 2 deletions summoner-cli/test/golden/fullProject/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ matrix:
- ghc: 8.2.2
- ghc: 8.4.4
- ghc: 8.6.5
- ghc: 8.8.1
- ghc: 8.8.2

- ghc: 8.2.2
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-8.2.2.yaml"
Expand All @@ -29,7 +29,7 @@ matrix:
- ghc: 8.6.5
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-8.6.5.yaml"

- ghc: 8.8.1
- ghc: 8.8.2
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack.yaml"

install:
Expand Down
4 changes: 2 additions & 2 deletions summoner-cli/test/golden/fullProject/appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ environment:
CABOPTS: --store-dir=C:\\SR

matrix:
- GHCVER: 8.8.1
- GHCVER: 8.8.2

install:
- choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2
- choco install -y cabal --version 2.4.1.0
- choco install -y ghc --version 8.8.1
- choco install -y ghc --version 8.8.2
- refreshenv

before_build:
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/test/golden/fullProject/fullProject.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tested-with: GHC == 8.0.2
, GHC == 8.2.2
, GHC == 8.4.4
, GHC == 8.6.5
, GHC == 8.8.1
, GHC == 8.8.2

source-repository head
type: git
Expand Down
2 changes: 1 addition & 1 deletion summoner-cli/test/golden/fullProject/stack-8.6.5.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
resolver: lts-14.18
resolver: lts-14.27

extra-deps: [base-noprelude-4.12.0.0]
2 changes: 1 addition & 1 deletion summoner-cli/test/golden/fullProject/stack.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
resolver: nightly-2019-12-25
resolver: lts-15.0

extra-deps: [base-noprelude-4.13.0.0]
2 changes: 1 addition & 1 deletion summoner-cli/test/golden/smallProject/smallProject.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ copyright: 2018 Kowainik
build-type: Simple
extra-doc-files: README.md
, CHANGELOG.md
tested-with: GHC == 8.8.1
tested-with: GHC == 8.8.2

executable smallProject
hs-source-dirs: app
Expand Down
4 changes: 2 additions & 2 deletions summoner-tui/summoner-tui.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ extra-doc-files: README.md
tested-with: GHC == 8.2.2
, GHC == 8.4.4
, GHC == 8.6.5
, GHC == 8.8.1
, GHC == 8.8.2

source-repository head
type: git
Expand Down Expand Up @@ -74,7 +74,7 @@ library
autogen-modules: Paths_summoner_tui
other-modules: Paths_summoner_tui

build-depends: brick >= 0.47 && < 0.51
build-depends: brick >= 0.47 && < 0.53
, directory ^>= 1.3.0.2
, filepath ^>= 1.4.1.2
, microlens ^>= 0.4
Expand Down

0 comments on commit 1482bdb

Please sign in to comment.