4.0 KiB
title, revision
| title | revision |
|---|---|
| Contributing guide | 31.01.2023 |
| Updated 31.01.2023 | Languages: EN, FR, CZ |
Contributing guide
Compiling with SQLCipher encryption enabled
Add cabal.project.local to project root with the location of OpenSSL headers and libraries and flag setting encryption mode:
cp scripts/cabal.project.local.mac cabal.project.local
# or
# cp scripts/cabal.project.local.linux cabal.project.local
OpenSSL on MacOS
MacOS comes with LibreSSL as default, OpenSSL must be installed to compile SimpleX from source.
OpenSSL can be installed with brew install openssl@1.1
You will have to add /opt/homebrew/opt/openssl@1.1/bin to your PATH in order to have things working properly
Project branches
In simplex-chat repo
-
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 asstable-androidexcept Nix configuration files. Deprecated. -
master- branch for beta version releases (GHC 9.6.3). -
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) - only for Android armv7a. -
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). 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.3 its commit should be used inmasterbranch of simplex-chat repo. -
master-ghc8107- its commit should be used inmaster-android(andmaster-ios) branch of simplex-chat repo. Deprecated.
Development & release process
-
Make PRs to
masterbranch only for both simplex-chat and simplexmq repos. -
If simplexmq repo was changed, to build mobile core libraries you need to merge its
masterbranch intomaster-ghc8107branch. -
To build core libraries for Android, iOS and windows:
- merge
masterbranch tomaster-androidbranch. - update code to be compatible with GHC 8.10.7 (see below).
- push to GitHub.
-
All libraries should be built from
masterbranch, Android armv7a - frommaster-androidbranch. -
To build Desktop and CLI apps, make tag in
masterbranch, APK files should be attached to the release. -
After the public release to App Store and Play Store, merge:
mastertostablemastertomaster-android(and compile/update code)master-androidtostable-android
- Independently,
masterbranch of simplexmq repo should be merged tostablebranch on stable releases.
Differences between GHC 8.10.7 and GHC 9.6.3
- The main difference is related to
DuplicateRecordFieldsextension.
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:
{-# LANGUAGE DuplicateRecordFields #-}
-- use this in GHC 9.6.3 when needed
{-# LANGUAGE OverloadedRecordDot #-}
-- GHC 9.6.3 syntax
let x = record.field
-- 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:
-- use this in GHC 9.6.3 when needed
{-# OPTIONS_GHC -fno-warn-ambiguous-fields #-}
let r' = (record :: Record) {field = value}
- Most monad functions now have to be imported from
Control.Monad, and not from specific monad modules (e.g.Control.Monad.Except).
-- use this in GHC 9.6.3 when needed
import Control.Monad
This PR has all the differences.