templatise 0.1.4.0 → 0.1.5.0
raw patch · 9 files changed
+132/−60 lines, 9 filesdep ~basedep ~filepathPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, filepath
API changes (from Hackage documentation)
Files
- .devcontainer/devcontainer.json +3/−2
- .github/workflows/haskell-ci.yml +0/−40
- .vscode/launch.json +46/−0
- .vscode/tasks.json +39/−0
- CHANGELOG.md +10/−0
- lib/initialise/File.hs +1/−0
- lib/initialise/Initialiser/Initialisers.hs +4/−2
- templatise.cabal +14/−12
- test/initialise/InitialiseSpec.hs +15/−4
.devcontainer/devcontainer.json view
@@ -4,7 +4,7 @@ // Features to add to the dev container. More info: https://containers.dev/features. "features": { "ghcr.io/devcontainers-contrib/features/haskell:2": {- "globalPackages": "cabal-fmt ormolu"+ "globalPackages": "cabal-fmt ormolu ghci-dap haskell-debug-adapter" }, "ghcr.io/devcontainers-contrib/features/pre-commit:2": {}, "ghcr.io/devcontainers/features/git:1": {},@@ -27,7 +27,8 @@ "github.vscode-github-actions", "GitHub.vscode-pull-request-github", "haskell.haskell",- "ms-azuretools.vscode-docker"+ "ms-azuretools.vscode-docker",+ "phoityne.phoityne-vscode" ] } },
.github/workflows/haskell-ci.yml view
@@ -58,46 +58,6 @@ compilerVersion: 9.6.1 setup-method: ghcup allow-failure: false- - compiler: ghc-9.4.8- compilerKind: ghc- compilerVersion: 9.4.8- setup-method: ghcup- allow-failure: false- - compiler: ghc-9.4.7- compilerKind: ghc- compilerVersion: 9.4.7- setup-method: ghcup- allow-failure: false- - compiler: ghc-9.4.6- compilerKind: ghc- compilerVersion: 9.4.6- setup-method: ghcup- allow-failure: false- - compiler: ghc-9.4.5- compilerKind: ghc- compilerVersion: 9.4.5- setup-method: ghcup- allow-failure: false- - compiler: ghc-9.4.4- compilerKind: ghc- compilerVersion: 9.4.4- setup-method: ghcup- allow-failure: false- - compiler: ghc-9.4.3- compilerKind: ghc- compilerVersion: 9.4.3- setup-method: ghcup- allow-failure: false- - compiler: ghc-9.4.2- compilerKind: ghc- compilerVersion: 9.4.2- setup-method: ghcup- allow-failure: false- - compiler: ghc-9.4.1- compilerKind: ghc- compilerVersion: 9.4.1- setup-method: ghcup- allow-failure: false fail-fast: false steps: - name: apt
+ .vscode/launch.json view
@@ -0,0 +1,46 @@+{+ // Use IntelliSense to learn about possible attributes.+ // Hover to view descriptions of existing attributes.+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387+ "version": "0.2.0",+ "configurations": [+ //{+ // "type": "ghc",+ // "request": "launch",+ // "name": "haskell(stack)",+ // "internalConsoleOptions": "openOnSessionStart",+ // "workspace": "${workspaceFolder}",+ // "startup": "${workspaceFolder}/test/Spec.hs",+ // "startupFunc": "",+ // "startupArgs": "",+ // "stopOnEntry": false,+ // "mainArgs": "",+ // "ghciPrompt": "H>>= ",+ // "ghciInitialPrompt": "> ",+ // "ghciCmd": "stack ghci --with-ghc=ghci-dap --test --no-load --no-build --main-is TARGET",+ // "ghciEnv": {},+ // "logFile": "${workspaceFolder}/.vscode/phoityne.log",+ // "logLevel": "WARNING",+ // "forceInspect": false+ //},+ {+ "type": "ghc",+ "request": "launch",+ "name": "haskell(cabal)",+ "internalConsoleOptions": "openOnSessionStart",+ "workspace": "${workspaceFolder}",+ "startup": "${workspaceFolder}/test/initialise/Main.hs",+ "startupFunc": "",+ "startupArgs": "",+ "stopOnEntry": false,+ "mainArgs": "",+ "ghciPrompt": "H>>= ",+ "ghciInitialPrompt": "> ",+ "ghciCmd": "cabal repl --with-compiler ghci-dap --repl-no-load --builddir=${workspaceFolder}/.vscode/dist-cabal-repl initialise-test",+ "ghciEnv": {},+ "logFile": "${workspaceFolder}/.vscode/initialise-test.log",+ "logLevel": "DEBUG",+ "forceInspect": false+ }+ ]+}
+ .vscode/tasks.json view
@@ -0,0 +1,39 @@++{+ // Automatically created by phoityne-vscode extension.++ "version": "2.0.0",+ "presentation": {+ "reveal": "always",+ "panel": "new"+ },+ "tasks": [+ {+ // F7+ "group": {+ "kind": "build",+ "isDefault": true+ },+ "label": "haskell build",+ "type": "shell",+ "command": "cabal configure && cabal build"+ },+ {+ // F6+ "group": "build",+ "type": "shell",+ "label": "haskell clean & build",+ "command": "cabal clean && cabal configure && cabal build"+ },+ {+ // F8+ "group": {+ "kind": "test",+ "isDefault": true+ },+ "type": "shell",+ "label": "haskell test",+ "command": "cabal test"+ }+ ]+}
CHANGELOG.md view
@@ -2,6 +2,16 @@ ## unreleased +## 0.1.5.0 -- 2024-06-09++### Added++* vscode configuration for debugging with cabal++### Removed++* Test GHC 9.4+ ## 0.1.4.0 -- 2024-06-01 ### Added
lib/initialise/File.hs view
@@ -32,4 +32,5 @@ . T.replace "templatise" name . T.replace "template-hs" name . T.replace "template.hs" name+ . T.replace "initialise" name $ contents
lib/initialise/Initialiser/Initialisers.hs view
@@ -13,9 +13,11 @@ defaultInitialiser = do mapM_ File.replace- [ ".devcontainer" </> "devcontainer.json",+ [ "CHANGELOG.md",+ ".devcontainer" </> "devcontainer.json", ".github" </> "workflows" </> "haskell-ci.yml",- "CHANGELOG.md"+ ".vscode" </> "launch.json",+ ".vscode" </> "tasks.json" ] Licence.replace "LICENSE" Cabal.replace "templatise.cabal"
templatise.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: templatise-version: 0.1.4.0+version: 0.1.5.0 license: Unlicense license-file: LICENSE copyright: (c) 2023 Alex Brandt@@ -17,12 +17,11 @@ have Haskell, VS Code devcontainers, and various GitHub actions ready to use. category: VSCode-tested-with:- GHC >=9.4 && <9.5 || >=9.6 && <9.7 || >=9.8 && <9.9 || >=9.10 && <9.11-+tested-with: GHC >=9.6 && <9.7 || >=9.8 && <9.9 || >=9.10 && <9.11 extra-source-files: .devcontainer/devcontainer.json .github/workflows/*.yml+ .vscode/*.json CHANGELOG.md README.md @@ -47,13 +46,13 @@ , network-uri ^>=2.6.4.1 || ^>=2.7.0.0 , optparse-applicative ^>=0.18.1.0 , process ^>=1.6.13.2- , regex-tdfa ^>=1.3.2.2 , text ^>=1.2.5.0 || ^>=2.0.1 || ^>=2.1 , time ^>=1.11.1.1 || ^>=1.12.2 || ^>=1.13 || ^>=1.14 ghc-options: -Wall -Werror=missing-fields -Werror=unused-imports- -Werror=unused-matches -Werror=unused-top-binds+ -Werror=unused-matches -Werror=unused-top-binds -Wunused-packages+ -Werror=unused-packages library initialise-library import: initialise-common@@ -76,8 +75,11 @@ , extra ^>=1.7.14 , http-client ^>=0.7.14 , http-conduit ^>=2.3.8.3- , parsec ^>=3.1.15.0+ , regex-tdfa ^>=1.3.2.2 + if impl(ghc <9.8)+ build-depends: parsec ^>=3.1.15.0+ hs-source-dirs: lib/initialise --default-extensions:@@ -85,7 +87,7 @@ default-language: Haskell2010 --build-tool-depends:---ghc-options: -Wall+--ghc-options: test-suite initialise-test import: initialise-common@@ -117,13 +119,12 @@ default-language: Haskell2010 -- build-tool-depends:- ghc-options: -threaded -Wall+ ghc-options: -threaded executable initialise main-is: Main.hs build-depends:- , base ^>=4.16.3.0 || ^>=4.17.0.0 || ^>=4.18.0.0 || ^>=4.19.0.0- , filepath ^>=1.4.2.2 || ^>=1.5.0+ , base ^>=4.16.3.0 || ^>=4.17.0.0 || ^>=4.18.0.0 || ^>=4.19.0.0 || ^>=4.20 , initialise-library , optparse-applicative ^>=0.18.1.0 @@ -134,4 +135,5 @@ default-language: Haskell2010 -- build-tool-depends:- ghc-options: -threaded -Wall+ ghc-options:+ -threaded -Wall -Wunused-packages -Werror=unused-packages
test/initialise/InitialiseSpec.hs view
@@ -10,7 +10,7 @@ import Hooks (withProjectCopy) import qualified Initialiser as SUT import Network.URI (parseURI)-import System.Directory (doesFileExist)+import System.Directory (doesDirectoryExist, doesFileExist) import System.FilePath ((</>)) import System.Process (readProcess) import Test.Hspec (Spec, describe, runIO, shouldNotReturn, shouldReturn)@@ -37,6 +37,15 @@ doesFileExist (p </> "templatise.cabal") `shouldReturn` False doesFileExist (p </> "sentinel.cabal") `shouldReturn` True + doesDirectoryExist (p </> "bin" </> "initialise") `shouldReturn` False+ doesFileExist (p </> "bin" </> "sentinel" </> "Main.hs") `shouldReturn` True++ doesDirectoryExist (p </> "lib" </> "initialise") `shouldReturn` False+ doesDirectoryExist (p </> "lib" </> "sentinel") `shouldReturn` True++ doesDirectoryExist (p </> "test" </> "initialise") `shouldReturn` False+ doesFileExist (p </> "test" </> "sentinel" </> "Main.hs") `shouldReturn` True+ grep ["MIT"] [p </> "LICENSE"] `shouldNotReturn` [] let ps =@@ -49,10 +58,12 @@ let fs = map (p </>)- [ ".devcontainer" </> "devcontainer.json",+ [ "CHANGELOG.md",+ ".devcontainer" </> "devcontainer.json", ".github" </> "workflows" </> "haskell-ci.yml",- "CHANGELOG.md",- "sentinel.cabal"+ "sentinel.cabal",+ ".vscode" </> "launch.json",+ ".vscode" </> "tasks.json" ] grep ps fs `shouldReturn` []