Skip to content

Commit

Permalink
core: revert build to use two branches (#4052)
Browse files Browse the repository at this point in the history
* Revert "scripts: ghc version update (#4010)"

This reverts commit 35b7f2c.

* Revert "Force include hs_init_with_rtsopts (#4028)"

This reverts commit 76a33a3.

* Revert "core: fix nix config (#4003)"

This reverts commit f8e6a78.

* Revert "ci: build armv7a with 8.10.7 in the main branches (master, stable) (#3733)"

This reverts commit 0d7a328.
  • Loading branch information
epoberezkin committed Apr 19, 2024
1 parent 925cb39 commit c8c81a8
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 109 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,22 @@ jobs:
ghc: "8.10.7"
cache_path: ~/.cabal/store
- os: ubuntu-20.04
ghc: "9.6.4"
ghc: "9.6.3"
cache_path: ~/.cabal/store
asset_name: simplex-chat-ubuntu-20_04-x86-64
desktop_asset_name: simplex-desktop-ubuntu-20_04-x86_64.deb
- os: ubuntu-22.04
ghc: "9.6.4"
ghc: "9.6.3"
cache_path: ~/.cabal/store
asset_name: simplex-chat-ubuntu-22_04-x86-64
desktop_asset_name: simplex-desktop-ubuntu-22_04-x86_64.deb
- os: macos-latest
ghc: "9.6.4"
ghc: "9.6.3"
cache_path: ~/.cabal/store
asset_name: simplex-chat-macos-x86-64
desktop_asset_name: simplex-desktop-macos-x86_64.dmg
- os: windows-latest
ghc: "9.6.4"
ghc: "9.6.3"
cache_path: C:/cabal
asset_name: simplex-chat-windows-x86-64
desktop_asset_name: simplex-desktop-windows-x86_64.msi
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM ubuntu:${TAG} AS build
RUN apt-get update && apt-get install -y curl git build-essential libgmp3-dev zlib1g-dev llvm-12 llvm-12-dev libnuma-dev libssl-dev

# Specify bootstrap Haskell versions
ENV BOOTSTRAP_HASKELL_GHC_VERSION=9.6.4
ENV BOOTSTRAP_HASKELL_GHC_VERSION=9.6.3
ENV BOOTSTRAP_HASKELL_CABAL_VERSION=3.10.1.0

# Install ghcup
Expand Down
2 changes: 1 addition & 1 deletion docs/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.4 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
Expand Down
20 changes: 10 additions & 10 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ 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.4).
- `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) - 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. Deprecated.

- `master` - branch for beta version releases (GHC 9.6.4).
- `master` - branch for beta version releases (GHC 9.6.3).

- `master-ghc8107` - branch for beta version releases (GHC 8.10.7). Deprecated.

Expand All @@ -50,7 +50,7 @@ You will have to add `/opt/homebrew/opt/openssl@1.1/bin` to your PATH in order t

**In simplexmq repo**

- `master` - uses GHC 9.6.4 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. Deprecated.

Expand All @@ -77,28 +77,28 @@ You will have to add `/opt/homebrew/opt/openssl@1.1/bin` to your PATH in order t
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.4
## 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.4 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.4 when needed
-- use this in GHC 9.6.3 when needed
{-# LANGUAGE OverloadedRecordDot #-}

-- GHC 9.6.4 syntax
-- GHC 9.6.3 syntax
let x = record.field

-- GHC 8.10.7 syntax absent in GHC 9.6.4
-- 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.4 when needed
-- use this in GHC 9.6.3 when needed
{-# OPTIONS_GHC -fno-warn-ambiguous-fields #-}

let r' = (record :: Record) {field = value}
Expand All @@ -107,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.4 when needed
-- use this in GHC 9.6.3 when needed
import Control.Monad
```

Expand Down
95 changes: 21 additions & 74 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c8c81a8

Please sign in to comment.