Skip to content

Commit

Permalink
Merge branch 'master' into 7_streamly
Browse files Browse the repository at this point in the history
# Conflicts:
#	.appveyor.yml
#	.github/workflows/ci.yaml
#	Changelog.markdown
#	cabal.project
#	docker.nix
#	nix/sources.json
#	project-m36.cabal
#	release.nix
#	src/bin/TutorialD/Interpreter.hs
#	src/lib/ProjectM36/Base.hs
#	src/lib/ProjectM36/Relation.hs
#	src/lib/ProjectM36/RelationalExpression.hs
#	src/lib/ProjectM36/StaticOptimizer.hs
#	src/lib/ProjectM36/Transaction/Persist.hs
#	src/lib/ProjectM36/TransactionGraph.hs
#	src/lib/ProjectM36/Tuple.hs
#	src/lib/ProjectM36/TupleSet.hs
#	src/lib/ProjectM36/WithNameExpr.hs
#	stack.ghc9.2.yaml
#	stack.ghc9.4.yaml
#	test/TutorialD/InterpreterTest.hs
  • Loading branch information
agentm committed Aug 27, 2024
2 parents cebf7bb + 2175790 commit 49b930a
Show file tree
Hide file tree
Showing 141 changed files with 7,721 additions and 1,089 deletions.
58 changes: 38 additions & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: "CI"
name: "Stack"
on:
pull_request:
push:
jobs:
dockerimage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
- uses: cachix/cachix-action@v15
with:
name: project-m36
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
Expand All @@ -33,34 +33,52 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
ghc:
- ghc9.2
os: [ubuntu-latest]
ghc_version:
- 9.2
- 9.4
# - 9.6
# - 9.8
# - 9.10
include:
- os: macos-latest
ghc_version: 9.2
env:
STACK_YAML: stack.${{ matrix.ghc }}.yaml
STACK_YAML: stack.ghc${{ matrix.ghc_version }}.yaml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.stack
key: ${{ runner.os }}-build-stack-${{ matrix.ghc }}-${{ hashFiles(env.STACK_YAML) }}-${{ hashFiles('**/*.cabal') }}
key: ${{ runner.os }}-build-stack-ghc${{ matrix.ghc_version }}-${{ hashFiles(env.STACK_YAML) }}-${{ hashFiles('**/*.cabal') }}
restore-keys: |
${{ runner.os }}-build-stack-${{ matrix.ghc }}-${{ hashFiles(env.STACK_YAML) }}
${{ runner.os }}-build-stack-${{ matrix.ghc }}
${{ runner.os }}-build-stack-ghc${{ matrix.ghc_version }}-${{ hashFiles(env.STACK_YAML) }}
${{ runner.os }}-build-stack-ghc${{ matrix.ghc_version }}
- name: Fix macOS cache bug
run: rm -rf ~/.stack/setup-exe-cache
if: startsWith(runner.os, 'Mac')
- name: Build
uses: freckle/stack-action@v4
with:
stack-yaml: ${{ env.STACK_YAML }}
pedantic: false
# - name: HLint
# run: curl -sSL https://raw.github.com/ndmitchell/hlint/master/misc/run.sh | sh -s .
- name: Install ghcup dependencies
run: sudo apt-get install build-essential curl libffi-dev libffi8ubuntu1 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
if: runner.os == 'Linux'
- name: Setup GHCUp
run: |
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_MINIMAL=1 sh
echo "$HOME/.ghcup/bin" >> $GITHUB_PATH
ls -al $HOME/.ghcup/bin
echo $GITHUB_PATH
- name: Install GHC
run: ghcup install ghc ${{ matrix.ghc_version }}
- name: Install Stack
run: ghcup install stack
- name: Build
run: stack build --ghc-options -O2 --local-bin-path out --copy-bins
- name: Test
run: stack test --stack-yaml=${{ env.STACK_YAML }}
- name: Haddock
run: stack --no-install-ghc --system-ghc --no-haddock-deps haddock
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: project-m36-${{ matrix.os }}-${{ matrix.ghc }}
name: project-m36-${{ matrix.os }}-ghc${{ matrix.ghc_version }}
path: out/
181 changes: 181 additions & 0 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
# This GitHub workflow config has been generated by a script via
#
# haskell-ci 'github' 'project-m36.cabal'
#
# To regenerate the script (for example after adjusting tested-with) run
#
# haskell-ci regenerate
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.19.20240514
#
# REGENDATA ("0.19.20240514",["github","project-m36.cabal"])
#
name: "Cabal"
on:
- push
- pull_request
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
runs-on: ubuntu-20.04
timeout-minutes:
60
container:
image: buildpack-deps:jammy
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
include:
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.10.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.8.2
compilerKind: ghc
compilerVersion: 9.8.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.6
compilerKind: ghc
compilerVersion: 9.6.6
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.2.8
compilerKind: ghc
compilerVersion: 9.2.8
setup-method: ghcup
allow-failure: false
fail-fast: false
steps:
- name: apt
run: |
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
HCVER: ${{ matrix.compilerVersion }}
- name: Set PATH and environment variables
run: |
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$HCKIND/$HCVER
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
HCVER: ${{ matrix.compilerVersion }}
- name: env
run: |
env
- name: write cabal config
run: |
mkdir -p $CABAL_DIR
cat >> $CABAL_CONFIG <<EOF
remote-build-reporting: anonymous
write-ghc-environment-files: never
remote-repo-cache: $CABAL_DIR/packages
logs-dir: $CABAL_DIR/logs
world-file: $CABAL_DIR/world
extra-prog-path: $CABAL_DIR/bin
symlink-bindir: $CABAL_DIR/bin
installdir: $CABAL_DIR/bin
build-summary: $CABAL_DIR/logs/build.log
store-dir: $CABAL_DIR/store
install-dirs user
prefix: $CABAL_DIR
repository hackage.haskell.org
url: http://hackage.haskell.org/
EOF
cat >> $CABAL_CONFIG <<EOF
program-default-options
ghc-options: $GHCJOBS +RTS -M3G -RTS
EOF
cat $CABAL_CONFIG
- name: versions
run: |
$HC --version || true
$HC --print-project-git-commit-id || true
$CABAL --version || true
- name: install cabal-plan
run: |
mkdir -p $HOME/.cabal/bin
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3.0/cabal-plan-0.7.3.0-x86_64-linux.xz > cabal-plan.xz
echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
rm -f cabal-plan.xz
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v4
- name: update cabal index
run: |
$CABAL v2-update -v -w $ARG_COMPILER
- name: dump install plan
run: |
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan
- name: restore cache
uses: actions/cache/restore@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-
- name: install dependencies
run: |
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all
- name: build w/o tests
run: |
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: build
run: |
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
- name: tests
run: |
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
# - name: cabal check
# run: |
# cd ${PKGDIR_project_m36} || false
# ${CABAL} -vnormal check
- name: haddock
run: |
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
- name: unconstrained build
run: |
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: save cache
uses: actions/cache/save@v4
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
56 changes: 45 additions & 11 deletions Changelog.markdown
Original file line number Diff line number Diff line change
@@ -1,25 +1,59 @@
# Future (v0.9.7)
# Future

