ci: ghc 9.6.3 (#3328)

This commit is contained in:
Evgeny Poberezkin
2023-11-08 12:50:56 +00:00
committed by GitHub
parent 8722d35278
commit d233d07ddc
6 changed files with 29 additions and 38 deletions

View File

@@ -81,7 +81,7 @@ jobs:
- name: Setup Haskell
uses: haskell-actions/setup@v2
with:
ghc-version: "9.6.2"
ghc-version: "9.6.3"
cabal-version: "3.10.1.0"
- name: Cache dependencies

View File

@@ -8,11 +8,11 @@ RUN a=$(arch); curl https://downloads.haskell.org/~ghcup/$a-linux-ghcup -o /usr/
chmod +x /usr/bin/ghcup
# Install ghc
RUN ghcup install ghc 9.6.2
RUN ghcup install ghc 9.6.3
# Install cabal
RUN ghcup install cabal 3.10.1.0
# Set both as default
RUN ghcup set ghc 9.6.2 && \
RUN ghcup set ghc 9.6.3 && \
ghcup set cabal 3.10.1.0
COPY . /project

View File

@@ -102,7 +102,7 @@ DOCKER_BUILDKIT=1 docker build --output ~/.local/bin .
#### In any OS
1. Install [Haskell GHCup](https://www.haskell.org/ghcup/), GHC 9.6.2 and cabal 3.10.1.0:
1. Install [Haskell GHCup](https://www.haskell.org/ghcup/), GHC 9.6.3 and cabal 3.10.1.0:
```shell
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh

View File

@@ -30,29 +30,29 @@ You will have to add `/opt/homebrew/opt/openssl@1.1/bin` to your PATH in order t
**In simplex-chat repo**
- `stable` - stable release of the apps, can be used for updates to the previous stable release (GHC 9.6.2).
- `stable` - stable release of the apps, can be used for updates to the previous stable release (GHC 9.6.3).
- `stable-android` - used to build stable Android core library with Nix (GHC 8.10.7).
- `stable-android` - used to build stable Android core library with Nix (GHC 8.10.7) - only for Android armv7a.
- `stable-ios` - used to build stable iOS core library with Nix (GHC 8.10.7) this branch should be the same as `stable-android` except Nix configuration files.
- `stable-ios` - used to build stable iOS core library with Nix (GHC 8.10.7) this branch should be the same as `stable-android` except Nix configuration files. Deprecated.
- `master` - branch for beta version releases (GHC 9.6.2).
- `master` - branch for beta version releases (GHC 9.6.3).
- `master-ghc8107` - branch for beta version releases (GHC 8.10.7).
- `master-ghc8107` - branch for beta version releases (GHC 8.10.7). Deprecated.
- `master-android` - used to build beta Android core library with Nix (GHC 8.10.7), same as `master-ghc8107`
- `master-android` - used to build beta Android core library with Nix (GHC 8.10.7) - only for Android armv7a.
- `master-ios` - used to build beta iOS core library with Nix (GHC 8.10.7).
- `master-ios` - used to build beta iOS core library with Nix (GHC 8.10.7). Deprecated.
- `windows-ghc8107` - branch for windows core library build (GHC 8.10.7).
- `windows-ghc8107` - branch for windows core library build (GHC 8.10.7). Deprecated?
`master-ios` and `windows-ghc8107` branches should be the same as `master-ghc8107` except Nix configuration files.
**In simplexmq repo**
- `master` - uses GHC 9.6.2 its commit should be used in `master` branch of simplex-chat repo.
- `master` - uses GHC 9.6.3 its commit should be used in `master` branch of simplex-chat repo.
- `master-ghc8107` - its commit should be used in `master-android` (and `master-ios`) branch of simplex-chat repo.
- `master-ghc8107` - its commit should be used in `master-android` (and `master-ios`) branch of simplex-chat repo. Deprecated.
## Development & release process
@@ -61,53 +61,44 @@ You will have to add `/opt/homebrew/opt/openssl@1.1/bin` to your PATH in order t
2. If simplexmq repo was changed, to build mobile core libraries you need to merge its `master` branch into `master-ghc8107` branch.
3. To build core libraries for Android, iOS and windows:
- merge `master` branch to `master-ghc8107` branch.
- update `simplexmq` commit in `master-ghc8107` branch to the commit in `master-ghc8107` branch (probably, when resolving merge conflicts).
- merge `master` branch to `master-android` branch.
- update code to be compatible with GHC 8.10.7 (see below).
- push to GitHub.
4. To build Android core library, merge `master-ghc8107` branch to `master-android` branch, and push to GitHub.
4. All libraries should be built from `master` branch, Android armv7a - from `master-android` branch.
5. To build iOS core library, merge `master-ghc8107` branch to `master-ios` branch, and push to GitHub.
5. To build Desktop and CLI apps, make tag in `master` branch, APK files should be attached to the release.
6. To build windows core library, merge `master-ghc8107` branch to `windows-ghc8107` branch, and push to GitHub.
7. To build Desktop and CLI apps, make tag in `master` branch, APK files should be attached to the release.
8. After the public release to App Store and Play Store, merge:
6. After the public release to App Store and Play Store, merge:
- `master` to `stable`
- `master` to `master-ghc8107` (and compile/update code)
- `master-ghc8107` to `master-android`
- `master-ghc8107` to `master-ios`
- `master-ghc8107` to `windows-ghc8107`
- `master` to `master-android` (and compile/update code)
- `master-android` to `stable-android`
- `master-ios` to `stable-ios`
9. Independently, `master` branch of simplexmq repo should be merged to `stable` branch on stable releases.
7. Independently, `master` branch of simplexmq repo should be merged to `stable` branch on stable releases.
## Differences between GHC 8.10.7 and GHC 9.6.2
## Differences between GHC 8.10.7 and GHC 9.6.3
1. The main difference is related to `DuplicateRecordFields` extension.
It is no longer possible in GHC 9.6.2 to specify type when using selectors, instead OverloadedRecordDot extension and syntax are used that need to be removed in GHC 8.10.7:
It is no longer possible in GHC 9.6.3 to specify type when using selectors, instead OverloadedRecordDot extension and syntax are used that need to be removed in GHC 8.10.7:
```haskell
{-# LANGUAGE DuplicateRecordFields #-}
-- use this in GHC 9.6.2 when needed
-- use this in GHC 9.6.3 when needed
{-# LANGUAGE OverloadedRecordDot #-}
-- GHC 9.6.2 syntax
-- GHC 9.6.3 syntax
let x = record.field
-- GHC 8.10.7 syntax removed in GHC 9.6.2
-- GHC 8.10.7 syntax removed in GHC 9.6.3
let x = field (record :: Record)
```
It is still possible to specify type when using record update syntax, use this pragma to suppress compiler warning:
```haskell
-- use this in GHC 9.6.2 when needed
-- use this in GHC 9.6.3 when needed
{-# OPTIONS_GHC -fno-warn-ambiguous-fields #-}
let r' = (record :: Record) {field = value}
@@ -116,7 +107,7 @@ let r' = (record :: Record) {field = value}
2. Most monad functions now have to be imported from `Control.Monad`, and not from specific monad modules (e.g. `Control.Monad.Except`).
```haskell
-- use this in GHC 9.6.2 when needed
-- use this in GHC 9.6.3 when needed
import Control.Monad
```

View File

@@ -8,7 +8,7 @@ function readlink() {
OS=linux
ARCH=${1:-`uname -a | rev | cut -d' ' -f2 | rev`}
GHC_VERSION=9.6.2
GHC_VERSION=9.6.3
if [ "$ARCH" == "aarch64" ]; then
COMPOSE_ARCH=arm64

View File

@@ -5,7 +5,7 @@ set -e
OS=mac
ARCH="${1:-`uname -a | rev | cut -d' ' -f1 | rev`}"
COMPOSE_ARCH=$ARCH
GHC_VERSION=9.6.2
GHC_VERSION=9.6.3
if [ "$ARCH" == "arm64" ]; then
ARCH=aarch64