Skip to content

Upgrade to GHC 9.8.1 #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .devcontainer/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
{
"services": {
"devcontainer": {
"command": "sh -exc 'while sleep 1m; do :; done'",
"image": "public.ecr.aws/acilearning/haskell:9.6.2",
"command": "sleep infinity",
"image": "public.ecr.aws/acilearning/haskell:9.8.1",
"init": true,
"volumes": [
"..:/workspace",
"./volumes/cabal/cache:/home/vscode/.cache/cabal",
"./volumes/cabal/state:/home/vscode/.local/state/cabal",
"cabal-cache:/home/vscode/.cache/cabal",
"cabal-state:/home/vscode/.local/state/cabal",
],
"working_dir": "/workspace"
}
},
"volumes": {
"cabal-cache": null,
"cabal-state": {
"external": true
}
}
}
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
}
},
"dockerComposeFile": "compose.yaml",
"initializeCommand": "docker volume create cabal-state",
"postCreateCommand": "cabal update",
"postStartCommand": "git config --global --add safe.directory \"$PWD\"",
"service": "devcontainer",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"uses": "actions/checkout@v4"
},
{
"uses": "superfly/flyctl-actions/setup-flyctl@v1"
"uses": "superfly/flyctl-actions/setup-flyctl@fc53c09e1bc3be6f54706524e3b82c4f462f77be"
},
{
"env": {
Expand Down
45 changes: 20 additions & 25 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,16 @@
{
"run": "mkdir artifact"
},
{
"id": "artifact",
"run": "echo directory=artifact/${{ matrix.platform }} >> $GITHUB_OUTPUT",
"shell": "bash"
},
{
"run": "mkdir ${{ steps.artifact.outputs.directory }}"
},
{
"id": "haskell",
"uses": "haskell-actions/setup@v2",
"with": {
"cabal-version": "3.10.1.0",
"ghc-version": "9.6.2"
"cabal-version": "3.10.2.1",
"ghc-version": "9.8.1"
}
},
{
"run": "cabal sdist --output-dir ${{ steps.artifact.outputs.directory }}"
"run": "cabal sdist --output-dir artifact"
},
{
"run": "cabal configure --enable-optimization=2 --enable-tests --flags pedantic --jobs"
Expand All @@ -36,7 +28,7 @@
"run": "cat cabal.project.local"
},
{
"run": "cp cabal.project.local ${{ steps.artifact.outputs.directory }}"
"run": "cp cabal.project.local artifact"
},
{
"run": "cabal freeze"
Expand All @@ -45,13 +37,13 @@
"run": "cat cabal.project.freeze"
},
{
"run": "cp cabal.project.freeze ${{ steps.artifact.outputs.directory }}"
"run": "cp cabal.project.freeze artifact"
},
{
"run": "cabal outdated --v2-freeze-file cabal.project.freeze"
},
{
"uses": "actions/cache@v3",
"uses": "actions/cache@v4",
"with": {
"key": "${{ matrix.platform }}/${{ hashFiles('cabal.project.freeze') }}",
"path": "${{ steps.haskell.outputs.cabal-store }}",
Expand All @@ -68,18 +60,18 @@
"run": "cabal build"
},
{
"run": "cp $( cabal list-bin monadoc ) ${{ steps.artifact.outputs.directory }}"
"run": "cp $( cabal list-bin monadoc ) artifact"
},
{
"uses": "svenstaro/upx-action@v2",
"with": {
"file": "${{ steps.artifact.outputs.directory }}/monadoc${{ matrix.extension }}"
"files": "artifact/monadoc${{ matrix.extension }}"
}
},
{
"uses": "actions/upload-artifact@v3",
"uses": "actions/upload-artifact@v4",
"with": {
"name": "monadoc-${{ github.sha }}",
"name": "monadoc-${{ matrix.platform }}-${{ github.sha }}",
"path": "artifact"
}
},
Expand Down Expand Up @@ -139,17 +131,17 @@
"uses": "actions/checkout@v4"
},
{
"uses": "actions/download-artifact@v3",
"uses": "actions/download-artifact@v4",
"with": {
"name": "monadoc-${{ github.sha }}",
"name": "monadoc-ubuntu-${{ github.sha }}",
"path": "artifact"
}
},
{
"run": "cd artifact/ubuntu && tar xf monadoc-*.tar.gz"
"run": "cd artifact && tar xf monadoc-*.tar.gz"
},
{
"run": "mv artifact/ubuntu/monadoc-*/data artifact/ubuntu/monadoc docker"
"run": "mv artifact/monadoc-*/data artifact/monadoc docker"
},
{
"run": "chmod +x docker/monadoc"
Expand Down Expand Up @@ -191,7 +183,7 @@
"uses": "actions/checkout@v4"
},
{
"uses": "superfly/flyctl-actions/setup-flyctl@v1"
"uses": "superfly/flyctl-actions/setup-flyctl@fc53c09e1bc3be6f54706524e3b82c4f462f77be"
},
{
"env": {
Expand All @@ -212,7 +204,7 @@
{
"uses": "haskell-actions/hlint-setup@v2",
"with": {
"version": 3.6.1
"version": 3.8
}
},
{
Expand All @@ -231,7 +223,10 @@
"uses": "actions/checkout@v4"
},
{
"uses": "haskell-actions/run-ormolu@v14"
"uses": "haskell-actions/run-ormolu@v14",
"with": {
"version": "0.7.3.0"
}
}
]
}
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/.devcontainer/volumes/
/.vscode/
/cabal.project.*
/dist-newstyle/
Expand Down
35 changes: 18 additions & 17 deletions monadoc.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 3.0
name: monadoc
version: 0.2024.1.4
version: 0.2024.1.25
build-type: Simple
category: Documentation
data-dir: data
Expand Down Expand Up @@ -30,14 +30,15 @@ flag pedantic
manual: True

common library
build-depends: base ^>=4.18.0.0
build-depends: base ^>=4.19.0.0
default-language: Haskell2010
ghc-options:
-Weverything -Wno-all-missed-specialisations -Wno-implicit-prelude
-Wno-missed-specialisations -Wno-missing-deriving-strategies
-Wno-missing-export-lists -Wno-missing-exported-signatures
-Wno-missing-kind-signatures -Wno-missing-safe-haskell-mode
-Wno-prepositive-qualified-module -Wno-safe -Wno-unsafe
-Wno-missing-kind-signatures -Wno-missing-role-annotations
-Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module
-Wno-safe -Wno-unsafe

if flag(pedantic)
ghc-options: -Werror
Expand All @@ -53,47 +54,47 @@ library
build-depends:
, aeson ^>=2.2.1.0
, async ^>=2.2.5
, bytestring ^>=0.11.4.0
, Cabal-syntax ^>=3.10.1.0
, bytestring ^>=0.12.0.2
, Cabal-syntax ^>=3.10.2.0
, case-insensitive ^>=1.2.1.0
, containers ^>=0.6.7
, containers ^>=0.6.8
, crypton ^>=0.31
, direct-sqlite ^>=2.3.28
, direct-sqlite ^>=2.3.29
, directory ^>=1.3.8.1
, exceptions ^>=0.10.7
, filepath ^>=1.4.100.1
, filepath ^>=1.4.100.4
, formatting ^>=7.2.0
, haddock-library ^>=1.11.0
, hashable ^>=1.4.3.0
, hspec ^>=2.11.7
, http-client ^>=0.7.15
, http-client ^>=0.7.16
, http-client-tls ^>=0.3.6.3
, http-types ^>=0.12.4
, lucid2 ^>=0.0.20230706
, memory ^>=0.18.0
, monad-control ^>=1.0.3.1
, monad-loops ^>=0.4.3
, network-uri ^>=2.6.4.2
, patrol ^>=1.0.0.6
, patrol ^>=1.0.0.7
, QuickCheck ^>=2.14.3
, random ^>=1.2.1.1
, resource-pool ^>=0.4.0.0
, saturn:{saturn, spec} ^>=1.0.0.3
, say ^>=0.1.0.1
, sqlite-simple ^>=0.4.18.2
, stm ^>=2.5.1.0
, sqlite-simple ^>=0.4.19.0
, stm ^>=2.5.2.1
, tar ^>=0.6.0.0
, temporary ^>=1.3
, text ^>=2.0.2
, text ^>=2.1
, time ^>=1.12.2
, transformers ^>=0.6.1.0
, uuid ^>=1.3.15
, vault ^>=0.3.1.5
, wai ^>=3.2.4
, wai-extra ^>=3.1.13.0
, wai-extra ^>=3.1.14
, wai-middleware-static ^>=0.9.2
, warp ^>=3.3.31
, witch ^>=1.2.0.3
, warp ^>=3.4.0
, witch ^>=1.2.0.4
, zlib ^>=0.6.3.0

default-extensions:
Expand Down
8 changes: 4 additions & 4 deletions source/library/Monadoc/Model/Blob.hs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ migrations =
]

new :: ByteString.ByteString -> Blob
new contents =
new c =
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like perhaps a GHC bug. The contents argument should be unambiguous here.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a different module, but the warning I'm seeing is here: https://github.com/tfausak/monadoc/actions/runs/7648996583/job/20842674703#step:18:74

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blob
{ contents = contents,
hash = Hash.new contents,
size = ByteString.length contents
{ contents = c,
hash = Hash.new c,
size = ByteString.length c
}
6 changes: 3 additions & 3 deletions source/library/Monadoc/Type/ComponentId.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ data ComponentId = ComponentId
instance Witch.TryFrom String ComponentId where
tryFrom = Witch.maybeTryFrom $ \string -> do
let (before, after) = break ((==) ':') string
type_ <- Either.hush $ Witch.tryFrom before
name <- Either.hush . Witch.tryFrom $ drop 1 after
pure ComponentId {type_ = type_, name = name}
t <- Either.hush $ Witch.tryFrom before
n <- Either.hush . Witch.tryFrom $ drop 1 after
pure ComponentId {type_ = t, name = n}

instance Witch.TryFrom Text.Text ComponentId where
tryFrom = Witch.eitherTryFrom $ Witch.tryFrom . Witch.into @String
Expand Down