* add result caching layer
* add parallel execution engine based on [streamly 0.9.0](https://github.com/composewell/streamly)
* require GHC 9.2+

# 2024-08-25 (v1.1.0)

* add support for GHC 9.6, GHC 9.8, and GHC 9.10
* clean up compiler warnings

# 2024-07-27 (v1.0.2)

* upgrade to streamly 0.10.1
* refactor websocket API to support request UUIDs (#367)
* refactor websocket API to support `createSessionAtHead` (#367)

# 2024-07-15 (v1.0.1)

* add support for aggregate functions using sub-relation attributes

# 2024-06-06 (v1.0.0)

* add support for relational expression evaluation against sub-relations
* add support for SQL dialect and console called "SQLegacy"

# 2024-01-12 (v0.9.9)

* revert to using streamly 0.9.0 due to over-the-wire corruption bug in 0.10.0
* fixed toAtom/fromAtom for NonEmpty lists (#363)

# 2023-12-30 (v0.9.8)

* fix notification serialization in transaction (#362)
* require minimum GHC 9.2 (dropping GHC 8.10 and GHC 9.0)
* add support for GHC 9.4

# 2023-07-18 (v0.9.7)

* fix critical bug resulting in empty results from cross joins

# 2022-11-05 (v0.9.6)

* fix tuple context passed down to extended expressions
* add ddl hash- useful for validating that the client supports the current schema
* add registered queries- useful for constraining what DDL can be applied to the database so as not to break client applications
* reduce memory usage during Merkle hashing by an order of magnitude by using strict serialization and hashing

# 2022-08-19 (v0.9.5)

* removed necessity for caret "^" when using boolean atom expressions in restriction predicates
* `True` and `False` are now value constructors for `Bool` atom values (previously `t` and `f); changed for better discoverability by Haskell developers
* add `Scientific` data type for arbitrary-precision values (backed by Data.Scientific)
* add support for GHC 9.0 and GHC 9.2
* drop support for GHC < 8.10.7
* fix relational equality when the relation includes a nested relation

# 2021-12-05 (v0.9.4)

* fix bug which [caused tuple storage to be duplicated unnecessarily](https://github.com/agentm/project-m36/pull/328)
Expand All @@ -30,11 +64,11 @@
* fix constraint checking after undefining a relation variable
* optionally allow TLS and client certificate authentication in Project:M36 server
* require GHC >=8.8

# 2021-04-01 (v0.9.3)

* add new ":importtutd <URI> <SHA256 hash>" feature to import TutorialD from a local file or a HTTP/HTTPS URI
* add new ":importtutd <URI> <SHA256 hash>" feature to import TutorialD from a local file or a HTTP/HTTPS URI

# 2020-12-27 (v0.9.0)

* replace unmaintained distributed-process-client-server RPC package with new curryer RPC package
Expand Down Expand Up @@ -73,7 +107,7 @@

* fix atom function type validation
* add support for GHC 8.4 (now we support GHC 8.0, 8.2, and 8.4)

# 2018-08-10 (v0.5)

* fix critical type bug which allowed unresolved types to be used
Expand All @@ -100,8 +134,8 @@

* alter websocket server API to allow for multiple representations (JSON, text, or HTML) to be selected and returned simultaneously
* add jupyter kernel for TutorialD interpreter
* fix warnings suggested by new hlint 2.0.10
* fix warnings suggested by new hlint 2.0.10

# 2017-10-08 (v0.3)

* replaced overuse of `undefined` with `Proxy` in `Tupleable` and `Atomable` typeclasses
Expand Down
Loading

0 comments on commit 49b930a

Please sign in to comment.