diff --git a/.travis.yml b/.travis.yml index 6ed0719c..5aac6660 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,11 +17,11 @@ matrix: # Cabal, linux - ghc: 8.2.2 - ghc: 8.4.4 - - ghc: 8.6.4 + - ghc: 8.6.5 # Stack, linux - - ghc: 8.6.4 + - ghc: 8.6.5 env: STACK_YAML="$TRAVIS_BUILD_DIR/stack.yaml" DEPLOY=yes # Disabled because of Travis bugs diff --git a/README.md b/README.md index 3d740faa..22dd92f9 100644 --- a/README.md +++ b/README.md @@ -323,7 +323,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.6.4`. 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.6.5`. 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`) | diff --git a/stack.yaml b/stack.yaml index 5ede688c..60c46ac3 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-13.19 +resolver: lts-13.27 packages: - summoner-cli/ diff --git a/summoner-cli/CHANGELOG.md b/summoner-cli/CHANGELOG.md index dbc1b490..54f3aa04 100644 --- a/summoner-cli/CHANGELOG.md +++ b/summoner-cli/CHANGELOG.md @@ -16,6 +16,10 @@ The changelog is available [on GitHub][2]. * [#328](https://github.com/kowainik/summoner/issues/328): Upgrade `tomland` bounds to allow `1.1.0.0`. * Add `stack.yaml.lock` to `.gitignore` file in the generated project. +* [#318](https://github.com/kowainik/summoner/issues/318): + Support GHC `8.6.5` in generated projects. Use GHC `8.6.5` in Summoner. +* Remove support of GHC `8.6.4`, `8.6.3`, `8.4.3`. Leave only the latest + versions of each major release. ## 1.3.0.1 — Apr 10, 2019 diff --git a/summoner-cli/src/Summoner/GhcVer.hs b/summoner-cli/src/Summoner/GhcVer.hs index 69b4181b..a3072af0 100644 --- a/summoner-cli/src/Summoner/GhcVer.hs +++ b/summoner-cli/src/Summoner/GhcVer.hs @@ -22,26 +22,20 @@ import qualified Text.Show as Show -- | Represents some selected set of GHC versions. data GhcVer = Ghc7103 - | Ghc801 | Ghc802 | Ghc822 - | Ghc843 | Ghc844 - | Ghc863 - | Ghc864 + | Ghc865 deriving (Eq, Ord, Show, Enum, Bounded) -- | Converts 'GhcVer' into dot-separated string. showGhcVer :: GhcVer -> Text showGhcVer = \case Ghc7103 -> "7.10.3" - Ghc801 -> "8.0.1" Ghc802 -> "8.0.2" Ghc822 -> "8.2.2" - Ghc843 -> "8.4.3" Ghc844 -> "8.4.4" - Ghc863 -> "8.6.3" - Ghc864 -> "8.6.4" + Ghc865 -> "8.6.5" -- | These are old GHC versions that are not working with default GHC versions when using Stack. oldGhcs :: [GhcVer] @@ -54,13 +48,10 @@ parseGhcVer = inverseMap showGhcVer latestLts :: GhcVer -> Text latestLts = \case Ghc7103 -> "6.35" - Ghc801 -> "7.24" Ghc802 -> "9.21" Ghc822 -> "11.22" - Ghc843 -> "12.14" Ghc844 -> "12.26" - Ghc863 -> "13.11" - Ghc864 -> "13.16" + Ghc865 -> "13.27" -- | Represents PVP versioning (4 numbers). data Pvp = Pvp @@ -78,13 +69,10 @@ instance Show Pvp where baseVerPvp :: GhcVer -> Pvp baseVerPvp = \case Ghc7103 -> Pvp 4 8 0 2 - Ghc801 -> Pvp 4 9 0 0 Ghc802 -> Pvp 4 9 1 0 Ghc822 -> Pvp 4 10 1 0 - Ghc843 -> Pvp 4 11 1 0 Ghc844 -> Pvp 4 11 1 0 - Ghc863 -> Pvp 4 12 0 0 - Ghc864 -> Pvp 4 12 0 0 + Ghc865 -> Pvp 4 12 0 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 01419dc7..f106dbd3 100644 --- a/summoner-cli/src/Summoner/Template/Cabal.hs +++ b/summoner-cli/src/Summoner/Template/Cabal.hs @@ -60,7 +60,10 @@ cabalFile Settings{..} = File (toString settingsRepo ++ ".cabal") cabalFileConte libModuleName = packageToModule settingsRepo testedGhcs :: Text - testedGhcs = intercalateMap ", " (mappend "GHC == " . showGhcVer) settingsTestedVersions + testedGhcs = intercalateMap + ("\n" <> T.replicate 19 " " <> ", ") + (mappend "GHC == " . showGhcVer) + settingsTestedVersions sourceRepository :: Text sourceRepository = @@ -188,11 +191,11 @@ cabalFile Settings{..} = File (toString settingsRepo ++ ".cabal") cabalFileConte versionGhcOptions :: Text versionGhcOptions - = memptyIfFalse (settingsTestedVersions `hasLeast` Ghc801) + = memptyIfFalse (settingsTestedVersions `hasLeast` Ghc802) "-Wredundant-constraints\n" <> memptyIfFalse (settingsTestedVersions `hasLeast` Ghc822) "-fhide-source-paths\n" - <> memptyIfFalse (settingsTestedVersions `hasLeast` Ghc843) + <> memptyIfFalse (settingsTestedVersions `hasLeast` Ghc844) [text| -Wmissing-export-lists -Wpartial-fields diff --git a/summoner-cli/src/Summoner/Template/Doc.hs b/summoner-cli/src/Summoner/Template/Doc.hs index 2ee4d91d..3faf8557 100644 --- a/summoner-cli/src/Summoner/Template/Doc.hs +++ b/summoner-cli/src/Summoner/Template/Doc.hs @@ -26,13 +26,13 @@ docFiles Settings{..} = readme = unlines $ [ "# " <> settingsRepo , "" - , hackage ] - ++ [licenseBadge | hasLicense] - ++ [stackLtsBadge | settingsStack] - ++ [stackNightlyBadge | settingsStack] ++ [travisBadge | settingsTravis] ++ [appVeyorBadge | settingsAppVeyor] + ++ [hackage] + ++ [stackLtsBadge | settingsStack] + ++ [stackNightlyBadge | settingsStack] + ++ [licenseBadge | hasLicense] ++ ["" , settingsDescription ] diff --git a/summoner-cli/summoner.cabal b/summoner-cli/summoner.cabal index a5c063cf..3fdc96ec 100644 --- a/summoner-cli/summoner.cabal +++ b/summoner-cli/summoner.cabal @@ -18,7 +18,7 @@ extra-doc-files: README.md , CHANGELOG.md tested-with: GHC == 8.2.2 , GHC == 8.4.4 - , GHC == 8.6.4 + , GHC == 8.6.5 extra-source-files: test/golden/fullProject/*.yml test/golden/fullProject/*.yaml diff --git a/summoner-cli/test/Test/Script.hs b/summoner-cli/test/Test/Script.hs index aa988c8b..599d84e3 100644 --- a/summoner-cli/test/Test/Script.hs +++ b/summoner-cli/test/Test/Script.hs @@ -17,7 +17,7 @@ scriptSpec = describe "script golden tests" $ do it "correctly creates cabal script" $ scriptFile Ghc844 Cabal `shouldBe` cabalScript it "correctly creates stack script" $ - scriptFile Ghc864 Stack `shouldBe` stackScript + scriptFile Ghc865 Stack `shouldBe` stackScript cabalScript :: Text cabalScript = [text| @@ -35,7 +35,7 @@ stackScript :: Text stackScript = [text| #!/usr/bin/env stack {- stack - --resolver lts-13.16 + --resolver lts-13.27 script --package base -} diff --git a/summoner-cli/test/golden/fullProject/.travis.yml b/summoner-cli/test/golden/fullProject/.travis.yml index 17962a57..76ca11ea 100644 --- a/summoner-cli/test/golden/fullProject/.travis.yml +++ b/summoner-cli/test/golden/fullProject/.travis.yml @@ -17,7 +17,7 @@ matrix: - ghc: 8.0.2 - ghc: 8.2.2 - ghc: 8.4.4 - - ghc: 8.6.4 + - ghc: 8.6.5 - ghc: 8.2.2 env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-8.2.2.yaml" @@ -25,7 +25,7 @@ matrix: - ghc: 8.4.4 env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-8.4.4.yaml" - - ghc: 8.6.4 + - ghc: 8.6.5 env: STACK_YAML="$TRAVIS_BUILD_DIR/stack.yaml" install: diff --git a/summoner-cli/test/golden/fullProject/README.md b/summoner-cli/test/golden/fullProject/README.md index 0d4f0514..eae1173f 100644 --- a/summoner-cli/test/golden/fullProject/README.md +++ b/summoner-cli/test/golden/fullProject/README.md @@ -1,10 +1,10 @@ # fullProject +[![Build status](https://img.shields.io/travis/kowainik/fullProject.svg?logo=travis)](https://travis-ci.org/kowainik/fullProject) +[![Windows build status](https://ci.appveyor.com/api/projects/status/github/kowainik/fullProject?branch=master&svg=true)](https://ci.appveyor.com/project/kowainik/fullProject) [![Hackage](https://img.shields.io/hackage/v/fullProject.svg?logo=haskell)](https://hackage.haskell.org/package/fullProject) -[![MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Stackage Lts](http://stackage.org/package/fullProject/badge/lts)](http://stackage.org/lts/package/fullProject) [![Stackage Nightly](http://stackage.org/package/fullProject/badge/nightly)](http://stackage.org/nightly/package/fullProject) -[![Build status](https://img.shields.io/travis/kowainik/fullProject.svg?logo=travis)](https://travis-ci.org/kowainik/fullProject) -[![Windows build status](https://ci.appveyor.com/api/projects/status/github/kowainik/fullProject?branch=master&svg=true)](https://ci.appveyor.com/project/kowainik/fullProject) +[![MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) Full test project diff --git a/summoner-cli/test/golden/fullProject/fullProject.cabal b/summoner-cli/test/golden/fullProject/fullProject.cabal index 8dff0b1d..537e0667 100644 --- a/summoner-cli/test/golden/fullProject/fullProject.cabal +++ b/summoner-cli/test/golden/fullProject/fullProject.cabal @@ -14,7 +14,10 @@ category: Testing build-type: Simple extra-doc-files: README.md , CHANGELOG.md -tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.4 +tested-with: GHC == 8.0.2 + , GHC == 8.2.2 + , GHC == 8.4.4 + , GHC == 8.6.5 source-repository head type: git diff --git a/summoner-cli/test/golden/fullProject/stack.yaml b/summoner-cli/test/golden/fullProject/stack.yaml index 58d40a52..0b60fc09 100644 --- a/summoner-cli/test/golden/fullProject/stack.yaml +++ b/summoner-cli/test/golden/fullProject/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-13.16 +resolver: lts-13.27 extra-deps: [base-noprelude-4.12.0.0] diff --git a/summoner-cli/test/golden/smallProject/smallProject.cabal b/summoner-cli/test/golden/smallProject/smallProject.cabal index 8ce59f70..ab630073 100644 --- a/summoner-cli/test/golden/smallProject/smallProject.cabal +++ b/summoner-cli/test/golden/smallProject/smallProject.cabal @@ -10,7 +10,7 @@ copyright: 2018 Kowainik build-type: Simple extra-doc-files: README.md , CHANGELOG.md -tested-with: GHC == 8.6.4 +tested-with: GHC == 8.6.5 executable smallProject hs-source-dirs: app diff --git a/summoner-tui/summoner-tui.cabal b/summoner-tui/summoner-tui.cabal index fb58c3e3..ab37bb0a 100644 --- a/summoner-tui/summoner-tui.cabal +++ b/summoner-tui/summoner-tui.cabal @@ -18,7 +18,7 @@ extra-doc-files: README.md , CHANGELOG.md tested-with: GHC == 8.2.2 , GHC == 8.4.4 - , GHC == 8.6.4 + , GHC == 8.6.5 source-repository head type: git