From 2826061251ca05a777fec36fb5ad08b6e87e6ae7 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Fri, 2 Oct 2020 17:56:24 +0200 Subject: [PATCH 01/97] (Tutorial) Update the pre syntax --- doc/tutorial/gf-tutorial.t2t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/tutorial/gf-tutorial.t2t b/doc/tutorial/gf-tutorial.t2t index 7467e107e..e027f0030 100644 --- a/doc/tutorial/gf-tutorial.t2t +++ b/doc/tutorial/gf-tutorial.t2t @@ -2757,7 +2757,11 @@ Thus the labels ``p1, p2,...`` are hard-coded. English indefinite article: ``` oper artIndef : Str = - pre {"a" ; "an" / strs {"a" ; "e" ; "i" ; "o"}} ; + pre { + ("a" | "e" | "i" | "o") => "an" ; + _ => "a" + } ; + ``` Thus ``` From e41436eb14e669ebce803ee6d329e8544a68be10 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Fri, 2 Oct 2020 17:57:35 +0200 Subject: [PATCH 02/97] (Tutorial) Remove reference to morpho_list + overly verbose path --- doc/tutorial/gf-tutorial.t2t | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/doc/tutorial/gf-tutorial.t2t b/doc/tutorial/gf-tutorial.t2t index e027f0030..0cc719a2b 100644 --- a/doc/tutorial/gf-tutorial.t2t +++ b/doc/tutorial/gf-tutorial.t2t @@ -2475,7 +2475,7 @@ can be used to read a text and return for each word its analyses ``` The command ``morpho_quiz = mq`` generates inflection exercises. ``` - % gf -path=alltenses:prelude $GF_LIB_PATH/alltenses/IrregFre.gfo + % gf alltenses/IrregFre.gfo > morpho_quiz -cat=V @@ -2488,11 +2488,6 @@ The command ``morpho_quiz = mq`` generates inflection exercises. réapparaîtriez Score 0/1 ``` -To create a list for later use, use the command ``morpho_list = ml`` -``` - > morpho_list -number=25 -cat=V | write_file exx.txt -``` - From df77205c435870804d70eec077ca6f40a197e7ac Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Fri, 2 Oct 2020 17:58:57 +0200 Subject: [PATCH 03/97] (Tutorial) Rename TV (transitive verb) to V2, the name used in RGL --- doc/tutorial/gf-tutorial.t2t | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/tutorial/gf-tutorial.t2t b/doc/tutorial/gf-tutorial.t2t index 0cc719a2b..63407a38a 100644 --- a/doc/tutorial/gf-tutorial.t2t +++ b/doc/tutorial/gf-tutorial.t2t @@ -2646,12 +2646,12 @@ The verb //switch off// is called a We can define transitive verbs and their combinations as follows: ``` - lincat TV = {s : Number => Str ; part : Str} ; + lincat V2 = {s : Number => Str ; part : Str} ; - fun AppTV : Item -> TV -> Item -> Phrase ; + fun AppV2 : Item -> V2 -> Item -> Phrase ; - lin AppTV subj tv obj = - {s = subj.s ++ tv.s ! subj.n ++ obj.s ++ tv.part} ; + lin AppV2 subj v2 obj = + {s = subj.s ++ v2.s ! subj.n ++ obj.s ++ v2.part} ; ``` **Exercise**. Define the language ``a^n b^n c^n`` in GF, i.e. @@ -2717,11 +2717,11 @@ This topic will be covered in #Rseclexing. The symbol ``**`` is used for both record types and record objects. ``` - lincat TV = Verb ** {c : Case} ; + lincat V2 = Verb ** {c : Case} ; lin Follow = regVerb "folgen" ** {c = Dative} ; ``` -``TV`` becomes a **subtype** of ``Verb``. +``V2`` (transitive verb) becomes a **subtype** of ``Verb``. If //T// is a subtype of //R//, an object of //T// can be used whenever an object of //R// is required. From f2e4b89a22a1c7c7304e3a712e47e6d9f3f763e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= Date: Thu, 8 Oct 2020 17:41:44 +0200 Subject: [PATCH 04/97] Fix syntax error problem for older versions of GHC --- src/compiler/GF/Grammar/Lexer.x | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/compiler/GF/Grammar/Lexer.x b/src/compiler/GF/Grammar/Lexer.x index fe455c58a..bde0aa064 100644 --- a/src/compiler/GF/Grammar/Lexer.x +++ b/src/compiler/GF/Grammar/Lexer.x @@ -35,7 +35,7 @@ $u = [.\n] -- universal: any character :- "--" [.]* ; -- Toss single line comments -"{-" ([$u # \-] | \- [$u # \}])* ("-")+ "}" ; +"{-" ([$u # \-] | \- [$u # \}])* ("-")+ "}" ; $white+ ; @rsyms { tok ident } @@ -138,7 +138,7 @@ data Token res = eitherResIdent eitherResIdent :: (Ident -> Token) -> Ident -> Token -eitherResIdent tv s = +eitherResIdent tv s = case Map.lookup s resWords of Just t -> t Nothing -> tv s @@ -285,6 +285,10 @@ instance Monad P where POk s a -> unP (k a) s PFailed posn err -> PFailed posn err +#if !(MIN_VERSION_base(4,13,0)) + -- Monad(fail) will be removed in GHC 8.8+ + fail = Fail.fail +#endif instance Fail.MonadFail P where fail msg = P $ \(_,AI posn _ _) -> PFailed posn msg From 7b4eeb368ceaa89bdd23500822e72f1a908cffb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= Date: Thu, 8 Oct 2020 21:50:12 +0200 Subject: [PATCH 05/97] Make CI green See https://github.com/joerick/cibuildwheel/issues/446 --- .github/workflows/build-python-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-python-package.yml b/.github/workflows/build-python-package.yml index 45e94b853..921da9fb5 100644 --- a/.github/workflows/build-python-package.yml +++ b/.github/workflows/build-python-package.yml @@ -21,7 +21,7 @@ jobs: - name: Install cibuildwheel run: | - python -m pip install cibuildwheel==1.4.2 + python -m pip install git+https://github.com/joerick/cibuildwheel.git@master - name: Install build tools for OSX if: startsWith(matrix.os, 'macos') @@ -69,7 +69,7 @@ jobs: needs: [build_wheels, build_sdist] runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' && github.event_name == 'push' - + steps: - uses: actions/checkout@v2 From 1ff66006b8d928da01a56ca9f930f07b3cb2a01e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= Date: Mon, 26 Oct 2020 16:05:30 +0100 Subject: [PATCH 06/97] Fix infinite recursion on error The implementation was meant to lift from SIO to IO, but instead it was just the identity function, which means that `fail = id . fail` and we have an infinite loop. --- src/compiler/GF/Infra/SIO.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/GF/Infra/SIO.hs b/src/compiler/GF/Infra/SIO.hs index 0ce431380..906f39345 100644 --- a/src/compiler/GF/Infra/SIO.hs +++ b/src/compiler/GF/Infra/SIO.hs @@ -60,7 +60,7 @@ instance Monad SIO where SIO m1 >>= xm2 = SIO $ \ h -> m1 h >>= \ x -> unS (xm2 x) h instance Fail.MonadFail SIO where - fail = liftSIO . fail + fail = lift0 . fail instance Output SIO where ePutStr = lift0 . ePutStr From beb7599d3353647dcc78ae0b903667d379d93449 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 13:15:35 +0100 Subject: [PATCH 07/97] Add first attempt at GitHub action file for building .pkg --- .github/workflows/build-macos-package.yml | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/build-macos-package.yml diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml new file mode 100644 index 000000000..3fb6fc5c4 --- /dev/null +++ b/.github/workflows/build-macos-package.yml @@ -0,0 +1,40 @@ +name: Build macOS Package + +on: [push, pull_request] + +jobs: + build: + name: Build on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: [macos-latest] + # env: + # LC_ALL: C.UTF-8 + + steps: + - uses: actions/checkout@v1 + + - name: Install build tools + run: | + sudo apt update + sudo apt install -y \ + haskell-platform + + - name: Checkout RGL + run: | + git clone --depth 1 https://github.com/GrammaticalFramework/gf-rgl.git ../gf-rgl + + - name: Build macOS package + run: | + make pkg + + - name: Copy packages + run: | + mkdir macos/dist + cp ../gf_*.pkg macos/dist/ + + - uses: actions/upload-artifact@v2 + with: + path: macos/dist From 86729b3efc1fca8250c0aa786194386dd2213ec4 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 13:18:57 +0100 Subject: [PATCH 08/97] Try to install GHC/Cabal via Homebrew --- .github/workflows/build-macos-package.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 3fb6fc5c4..a95f01964 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -18,9 +18,9 @@ jobs: - name: Install build tools run: | - sudo apt update - sudo apt install -y \ - haskell-platform + brew install \ + ghc \ + cabal-install - name: Checkout RGL run: | From 3844277a66925536e4285e4e533e63e43e33a70d Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 13:35:03 +0100 Subject: [PATCH 09/97] Install Haskell via setup-haskell action, install build tools for C runtime --- .github/workflows/build-macos-package.yml | 30 ++++++++++++++++++----- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index a95f01964..873ae9da6 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -7,20 +7,38 @@ jobs: name: Build on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: - fail-fast: true matrix: - os: [macos-latest] - # env: - # LC_ALL: C.UTF-8 + os: [macOS-latest] + cabal: ["3.2"] + ghc: ["8.6.5"] steps: - uses: actions/checkout@v1 + - uses: actions/setup-haskell@v1.1.1 + id: setup-haskell-cabal + name: Setup Haskell + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + - name: Freeze + run: | + cabal freeze + + - uses: actions/cache@v1 + name: Cache ~/.cabal/store + with: + path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} + key: ${{ runner.os }}-${{ matrix.ghc }} + # key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} + - name: Install build tools run: | brew install \ - ghc \ - cabal-install + automake \ + autoconf \ + libtool - name: Checkout RGL run: | From 6836360e0cdb6f35900e222b12a02009a4948aca Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 13:55:26 +0100 Subject: [PATCH 10/97] Comment cabal freeze and caching in case it was causing build error below https://github.com/GrammaticalFramework/gf-core/runs/1374091798?check_suite_focus=true --- .github/workflows/build-macos-package.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 873ae9da6..86425b41a 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -22,16 +22,16 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} - - name: Freeze - run: | - cabal freeze - - - uses: actions/cache@v1 - name: Cache ~/.cabal/store - with: - path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} - key: ${{ runner.os }}-${{ matrix.ghc }} - # key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} + # - name: Freeze + # run: | + # cabal freeze + # + # - uses: actions/cache@v1 + # name: Cache ~/.cabal/store + # with: + # path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} + # key: ${{ runner.os }}-${{ matrix.ghc }} + # # key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} - name: Install build tools run: | From 399974ebfb606d0ff7db03c248b605b8a94fb9f4 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 13:55:53 +0100 Subject: [PATCH 11/97] Fix whitespace in binary build script --- bin/build-binary-dist.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index 7f6ca5d72..8714c8dda 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -38,11 +38,11 @@ if which >/dev/null python; then EXTRA_INCLUDE_DIRS="$extrainclude" EXTRA_LIB_DIRS="$extralib" python setup.py build python setup.py install --prefix="$destdir$prefix" if [ "$fmt" == pkg ] ; then - # A hack for Python on OS X to find the PGF modules - pyver=$(ls "$destdir$prefix/lib" | sed -n 's/^python//p') - pydest="$destdir/Library/Python/$pyver/site-packages" - mkdir -p "$pydest" - ln "$destdir$prefix/lib/python$pyver/site-packages"/pgf* "$pydest" + # A hack for Python on OS X to find the PGF modules + pyver=$(ls "$destdir$prefix/lib" | sed -n 's/^python//p') + pydest="$destdir/Library/Python/$pyver/site-packages" + mkdir -p "$pydest" + ln "$destdir$prefix/lib/python$pyver/site-packages"/pgf* "$pydest" fi popd else @@ -55,9 +55,9 @@ if which >/dev/null javac && which >/dev/null jar ; then rm -f libjpgf.la # In case it contains the wrong INSTALL_PATH if make CFLAGS="-I$extrainclude -L$extralib" INSTALL_PATH="$prefix" then - make INSTALL_PATH="$destdir$prefix" install + make INSTALL_PATH="$destdir$prefix" install else - echo "*** Skipping the Java binding because of errors" + echo "*** Skipping the Java binding because of errors" fi popd else @@ -95,14 +95,14 @@ cabal register --gen-pkg-config=$libdir/gf-$ver.conf ## Create the binary distribution package case $fmt in tar.gz) - targz="$name-bin-$hw-$os.tar.gz" # the final tar file - tar -C "$destdir/$prefix" -zcf "dist/$targz" . - echo "Created $targz, consider renaming it to something more user friendly" - ;; + targz="$name-bin-$hw-$os.tar.gz" # the final tar file + tar -C "$destdir/$prefix" -zcf "dist/$targz" . + echo "Created $targz, consider renaming it to something more user friendly" + ;; pkg) - pkg=$name.pkg - pkgbuild --identifier org.grammaticalframework.gf.pkg --version "$ver" --root "$destdir" --install-location / dist/$pkg - echo "Created $pkg" + pkg=$name.pkg + pkgbuild --identifier org.grammaticalframework.gf.pkg --version "$ver" --root "$destdir" --install-location / dist/$pkg + echo "Created $pkg" esac rm -r "$destdir" From 24619bc3ee7efbd9dfd6edccb86bb1d8cfd3fcca Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 17:15:13 +0100 Subject: [PATCH 12/97] Change cabal version to 2.4, to match GHC 8.6.5 --- .github/workflows/build-macos-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 86425b41a..4d288e8f3 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -9,11 +9,11 @@ jobs: strategy: matrix: os: [macOS-latest] - cabal: ["3.2"] + cabal: ["2.4"] ghc: ["8.6.5"] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-haskell@v1.1.1 id: setup-haskell-cabal From 13ec9ca888359c2430c73ee6710b1855dd9d74bb Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 17:43:15 +0100 Subject: [PATCH 13/97] Explicitly specify env vars when building GF (test) --- .github/workflows/build-macos-package.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 4d288e8f3..0dfda017e 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -22,23 +22,10 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} - # - name: Freeze - # run: | - # cabal freeze - # - # - uses: actions/cache@v1 - # name: Cache ~/.cabal/store - # with: - # path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} - # key: ${{ runner.os }}-${{ matrix.ghc }} - # # key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} - - name: Install build tools run: | brew install \ - automake \ - autoconf \ - libtool + automake - name: Checkout RGL run: | @@ -47,6 +34,9 @@ jobs: - name: Build macOS package run: | make pkg + env: + DYLD_LIBRARY_PATH: /Users/runner/work/gf-core/gf-core/dist/gf-3.10.4-git/usr/local/lib + LD_LIBRARY_PATH: /Users/runner/work/gf-core/gf-core/dist/gf-3.10.4-git/usr/local/lib - name: Copy packages run: | From 6e2f34f4d0abee3b6526f47938a4705d1a0af270 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 17:52:41 +0100 Subject: [PATCH 14/97] Try to set PREFIX env var --- .github/workflows/build-macos-package.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 0dfda017e..0031c8a6c 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -35,8 +35,7 @@ jobs: run: | make pkg env: - DYLD_LIBRARY_PATH: /Users/runner/work/gf-core/gf-core/dist/gf-3.10.4-git/usr/local/lib - LD_LIBRARY_PATH: /Users/runner/work/gf-core/gf-core/dist/gf-3.10.4-git/usr/local/lib + PREFIX: /Users/runner/work/gf-core/gf-core/dist/gf-3.10.4-git/ - name: Copy packages run: | From f6eb94c33b8ad2f1b9a7d8cc43147cec222d54a5 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 21:12:23 +0100 Subject: [PATCH 15/97] Try removing something that looks like a typo --- .github/workflows/build-macos-package.yml | 2 -- bin/build-binary-dist.sh | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 0031c8a6c..6d11b8a1c 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -34,8 +34,6 @@ jobs: - name: Build macOS package run: | make pkg - env: - PREFIX: /Users/runner/work/gf-core/gf-core/dist/gf-3.10.4-git/ - name: Copy packages run: | diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index 8714c8dda..80b4f0d17 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -29,7 +29,7 @@ set -x # print commands before executing them pushd src/runtime/c bash setup.sh configure --prefix="$prefix" bash setup.sh build -bash setup.sh install prefix="$destdir$prefix" +bash setup.sh install prefix="$prefix" popd ## Build the python binding to the C run-time system @@ -72,7 +72,7 @@ export DYLD_LIBRARY_PATH="$extralib" LD_LIBRARY_PATH="$extralib" cabal install -w "$ghc" --only-dependencies -fserver -fc-runtime $extra cabal configure -w "$ghc" --prefix="$prefix" -fserver -fc-runtime $extra cabal build - # Building the example grammars will fail, because the RGL is missing +# Building the example grammars will fail, because the RGL is missing cabal copy --destdir="$destdir" # create www directory ## Build the RGL and copy it to $destdir From ed97a42fde223a7613bf6f9fc6ad56c70180c353 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 21:23:52 +0100 Subject: [PATCH 16/97] Try it another way round --- bin/build-binary-dist.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index 80b4f0d17..2c71cb2ea 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -29,7 +29,7 @@ set -x # print commands before executing them pushd src/runtime/c bash setup.sh configure --prefix="$prefix" bash setup.sh build -bash setup.sh install prefix="$prefix" +bash setup.sh install prefix="$destdir$prefix" popd ## Build the python binding to the C run-time system @@ -70,7 +70,7 @@ export DYLD_LIBRARY_PATH="$extralib" LD_LIBRARY_PATH="$extralib" ## Build GF, with C run-time support enabled cabal install -w "$ghc" --only-dependencies -fserver -fc-runtime $extra -cabal configure -w "$ghc" --prefix="$prefix" -fserver -fc-runtime $extra +cabal configure -w "$ghc" --prefix="$destdir$prefix" -fserver -fc-runtime $extra cabal build # Building the example grammars will fail, because the RGL is missing cabal copy --destdir="$destdir" # create www directory From 9018eabb10233f44b9c3381772cb1f940eaee1c0 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 21:35:17 +0100 Subject: [PATCH 17/97] Add libtool finish command from warning --- bin/build-binary-dist.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index 2c71cb2ea..f96831910 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -30,6 +30,7 @@ pushd src/runtime/c bash setup.sh configure --prefix="$prefix" bash setup.sh build bash setup.sh install prefix="$destdir$prefix" +libtool --finish "$prefix/lib" popd ## Build the python binding to the C run-time system From b1b3bc3360c9b10ad6767ba13063f86757ab3162 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 21:40:55 +0100 Subject: [PATCH 18/97] Install C runtime in two places. Use cabal v1-copy. --- bin/build-binary-dist.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index f96831910..02751f40b 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -29,8 +29,8 @@ set -x # print commands before executing them pushd src/runtime/c bash setup.sh configure --prefix="$prefix" bash setup.sh build +bash setup.sh install prefix="$prefix" bash setup.sh install prefix="$destdir$prefix" -libtool --finish "$prefix/lib" popd ## Build the python binding to the C run-time system @@ -71,10 +71,10 @@ export DYLD_LIBRARY_PATH="$extralib" LD_LIBRARY_PATH="$extralib" ## Build GF, with C run-time support enabled cabal install -w "$ghc" --only-dependencies -fserver -fc-runtime $extra -cabal configure -w "$ghc" --prefix="$destdir$prefix" -fserver -fc-runtime $extra +cabal configure -w "$ghc" --prefix="$prefix" -fserver -fc-runtime $extra cabal build # Building the example grammars will fail, because the RGL is missing -cabal copy --destdir="$destdir" # create www directory +cabal v1-copy --destdir="$destdir" # create www directory ## Build the RGL and copy it to $destdir PATH=$PWD/dist/build/gf:$PATH @@ -89,7 +89,7 @@ popd cabal build ## Copy GF to $destdir -cabal copy --destdir="$destdir" +cabal v1-copy --destdir="$destdir" libdir=$(dirname $(find "$destdir" -name PGF.hi)) cabal register --gen-pkg-config=$libdir/gf-$ver.conf From 359f1509fa70fc572351f425451360b2ec5336bb Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 21:59:05 +0100 Subject: [PATCH 19/97] Blurt out cabal version in both action and build script --- .github/workflows/build-macos-package.yml | 6 +++++- bin/build-binary-dist.sh | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 6d11b8a1c..f4f0e4edb 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -9,8 +9,8 @@ jobs: strategy: matrix: os: [macOS-latest] - cabal: ["2.4"] ghc: ["8.6.5"] + cabal: ["2.4"] steps: - uses: actions/checkout@v2 @@ -22,6 +22,10 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} + - name: Check cabal version + run: | + cabal --version + - name: Install build tools run: | brew install \ diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index 02751f40b..2c03a81a1 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -25,6 +25,8 @@ extra="--extra-lib-dirs=$extralib --extra-include-dirs=$extrainclude" set -e # Stop if an error occurs set -x # print commands before executing them +cabal --version + ## First configure & build the C run-time system pushd src/runtime/c bash setup.sh configure --prefix="$prefix" @@ -74,7 +76,7 @@ cabal install -w "$ghc" --only-dependencies -fserver -fc-runtime $extra cabal configure -w "$ghc" --prefix="$prefix" -fserver -fc-runtime $extra cabal build # Building the example grammars will fail, because the RGL is missing -cabal v1-copy --destdir="$destdir" # create www directory +cabal copy --destdir="$destdir" # create www directory ## Build the RGL and copy it to $destdir PATH=$PWD/dist/build/gf:$PATH @@ -89,7 +91,7 @@ popd cabal build ## Copy GF to $destdir -cabal v1-copy --destdir="$destdir" +cabal copy --destdir="$destdir" libdir=$(dirname $(find "$destdir" -name PGF.hi)) cabal register --gen-pkg-config=$libdir/gf-$ver.conf From 687f56178ee2bee069b27fe05e031259fa1c9d2c Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 22:05:50 +0100 Subject: [PATCH 20/97] Use newer version of setup-haskell --- .github/workflows/build-macos-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index f4f0e4edb..09636db84 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-haskell@v1.1.1 + - uses: actions/setup-haskell@v1.1 id: setup-haskell-cabal name: Setup Haskell with: From 71b10672e8413be392e579261e205672725831b3 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 22:09:57 +0100 Subject: [PATCH 21/97] Fix macOS version at 10.13 --- .github/workflows/build-macos-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 09636db84..311819de5 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macOS-latest] + os: [macOS-10.13] ghc: ["8.6.5"] cabal: ["2.4"] From 1c7c52da68e560fc28398b324a1d1a207af12ec2 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 22:11:29 +0100 Subject: [PATCH 22/97] Use GHC 8.4.4 --- .github/workflows/build-macos-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 311819de5..9163c0137 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -8,8 +8,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macOS-10.13] - ghc: ["8.6.5"] + os: [macOS-latest] + ghc: ["8.4.4"] cabal: ["2.4"] steps: From feed61dd30bf1ed8ae2c4edc68640f1fe8c28755 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 22:43:06 +0100 Subject: [PATCH 23/97] Change setup-haskell version to just v1 --- .github/workflows/build-macos-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 9163c0137..4331d111a 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -9,13 +9,13 @@ jobs: strategy: matrix: os: [macOS-latest] - ghc: ["8.4.4"] + ghc: ["8.6.5"] cabal: ["2.4"] steps: - uses: actions/checkout@v2 - - uses: actions/setup-haskell@v1.1 + - uses: actions/setup-haskell@v1 id: setup-haskell-cabal name: Setup Haskell with: From 2dc11524fc9d027307982ae4821c0625074c3c4e Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 16 Nov 2020 22:42:13 +0100 Subject: [PATCH 24/97] Remove RGL from build, use 'cabal v1-' commands --- .github/workflows/build-macos-package.yml | 2 +- bin/build-binary-dist.sh | 56 +++++++++-------------- 2 files changed, 23 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 4331d111a..7ea62f5f2 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -1,6 +1,6 @@ name: Build macOS Package -on: [push, pull_request] +on: workflow_dispatch jobs: build: diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index 2c03a81a1..8c08c122b 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -1,15 +1,18 @@ #! /bin/bash -### This script builds a binary distribution of GF from the source -### package that this script is a part of. It assumes that you have installed -### a recent version of the Haskell Platform. -### Two binary package formats are supported: plain tar files (.tar.gz) and -### OS X Installer packages (.pkg). +### This script builds a binary distribution of GF from source. +### It assumes that you have Haskell and Cabal installed. +### Two binary package formats are supported (specified with the FMT env var): +### - plain tar files (.tar.gz) +### - OS X installer packages (.pkg) os=$(uname) # Operating system name (e.g. Darwin or Linux) hw=$(uname -m) # Hardware name (e.g. i686 or x86_64) -# GF version number: +cabal="cabal v1-" # Cabal >= 2.4 +# cabal="cabal " # Cabal <= 2.2 + +## Get GF version number from Cabal file ver=$(grep -i ^version: gf.cabal | sed -e 's/version://' -e 's/ //g') name="gf-$ver" @@ -25,14 +28,13 @@ extra="--extra-lib-dirs=$extralib --extra-include-dirs=$extrainclude" set -e # Stop if an error occurs set -x # print commands before executing them -cabal --version - ## First configure & build the C run-time system pushd src/runtime/c bash setup.sh configure --prefix="$prefix" bash setup.sh build -bash setup.sh install prefix="$prefix" -bash setup.sh install prefix="$destdir$prefix" +## Install in two places: +# bash setup.sh install prefix="$prefix" # for GF build to find +bash setup.sh install prefix="$destdir$prefix" # for inclusion in distribution popd ## Build the python binding to the C run-time system @@ -60,47 +62,32 @@ if which >/dev/null javac && which >/dev/null jar ; then then make INSTALL_PATH="$destdir$prefix" install else - echo "*** Skipping the Java binding because of errors" + echo "Skipping the Java binding because of errors" fi popd else echo "Java SDK is not installed, so the Java binding will not be included" fi -## To find dynamic C run-time libraries when running GF below +## To find dynamic C run-time libraries when building GF below export DYLD_LIBRARY_PATH="$extralib" LD_LIBRARY_PATH="$extralib" - ## Build GF, with C run-time support enabled -cabal install -w "$ghc" --only-dependencies -fserver -fc-runtime $extra -cabal configure -w "$ghc" --prefix="$prefix" -fserver -fc-runtime $extra -cabal build -# Building the example grammars will fail, because the RGL is missing -cabal copy --destdir="$destdir" # create www directory - -## Build the RGL and copy it to $destdir -PATH=$PWD/dist/build/gf:$PATH -export GF_LIB_PATH="$(dirname $(find "$destdir" -name www))/lib" # hmm -mkdir -p "$GF_LIB_PATH" -pushd ../gf-rgl -make build -make copy -popd - -# Build GF again, including example grammars that need the RGL -cabal build +${cabal}install -w "$ghc" --only-dependencies -fserver -fc-runtime $extra +${cabal}configure -w "$ghc" --prefix="$prefix" -fserver -fc-runtime $extra +${cabal}build ## Copy GF to $destdir -cabal copy --destdir="$destdir" +${cabal}copy --destdir="$destdir" libdir=$(dirname $(find "$destdir" -name PGF.hi)) -cabal register --gen-pkg-config=$libdir/gf-$ver.conf +${cabal}register --gen-pkg-config="$libdir/gf-$ver.conf" ## Create the binary distribution package case $fmt in tar.gz) targz="$name-bin-$hw-$os.tar.gz" # the final tar file - tar -C "$destdir/$prefix" -zcf "dist/$targz" . - echo "Created $targz, consider renaming it to something more user friendly" + tar --directory "$destdir/$prefix" --gzip --create --file "dist/$targz" . + echo "Created $targz" ;; pkg) pkg=$name.pkg @@ -108,4 +95,5 @@ case $fmt in echo "Created $pkg" esac +## Cleanup rm -r "$destdir" From b4ccca8c1800498c789ab405c5233f628779965a Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 16 Nov 2020 22:46:04 +0100 Subject: [PATCH 25/97] Build on push too --- .github/workflows/build-macos-package.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 7ea62f5f2..091beb150 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -1,6 +1,8 @@ name: Build macOS Package -on: workflow_dispatch +on: + push: + workflow_dispatch: jobs: build: From ce9caa27267da33c302404f04d718e6dc34c53f5 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 16 Nov 2020 22:54:19 +0100 Subject: [PATCH 26/97] Install alex and happy --- .github/workflows/build-macos-package.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 091beb150..d55c134a9 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -17,9 +17,9 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-haskell@v1 + - name: Setup Haskell + uses: actions/setup-haskell@v1 id: setup-haskell-cabal - name: Setup Haskell with: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} @@ -32,10 +32,7 @@ jobs: run: | brew install \ automake - - - name: Checkout RGL - run: | - git clone --depth 1 https://github.com/GrammaticalFramework/gf-rgl.git ../gf-rgl + cabal v1-install alex happy - name: Build macOS package run: | @@ -46,6 +43,7 @@ jobs: mkdir macos/dist cp ../gf_*.pkg macos/dist/ - - uses: actions/upload-artifact@v2 + - name: Upload artifact + uses: actions/upload-artifact@v2 with: path: macos/dist From 30bcafb76f693fb9208312c62c557ff88e1a27db Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 16 Nov 2020 23:18:40 +0100 Subject: [PATCH 27/97] Re-enable hack for finding C runtime on macOS --- bin/build-binary-dist.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index 8c08c122b..5258ec702 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -32,9 +32,8 @@ set -x # print commands before executing them pushd src/runtime/c bash setup.sh configure --prefix="$prefix" bash setup.sh build -## Install in two places: -# bash setup.sh install prefix="$prefix" # for GF build to find -bash setup.sh install prefix="$destdir$prefix" # for inclusion in distribution +bash setup.sh install prefix="$prefix" # hack required for GF build on macOS +bash setup.sh install prefix="$destdir$prefix" popd ## Build the python binding to the C run-time system From a7ff2d06117fcb45331f67e8ce52a913b96ed76b Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 16 Nov 2020 23:41:01 +0100 Subject: [PATCH 28/97] Upload artifact directly without copying elsewhere in between --- .github/workflows/build-macos-package.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index d55c134a9..24cf6c1e3 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -24,10 +24,6 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} - - name: Check cabal version - run: | - cabal --version - - name: Install build tools run: | brew install \ @@ -38,12 +34,9 @@ jobs: run: | make pkg - - name: Copy packages - run: | - mkdir macos/dist - cp ../gf_*.pkg macos/dist/ - - name: Upload artifact uses: actions/upload-artifact@v2 with: - path: macos/dist + name: macOS package + path: dist/gf_*.pkg + if-no-files-found: error From 5a6acf1d47a7c4b4ba5c20aa5ca9f7484592e404 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 16 Nov 2020 23:50:02 +0100 Subject: [PATCH 29/97] Replace _ with - --- .github/workflows/build-macos-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 24cf6c1e3..c01227791 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -38,5 +38,5 @@ jobs: uses: actions/upload-artifact@v2 with: name: macOS package - path: dist/gf_*.pkg + path: dist/gf-*.pkg if-no-files-found: error From 8550f8deaf6d7095963bfd6998a512ac87a43cd5 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 17 Nov 2020 00:01:05 +0100 Subject: [PATCH 30/97] Remove RGL and HTML from Debian build --- .github/workflows/build-debian-package.yml | 27 ++++++++-------------- .gitignore | 6 +++++ debian/rules | 10 +++----- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-debian-package.yml b/.github/workflows/build-debian-package.yml index 09719aaa8..bd607fb59 100644 --- a/.github/workflows/build-debian-package.yml +++ b/.github/workflows/build-debian-package.yml @@ -1,20 +1,21 @@ name: Build Debian Package -on: [push, pull_request] +on: + push: + workflow_dispatch: jobs: build: name: Build on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: - fail-fast: true matrix: os: [ubuntu-18.04] env: LC_ALL: C.UTF-8 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Install build tools run: | @@ -27,23 +28,15 @@ jobs: libghc-json-dev \ python-dev \ default-jdk \ - libtool-bin \ - txt2tags \ - pandoc - - - name: Checkout RGL - run: | - git clone --depth 1 https://github.com/GrammaticalFramework/gf-rgl.git ../gf-rgl + libtool-bin - name: Build Debian package run: | make deb - - name: Copy packages - run: | - mkdir debian/dist - cp ../gf_*.deb debian/dist/ - - - uses: actions/upload-artifact@v2 + - name: Upload artifact + uses: actions/upload-artifact@v2 with: - path: debian/dist + name: Debian package + path: ../gf_*.deb + if-no-files-found: error diff --git a/.gitignore b/.gitignore index 10968810e..01b58ccb4 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,12 @@ *.jar *.gfo *.pgf +debian/.debhelper +debian/debhelper-build-stamp +debian/gf +debian/gf.debhelper.log +debian/gf.substvars +debian/files dist/ dist-newstyle/ src/runtime/c/.libs/ diff --git a/debian/rules b/debian/rules index 917801826..8bd3c1f85 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,6 @@ #!/usr/bin/make -f -%: +%: +dh $@ #dh_shlibdeps has a problem finding which package some of the Haskell @@ -26,14 +26,10 @@ override_dh_auto_build: cd src/runtime/python && EXTRA_INCLUDE_DIRS=$(CURDIR)/src/runtime/c EXTRA_LIB_DIRS=$(CURDIR)/src/runtime/c/.libs python setup.py build cd src/runtime/java && make CFLAGS="-I$(CURDIR)/src/runtime/c -L$(CURDIR)/src/runtime/c/.libs" INSTALL_PATH=/usr echo $(SET_LDL) - -$(SET_LDL) cabal build # builds gf, fails to build example grammars - export $(SET_LDL); PATH=$(CURDIR)/dist/build/gf:$$PATH && make -C ../gf-rgl build - GF_LIB_PATH=$(CURDIR)/../gf-rgl/dist $(SET_LDL) cabal build # have RGL now, ok to build example grammars - make html + -$(SET_LDL) cabal build override_dh_auto_install: - $(SET_LDL) cabal copy --destdir=$(CURDIR)/debian/gf # creates www directory - export GF_LIB_PATH="$$(dirname $$(find "$(CURDIR)/debian/gf" -name www))/lib" && echo "GF_LIB_PATH=$$GF_LIB_PATH" && mkdir -p "$$GF_LIB_PATH" && make -C ../gf-rgl copy + $(SET_LDL) cabal copy --destdir=$(CURDIR)/debian/gf cd src/runtime/c && bash setup.sh copy prefix=$(CURDIR)/debian/gf/usr cd src/runtime/python && python setup.py install --prefix=$(CURDIR)/debian/gf/usr cd src/runtime/java && make INSTALL_PATH=$(CURDIR)/debian/gf/usr install From 8cc901f334e99f2e2cfa6b78ebe3fdfebe32fbc7 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 17 Nov 2020 00:04:57 +0100 Subject: [PATCH 31/97] Remove txt2tags and pandoc from Debian requirements --- debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index a07187983..12eb6b9d9 100644 --- a/debian/control +++ b/debian/control @@ -3,14 +3,14 @@ Section: devel Priority: optional Maintainer: Thomas Hallgren Standards-Version: 3.9.2 -Build-Depends: debhelper (>= 5), haskell-platform (>= 2011.2.0.1), libghc-haskeline-dev, libghc-mtl-dev, libghc-json-dev, autoconf, automake, libtool-bin, python-dev, java-sdk, txt2tags, pandoc +Build-Depends: debhelper (>= 5), haskell-platform (>= 2011.2.0.1), libghc-haskeline-dev, libghc-mtl-dev, libghc-json-dev, autoconf, automake, libtool-bin, python-dev, java-sdk Homepage: http://www.grammaticalframework.org/ Package: gf Architecture: any Depends: ${shlibs:Depends} Description: Tools for GF, a grammar formalism based on type theory - Grammatical Framework (GF) is a grammar formalism based on type theory. + Grammatical Framework (GF) is a grammar formalism based on type theory. It consists of a special-purpose programming language, a compiler of the language, and a generic grammar processor. . From 38facbc0648e992a5c327f2ff6d173f231d0a0cf Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 17 Nov 2020 00:16:01 +0100 Subject: [PATCH 32/97] Copy package from parent dir first because upload-artifact doesn't allow .. --- .github/workflows/build-debian-package.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-debian-package.yml b/.github/workflows/build-debian-package.yml index bd607fb59..f3a937271 100644 --- a/.github/workflows/build-debian-package.yml +++ b/.github/workflows/build-debian-package.yml @@ -34,9 +34,13 @@ jobs: run: | make deb + - name: Copy package + run: | + cp ../gf_*.deb dist/ + - name: Upload artifact uses: actions/upload-artifact@v2 with: name: Debian package - path: ../gf_*.deb + path: dist/gf_*.deb if-no-files-found: error From dbb0bcc5dd7e85d5f790fa4d84a017d79e35b2ec Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 17 Nov 2020 00:44:05 +0100 Subject: [PATCH 33/97] Minors in comments --- bin/build-binary-dist.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index 5258ec702..4ea1c31a3 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -4,7 +4,7 @@ ### It assumes that you have Haskell and Cabal installed. ### Two binary package formats are supported (specified with the FMT env var): ### - plain tar files (.tar.gz) -### - OS X installer packages (.pkg) +### - macOS installer packages (.pkg) os=$(uname) # Operating system name (e.g. Darwin or Linux) hw=$(uname -m) # Hardware name (e.g. i686 or x86_64) @@ -42,7 +42,7 @@ if which >/dev/null python; then EXTRA_INCLUDE_DIRS="$extrainclude" EXTRA_LIB_DIRS="$extralib" python setup.py build python setup.py install --prefix="$destdir$prefix" if [ "$fmt" == pkg ] ; then - # A hack for Python on OS X to find the PGF modules + # A hack for Python on macOS to find the PGF modules pyver=$(ls "$destdir$prefix/lib" | sed -n 's/^python//p') pydest="$destdir/Library/Python/$pyver/site-packages" mkdir -p "$pydest" From 3df552eb5de8850dade820a72f73c6bd0e1f739a Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 17 Nov 2020 00:48:31 +0100 Subject: [PATCH 34/97] Remove 'download/gfc' --- download/gfc | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 download/gfc diff --git a/download/gfc b/download/gfc deleted file mode 100644 index 7c1d30515..000000000 --- a/download/gfc +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -prefix="/usr/local" - -case "i386-apple-darwin9.3.0" in - *-cygwin) - prefix=`cygpath -w "$prefix"`;; -esac - -exec_prefix="${prefix}" -GF_BIN_DIR="${exec_prefix}/bin" -GF_DATA_DIR="${prefix}/share/GF-3.0-beta" - -GFBIN="$GF_BIN_DIR/gf" - -if [ ! -x "${GFBIN}" ]; then - GFBIN=`which gf` -fi - -if [ ! -x "${GFBIN}" ]; then - echo "gf not found." - exit 1 -fi - -exec $GFBIN --batch "$@" From 40e5f90d56f151ce3607b3b4f902c090128d1532 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 17 Nov 2020 01:05:32 +0100 Subject: [PATCH 35/97] Add stubs in download/ for 3.11. Make dowload/index.html redirect to current version. --- download/{index.md => index-3.10.md} | 0 download/index-3.11.md | 182 +++++++++++++++++++++++++++ download/index.html | 8 ++ download/release-3.11.md | 25 ++++ 4 files changed, 215 insertions(+) rename download/{index.md => index-3.10.md} (100%) create mode 100644 download/index-3.11.md create mode 100644 download/index.html create mode 100644 download/release-3.11.md diff --git a/download/index.md b/download/index-3.10.md similarity index 100% rename from download/index.md rename to download/index-3.10.md diff --git a/download/index-3.11.md b/download/index-3.11.md new file mode 100644 index 000000000..4e225f631 --- /dev/null +++ b/download/index-3.11.md @@ -0,0 +1,182 @@ +--- +title: Grammatical Framework Download and Installation +... + +**GF 3.11** was released on ? December 2020. + +What's new? See the [release notes](release-3.11.html). + +## Binary packages + +Unlike previous versions, these binary packages include only the GF core (compiler and runtime). + +| Platform | Download | Features | How to install | +|:----------------|:---------------------------------------------------|:---------------|:---------------------------------| +| macOS | [gf-3.11.pkg](gf-3.11.pkg) | GF, S, C, J, P | Double-click on the package icon | +| Ubuntu (32-bit) | [gf\_3.11\_i386.deb](gf_3.11_i386.deb) | GF, S, C, J, P | `sudo dpkg -i gf_3.11_i386.deb` | +| Ubuntu (64-bit) | [gf\_3.11\_amd64.deb](gf_3.11_amd64.deb) | GF, S, C, J, P | `sudo dpkg -i gf_3.11_amd64.deb` | +| Windows | [gf-3.11-bin-windows.zip](gf-3.11-bin-windows.zip) | GF, S | `unzip gf-3.11-bin-windows.zip` | + +**Features** + +- GF = GF shell and grammar compiler +- S = `gf -server` mode +- C = C run-time system +- J/P = Java/Python binding to the C run-time system + +### Notes + +The Windows package is installed by just unpacking it anywhere. You will +probably need to set the `PATH` and `GF_LIB_PATH` environment variables, +see Inari's notes on [Installing GF on Windows](http://www.grammaticalframework.org/~inari/gf-windows.html#toc3). + +The Ubuntu `.deb` packages should work on Ubuntu 16.04 and 18.04 and +similar Linux distributions. The `.deb` packages were updated +to version 3.10-2 after the release of GF 3.10. +(Because of a packaging bug the Resource Grammar Library was missing +in the 3.10-1 packages.) + +The packages for macOS (Mac OS X) should work on at least 10.13 and +10.14 (High Sierra and Mojave) + +## Installing the latest release from source + +[GF is on Hackage](http://hackage.haskell.org/package/gf), so under +normal circumstances the procedure is fairly simple: + +1. Install a recent version of the [Haskell + Platform](http://hackage.haskell.org/platform) (see note below) +2. `cabal update` +3. On Linux: install some C libraries from your Linux distribution (see note below) +4. `cabal install gf` + +This installs the GF executable and Haskell libraries, but **does not include the RGL**. + +You can also download the source code release from [GitHub](https://github.com/GrammaticalFramework/gf-core/releases), +and follow the instructions below under **Installing from the latest developer source code**. + +### Notes + +**Installation location** + +The above steps installs GF for a single user. The executables are put +in `$HOME/.cabal/bin` (or, with recent versions of the Haskell platform +on Mac OS X, in `$HOME/Library/Haskell/bin`), so it is a good idea to +put a line in your `.bash_profile` or `.profile` to add that directory +to you path: + +``` +PATH=$HOME/.cabal/bin:$PATH +``` + +or + +``` +PATH=$HOME/Library/Haskell/bin:$PATH +``` + +**Build tools** + +In order to compile GF you need the build tools **Alex** and **Happy**. +These can be installed via Cabal, e.g.: + +``` +cabal install alex happy +``` + +or obtained by other means, depending on your OS. + +**Haskeline** + +GF uses [`haskeline`](http://hackage.haskell.org/package/haskeline), which +on Linux depends on some non-Haskell libraries that won't be installed +automatically by cabal, and therefore need to be installed manually. +Here is one way to do this: + +- On Ubuntu: `sudo apt-get install libghc-haskeline-dev` +- On Fedora: `sudo dnf install ghc-haskeline-devel` + +**GHC version** + +The GF source code has been updated to compile with GHC 8.4. +Using older versions of GHC (e.g. 8.2, 8.0 and 7.10) should still work too. + +## Installing from the latest developer source code + +If you haven't already, clone the repository with: + +``` +git clone https://github.com/GrammaticalFramework/gf-core.git +``` + +If you've already cloned the repository previously, update with: + +``` +git pull +``` + +Then install with: + +``` +cabal install +``` + +or, if you're a Stack user: + +``` +stack install +``` + +The above notes for installing from source apply also in these cases. +For more info on working with the GF source code, see the +[GF Developers Guide](../doc/gf-developers.html). + +## Installing the RGL from source + +To install the RGL from source, +you can download a release from [GitHub](https://github.com/GrammaticalFramework/gf-rgl/releases) +or get the latest version by cloning the repository: + +``` +git clone https://github.com/GrammaticalFramework/gf-rgl.git +``` + +In both cases, once you have the RGL sources you can install them by running: + +``` +make +``` + +in the RGL folder. +This assumes that you already have GF installed. +For more details about building the RGL, see the [RGL README](https://github.com/GrammaticalFramework/gf-rgl/blob/master/README.md). + +## Installing the Python bindings from PyPI + +The Python library is available on PyPI as `pgf`, so it can be installed using: + +``` +pip install pgf +``` + +We provide binary wheels for Linux and OSX (with Windows missing so far), which +include the C runtime and a ready-to-go. If there is no binary distribution for +your platform, this will install the source tarball, which will attempt to build +the binding during installation, and requires the GF C runtime to be installed on +your system. + +## Older releases + +- [GF 3.10](index-3.10.html) (December 2018) +- [GF 3.9](index-3.9.html) (August 2017) +- [GF 3.8](index-3.8.html) (June 2016) +- [GF 3.7.1](index-3.7.1.html) (October 2015) +- [GF 3.7](index-3.7.html) (June 2015) +- [GF 3.6](index-3.6.html) (June 2014) +- [GF 3.5](index-3.5.html) (August 2013) +- [GF 3.4](index-3.4.html) (January 2013) +- [GF 3.3.3](index-3.3.3.html) (March 2012) +- [GF 3.3](index-3.3.html) (October 2011) +- [GF 3.2.9](index-3.2.9.html) source-only snapshot (September 2011) +- [GF 3.2](index-3.2.html) (December 2010) +- [GF 3.1.6](index-3.1.6.html) (April 2010) diff --git a/download/index.html b/download/index.html new file mode 100644 index 000000000..eb32412f8 --- /dev/null +++ b/download/index.html @@ -0,0 +1,8 @@ + + + + + + You are being redirected to the current version of this page. + + diff --git a/download/release-3.11.md b/download/release-3.11.md new file mode 100644 index 000000000..a6af7fafe --- /dev/null +++ b/download/release-3.11.md @@ -0,0 +1,25 @@ +--- +title: GF 3.11 Release Notes +date: ? December 2020 +... + +## Installation + +See the [download page](index.html). + +## What's new + +From this release, the binary GF core packages do not contain the RGL. +The RGL's release cycle is now completely separate from GF's. See [RGL releases](https://github.com/GrammaticalFramework/gf-rgl/releases). + +Over ... changes have been pushed to GF core +since the release of GF 3.10 in December 2018. + +## General + +- Testsuite. +- Compatibiilty with new versions of GHC. + +## GF compiler and run-time library + +- More improvements to error messages. From 6862098d8bd6f47513d52e132aba419997979f90 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 17 Nov 2020 01:07:05 +0100 Subject: [PATCH 36/97] Add preliminary RELEASE.md --- RELEASE.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ bin/update_html | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 000000000..131a37b5d --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,47 @@ +# GF Core releases + +🚨 WARNING! The information here is preliminary! + +## Creating a new release + +### 1. Prepare the repository + +**Web pages** + +1. Create `download/index-X.Y.md` with installation instructions. +1. Create `download/release-X.Y.md` with changelog information. +1. Update `download/index.html` to redirect to the new version. +1. Add announcement in news section in `index.html` + +**Version numbers** + +1. Update version number in `gf.cabal` (ommitting `-git` suffix) +1. Add a new line in `debian/changelog` + +### 2. Create GitHub release + +1. When the above changes are committed to the `master` branch in the repository, + check that all builds are successful: + - https://github.com/GrammaticalFramework/gf-core/actions + - https://travis-ci.org/github/GrammaticalFramework/gf-core +1. Create a GitHub release here: https://github.com/GrammaticalFramework/gf-core/releases/new + with a tag format `RELEASE-X.Y` + +### 3. Binary packages + +Build and attach binaries to the release by running the relevant GitHub Actions workflows (TODO): + +1. Go to https://github.com/GrammaticalFramework/gf-rgl/actions +1. Click "Build [platform] package" under _Workflows_ +1. Click "Run workflow" and specify the tag `RELEASE-X.Y` + +### 4. Upload to Hackage + +1. Run `make sdist` +1. Visit `https://hackage.haskell.org/upload` and upload the file `dist/gf-X.Y.tar.gz`, + OR upload directly with Cabal (≥2.4): `cabal upload dist/gf-X.Y.tar.gz` +1. If the documentation-building fails on the Hackage server, do: +``` +cabal v2-haddock --builddir=dist/docs --haddock-for-hackage --enable-doc +cabal upload --documentation dist/docs/*-docs.tar.gz +``` diff --git a/bin/update_html b/bin/update_html index 912ff1fa0..717670085 100755 --- a/bin/update_html +++ b/bin/update_html @@ -147,7 +147,7 @@ else fi done find . -name '*.md' | while read file ; do - if [[ "$file" == *"README.md" ]] ; then continue ; fi + if [[ "$file" == *"README.md" ]] || [[ "$file" == *"RELEASE.md" ]] ; then continue ; fi html="${file%.md}.html" if [ "$file" -nt "$html" ] || [ "$template" -nt "$html" ] ; then render_md_html "$file" "$html" From d4ccd2848c293eabb511e966ed6f12066a2b2ee0 Mon Sep 17 00:00:00 2001 From: krangelov Date: Tue, 17 Nov 2020 10:26:00 +0100 Subject: [PATCH 37/97] Take a step back and do bottom up prediction only when needed. This solves the problem that some sentences were impossible to parse. --- src/runtime/c/pgf/parser.c | 334 +++++++++++++++---------------------- 1 file changed, 138 insertions(+), 196 deletions(-) diff --git a/src/runtime/c/pgf/parser.c b/src/runtime/c/pgf/parser.c index 1ee24ac59..d558908ab 100644 --- a/src/runtime/c/pgf/parser.c +++ b/src/runtime/c/pgf/parser.c @@ -61,6 +61,14 @@ typedef struct { typedef enum { BIND_NONE, BIND_HARD, BIND_SOFT } BIND_TYPE; +typedef struct { + PgfProductionIdx* idx; + size_t offset; + size_t sym_idx; +} PgfLexiconIdxEntry; + +typedef GuBuf PgfLexiconIdx; + struct PgfParseState { PgfParseState* next; @@ -74,6 +82,8 @@ struct PgfParseState { size_t end_offset; prob_t viterbi_prob; + + PgfLexiconIdx* lexicon_idx; }; typedef struct PgfAnswers { @@ -686,16 +696,6 @@ pgf_result_production(PgfParsing* ps, static void pgf_parsing_complete(PgfParsing* ps, PgfItem* item, PgfExprProb *ep); -static void -pgf_parsing_push_item(PgfParseState* state, PgfItem* item) -{ - if (gu_buf_length(state->agenda) == 0) { - state->viterbi_prob = - item->inside_prob+item->conts->outside_prob; - } - gu_buf_heap_push(state->agenda, pgf_item_prob_order, &item); -} - static void pgf_parsing_push_production(PgfParsing* ps, PgfParseState* state, PgfItemConts* conts, PgfProduction prod) @@ -727,7 +727,7 @@ pgf_parsing_combine(PgfParsing* ps, } pgf_item_advance(item, ps->pool); - pgf_parsing_push_item(before, item); + gu_buf_heap_push(before->agenda, pgf_item_prob_order, &item); } static PgfProduction @@ -898,9 +898,65 @@ pgf_parsing_complete(PgfParsing* ps, PgfItem* item, PgfExprProb *ep) } } +PGF_INTERNAL_DECL int +pgf_symbols_cmp(PgfCohortSpot* spot, + PgfSymbols* syms, size_t* sym_idx, + bool case_sensitive); + +static void +pgf_parsing_lookahead(PgfParsing *ps, PgfParseState* state, + int i, int j, ptrdiff_t min, ptrdiff_t max) +{ + // This is a variation of a binary search algorithm which + // can retrieve all prefixes of a string with minimal + // comparisons, i.e. there is no need to lookup every + // prefix separately. + + while (i <= j) { + int k = (i+j) / 2; + PgfSequence* seq = gu_seq_index(ps->concr->sequences, PgfSequence, k); + + PgfCohortSpot start = {0, ps->sentence + state->end_offset}; + PgfCohortSpot current = start; + size_t sym_idx = 0; + int cmp = pgf_symbols_cmp(¤t, seq->syms, &sym_idx, ps->case_sensitive); + if (cmp < 0) { + j = k-1; + } else if (cmp > 0) { + ptrdiff_t len = current.ptr - start.ptr; + + if (min <= len) + pgf_parsing_lookahead(ps, state, i, k-1, min, len); + + if (len+1 <= max) + pgf_parsing_lookahead(ps, state, k+1, j, len+1, max); + + break; + } else { + ptrdiff_t len = current.ptr - start.ptr; + + if (min <= len-1) + pgf_parsing_lookahead(ps, state, i, k-1, min, len-1); + + if (seq->idx != NULL) { + PgfLexiconIdxEntry* entry = gu_buf_extend(state->lexicon_idx); + entry->idx = seq->idx; + entry->offset = (size_t) (current.ptr - ps->sentence); + entry->sym_idx = sym_idx; + } + + if (len+1 <= max) + pgf_parsing_lookahead(ps, state, k+1, j, len+1, max); + + break; + } + } +} + static PgfParseState* pgf_new_parse_state(PgfParsing* ps, size_t start_offset, - BIND_TYPE bind_type) + BIND_TYPE bind_type, + prob_t viterbi_prob) { PgfParseState** pstate; if (ps->before == NULL && start_offset == 0) @@ -953,172 +1009,36 @@ pgf_new_parse_state(PgfParsing* ps, size_t start_offset, (start_offset == end_offset); state->start_offset = start_offset; state->end_offset = end_offset; - state->viterbi_prob = 0; + state->viterbi_prob = viterbi_prob; + state->lexicon_idx = + gu_new_buf(PgfLexiconIdxEntry, ps->pool); if (ps->before == NULL && start_offset == 0) state->needs_bind = false; + if (gu_seq_length(ps->concr->sequences) > 0) { + // Add epsilon lexical rules to the bottom up index + PgfSequence* seq = gu_seq_index(ps->concr->sequences, PgfSequence, 0); + if (gu_seq_length(seq->syms) == 0 && seq->idx != NULL) { + PgfLexiconIdxEntry* entry = gu_buf_extend(state->lexicon_idx); + entry->idx = seq->idx; + entry->offset = state->start_offset; + entry->sym_idx= 0; + } + + // Add non-epsilon lexical rules to the bottom up index + if (!state->needs_bind) { + pgf_parsing_lookahead(ps, state, + 0, gu_seq_length(ps->concr->sequences)-1, + 1, strlen(ps->sentence)-state->end_offset); + } + } + *pstate = state; return state; } -PGF_INTERNAL_DECL int -pgf_symbols_cmp(PgfCohortSpot* spot, - PgfSymbols* syms, size_t* sym_idx, - bool case_sensitive); - -static bool -pgf_parsing_scan_helper(PgfParsing *ps, PgfParseState* state, - int i, int j, ptrdiff_t min, ptrdiff_t max) -{ - // This is a variation of a binary search algorithm which - // can retrieve all prefixes of a string with minimal - // comparisons, i.e. there is no need to lookup every - // prefix separately. - - bool found = false; - while (i <= j) { - int k = (i+j) / 2; - PgfSequence* seq = gu_seq_index(ps->concr->sequences, PgfSequence, k); - - PgfCohortSpot start = {0, ps->sentence+state->end_offset}; - PgfCohortSpot current = start; - - size_t sym_idx = 0; - int cmp = pgf_symbols_cmp(¤t, seq->syms, &sym_idx, ps->case_sensitive); - if (cmp < 0) { - j = k-1; - } else if (cmp > 0) { - ptrdiff_t len = current.ptr - start.ptr; - - if (min <= len) - if (pgf_parsing_scan_helper(ps, state, i, k-1, min, len)) - found = true; - - if (len+1 <= max) - if (pgf_parsing_scan_helper(ps, state, k+1, j, len+1, max)) - found = true; - - break; - } else { - ptrdiff_t len = current.ptr - start.ptr; - - if (min <= len) - if (pgf_parsing_scan_helper(ps, state, i, k-1, min, len)) - found = true; - - // Here we do bottom-up prediction for all lexical categories. - // The epsilon productions will be predicted in top-down - // fashion while parsing. - if (seq->idx != NULL && len > 0) { - found = true; - - // A new state will mark the end of the current match - PgfParseState* new_state = - pgf_new_parse_state(ps, (size_t) (current.ptr - ps->sentence), BIND_NONE); - - // Bottom-up prediction for lexical rules - size_t n_entries = gu_buf_length(seq->idx); - for (size_t i = 0; i < n_entries; i++) { - PgfProductionIdxEntry* entry = - gu_buf_index(seq->idx, PgfProductionIdxEntry, i); - - PgfItemConts* conts = - pgf_parsing_get_conts(state, - entry->ccat, entry->lin_idx, - ps->pool); - - // Create the new category if it doesn't exist yet - PgfCCat* tmp_ccat = pgf_parsing_get_completed(new_state, conts); - PgfCCat* ccat = tmp_ccat; - if (ccat == NULL) { - ccat = pgf_parsing_create_completed(ps, new_state, conts, INFINITY); - } - - // Add the production - if (ccat->prods == NULL || ccat->n_synprods >= gu_seq_length(ccat->prods)) { - ccat->prods = gu_realloc_seq(ccat->prods, PgfProduction, ccat->n_synprods+1); - } - GuVariantInfo i; - i.tag = PGF_PRODUCTION_APPLY; - i.data = entry->papp; - PgfProduction prod = gu_variant_close(i); - gu_seq_set(ccat->prods, PgfProduction, ccat->n_synprods++, prod); - - // Update the category's probability to be minimum - if (ccat->viterbi_prob > entry->papp->fun->ep->prob) - ccat->viterbi_prob = entry->papp->fun->ep->prob; - -#ifdef PGF_PARSER_DEBUG - GuPool* tmp_pool = gu_new_pool(); - GuOut* out = gu_file_out(stderr, tmp_pool); - GuExn* err = gu_exn(tmp_pool); - if (tmp_ccat == NULL) { - gu_printf(out, err, "["); - pgf_print_range(state, new_state, out, err); - gu_puts("; ", out, err); - pgf_print_fid(conts->ccat->fid, out, err); - gu_printf(out, err, "; %d; ", - conts->lin_idx); - pgf_print_fid(ccat->fid, out, err); - gu_puts("] ", out, err); - pgf_print_fid(ccat->fid, out, err); - gu_printf(out, err, ".chunk_count=%d\n", ccat->chunk_count); - } - pgf_print_production(ccat->fid, prod, out, err); - gu_pool_free(tmp_pool); -#endif - } - } - - if (len <= max) - if (pgf_parsing_scan_helper(ps, state, k+1, j, len, max)) - found = true; - - break; - } - } - - return found; -} - -static void -pgf_parsing_scan(PgfParsing *ps) -{ - size_t len = strlen(ps->sentence); - - PgfParseState* state = - pgf_new_parse_state(ps, 0, BIND_SOFT); - - while (state != NULL && state->end_offset < len) { - if (state->needs_bind) { - // We have encountered two tokens without space in between. - // Those can be accepted only if there is a BIND token - // in between. We encode this by having one more state - // at the same offset. A transition between these two - // states is possible only with the BIND token. - state = - pgf_new_parse_state(ps, state->end_offset, BIND_HARD); - } - - if (!pgf_parsing_scan_helper - (ps, state, - 0, gu_seq_length(ps->concr->sequences)-1, - 1, len-state->end_offset)) { - // skip one character and try again - GuString s = ps->sentence+state->end_offset; - gu_utf8_decode((const uint8_t**) &s); - pgf_new_parse_state(ps, s-ps->sentence, BIND_NONE); - } - - if (state == ps->before) - state = ps->after; - else - state = state->next; - } -} - static void pgf_parsing_add_transition(PgfParsing* ps, PgfToken tok, PgfItem* item) { @@ -1138,14 +1058,36 @@ pgf_parsing_add_transition(PgfParsing* ps, PgfToken tok, PgfItem* item) if (!ps->before->needs_bind && cmp_string(¤t, tok, ps->case_sensitive) == 0) { PgfParseState* state = pgf_new_parse_state(ps, (current.ptr - ps->sentence), - BIND_NONE); - pgf_parsing_push_item(state, item); + BIND_NONE, + item->inside_prob+item->conts->outside_prob); + gu_buf_heap_push(state->agenda, pgf_item_prob_order, &item); } else { pgf_item_free(ps, item); } } } +static void +pgf_parsing_predict_lexeme(PgfParsing* ps, PgfItemConts* conts, + PgfProductionIdxEntry* entry, + size_t offset, size_t sym_idx) +{ + GuVariantInfo i = { PGF_PRODUCTION_APPLY, entry->papp }; + PgfProduction prod = gu_variant_close(i); + PgfItem* item = + pgf_new_item(ps, conts, prod); + PgfSymbols* syms = entry->papp->fun->lins[conts->lin_idx]->syms; + item->sym_idx = sym_idx; + pgf_item_set_curr_symbol(item, ps->pool); + prob_t prob = item->inside_prob+item->conts->outside_prob; + PgfParseState* state = + pgf_new_parse_state(ps, offset, BIND_NONE, prob); + if (state->viterbi_prob > prob) { + state->viterbi_prob = prob; + } + gu_buf_heap_push(state->agenda, pgf_item_prob_order, &item); +} + static void pgf_parsing_td_predict(PgfParsing* ps, PgfItem* item, PgfCCat* ccat, size_t lin_idx) @@ -1193,36 +1135,34 @@ pgf_parsing_td_predict(PgfParsing* ps, pgf_parsing_push_production(ps, ps->before, conts, prod); } - // Top-down prediction for epsilon lexical rules if any - PgfSequence* seq = gu_seq_index(ps->concr->sequences, PgfSequence, 0); - if (gu_seq_length(seq->syms) == 0 && seq->idx != NULL) { + // Bottom-up prediction for lexical and epsilon rules + size_t n_idcs = gu_buf_length(ps->before->lexicon_idx); + for (size_t i = 0; i < n_idcs; i++) { + PgfLexiconIdxEntry* lentry = + gu_buf_index(ps->before->lexicon_idx, PgfLexiconIdxEntry, i); PgfProductionIdxEntry key; key.ccat = ccat; key.lin_idx = lin_idx; key.papp = NULL; PgfProductionIdxEntry* value = - gu_seq_binsearch(gu_buf_data_seq(seq->idx), + gu_seq_binsearch(gu_buf_data_seq(lentry->idx), pgf_production_idx_entry_order, PgfProductionIdxEntry, &key); if (value != NULL) { - GuVariantInfo i = { PGF_PRODUCTION_APPLY, value->papp }; - PgfProduction prod = gu_variant_close(i); - pgf_parsing_push_production(ps, ps->before, conts, prod); + pgf_parsing_predict_lexeme(ps, conts, value, lentry->offset, lentry->sym_idx); PgfProductionIdxEntry* start = - gu_buf_data(seq->idx); + gu_buf_data(lentry->idx); PgfProductionIdxEntry* end = - start + gu_buf_length(seq->idx)-1; + start + gu_buf_length(lentry->idx)-1; PgfProductionIdxEntry* left = value-1; while (left >= start && value->ccat->fid == left->ccat->fid && value->lin_idx == left->lin_idx) { - GuVariantInfo i = { PGF_PRODUCTION_APPLY, left->papp }; - PgfProduction prod = gu_variant_close(i); - pgf_parsing_push_production(ps, ps->before, conts, prod); + pgf_parsing_predict_lexeme(ps, conts, left, lentry->offset, lentry->sym_idx); left--; } @@ -1230,9 +1170,7 @@ pgf_parsing_td_predict(PgfParsing* ps, while (right <= end && value->ccat->fid == right->ccat->fid && value->lin_idx == right->lin_idx) { - GuVariantInfo i = { PGF_PRODUCTION_APPLY, right->papp }; - PgfProduction prod = gu_variant_close(i); - pgf_parsing_push_production(ps, ps->before, conts, prod); + pgf_parsing_predict_lexeme(ps, conts, right, lentry->offset, lentry->sym_idx); right++; } } @@ -1271,7 +1209,7 @@ pgf_parsing_pre(PgfParsing* ps, PgfItem* item, PgfSymbols* syms) } else { item->alt = 0; pgf_item_advance(item, ps->pool); - pgf_parsing_push_item(ps->before, item); + gu_buf_heap_push(ps->before->agenda, pgf_item_prob_order, &item); } } @@ -1401,8 +1339,9 @@ pgf_parsing_symbol(PgfParsing* ps, PgfItem* item, PgfSymbol sym) item->curr_sym = gu_null_variant; item->sym_idx = gu_seq_length(syms); PgfParseState* state = - pgf_new_parse_state(ps, offset, BIND_NONE); - pgf_parsing_push_item(state, item); + pgf_new_parse_state(ps, offset, BIND_NONE, + item->inside_prob+item->conts->outside_prob); + gu_buf_heap_push(state->agenda, pgf_item_prob_order, &item); match = true; } } @@ -1445,10 +1384,11 @@ pgf_parsing_symbol(PgfParsing* ps, PgfItem* item, PgfSymbol sym) if (ps->before->start_offset == ps->before->end_offset && ps->before->needs_bind) { PgfParseState* state = - pgf_new_parse_state(ps, ps->before->end_offset, BIND_HARD); + pgf_new_parse_state(ps, ps->before->end_offset, BIND_HARD, + item->inside_prob+item->conts->outside_prob); if (state != NULL) { pgf_item_advance(item, ps->pool); - pgf_parsing_push_item(state, item); + gu_buf_heap_push(state->agenda, pgf_item_prob_order, &item); } else { pgf_item_free(ps, item); } @@ -1462,10 +1402,11 @@ pgf_parsing_symbol(PgfParsing* ps, PgfItem* item, PgfSymbol sym) if (ps->before->start_offset == ps->before->end_offset) { if (ps->before->needs_bind) { PgfParseState* state = - pgf_new_parse_state(ps, ps->before->end_offset, BIND_HARD); + pgf_new_parse_state(ps, ps->before->end_offset, BIND_HARD, + item->inside_prob+item->conts->outside_prob); if (state != NULL) { pgf_item_advance(item, ps->pool); - pgf_parsing_push_item(state, item); + gu_buf_heap_push(state->agenda, pgf_item_prob_order, &item); } else { pgf_item_free(ps, item); } @@ -1474,7 +1415,7 @@ pgf_parsing_symbol(PgfParsing* ps, PgfItem* item, PgfSymbol sym) } } else { pgf_item_advance(item, ps->pool); - pgf_parsing_push_item(ps->before, item); + gu_buf_heap_push(ps->before->agenda, pgf_item_prob_order, &item); } break; } @@ -1725,7 +1666,8 @@ pgf_parsing_init(PgfConcr* concr, PgfCId cat, ps->heuristic_factor = heuristic_factor; } - pgf_parsing_scan(ps); + PgfParseState* state = + pgf_new_parse_state(ps, 0, BIND_SOFT, 0); int fidString = -1; PgfCCat* start_ccat = gu_new(PgfCCat, ps->pool); @@ -1745,7 +1687,7 @@ pgf_parsing_init(PgfConcr* concr, PgfCId cat, #endif PgfItemConts* conts = - pgf_parsing_get_conts(ps->before, start_ccat, 0, ps->pool); + pgf_parsing_get_conts(state, start_ccat, 0, ps->pool); gu_buf_push(conts->items, PgfItem*, NULL); size_t n_ccats = gu_seq_length(cnccat->cats); From 08af1356530de0d7d8dbcf095aab99911f5113ca Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 18 Nov 2020 23:08:49 +0100 Subject: [PATCH 38/97] Install openjdk in macOS build --- .github/workflows/build-all-versions.yml | 8 ++++---- .github/workflows/build-macos-package.yml | 5 +++-- .github/workflows/build-python-package.yml | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-all-versions.yml b/.github/workflows/build-all-versions.yml index 52db74850..df71f0ac0 100644 --- a/.github/workflows/build-all-versions.yml +++ b/.github/workflows/build-all-versions.yml @@ -13,16 +13,16 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest] cabal: ["3.2"] ghc: - "8.6.5" - "8.8.3" - "8.10.1" exclude: - - os: macOS-latest + - os: macos-latest ghc: 8.8.3 - - os: macOS-latest + - os: macos-latest ghc: 8.6.5 - os: windows-latest ghc: 8.8.3 @@ -92,4 +92,4 @@ jobs: # - name: Test # run: | - # stack test --system-ghc \ No newline at end of file + # stack test --system-ghc diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index c01227791..e3ed3def2 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -10,7 +10,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macOS-latest] + os: [macos-10.15] ghc: ["8.6.5"] cabal: ["2.4"] @@ -27,7 +27,8 @@ jobs: - name: Install build tools run: | brew install \ - automake + automake \ + openjdk cabal v1-install alex happy - name: Build macOS package diff --git a/.github/workflows/build-python-package.yml b/.github/workflows/build-python-package.yml index 921da9fb5..fef31a785 100644 --- a/.github/workflows/build-python-package.yml +++ b/.github/workflows/build-python-package.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-18.04, macos-latest] + os: [ubuntu-18.04, macos-10.15] steps: - uses: actions/checkout@v1 From 6ee7c88f342a03690dabf596ae1ecdc8df7da851 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 18 Nov 2020 23:10:54 +0100 Subject: [PATCH 39/97] Add first attempt at Windows build --- .github/workflows/build-windows-package.yml | 43 +++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/build-windows-package.yml diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml new file mode 100644 index 000000000..994d377ca --- /dev/null +++ b/.github/workflows/build-windows-package.yml @@ -0,0 +1,43 @@ +name: Build Windows Package + +on: + push: + workflow_dispatch: + +jobs: + build: + name: Build on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-2019] + ghc: ["8.6.5"] + cabal: ["2.4"] + + steps: + - uses: actions/checkout@v2 + + - name: Setup Haskell + uses: actions/setup-haskell@v1 + id: setup-haskell-cabal + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + # - name: Install build tools + # run: | + # brew install \ + # automake \ + # openjdk + # cabal v1-install alex happy + + - name: Build GF package + run: | + cabal build + + # - name: Upload artifact + # uses: actions/upload-artifact@v2 + # with: + # name: macOS package + # path: dist/gf-*.pkg + # if-no-files-found: error From 0d12c7101c78444c1c7dbce55c9a311d4ecfd406 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 18 Nov 2020 23:15:15 +0100 Subject: [PATCH 40/97] Add debugging output to macOS build for locating JNI headers --- .github/workflows/build-macos-package.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index e3ed3def2..7c4854d3d 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -17,6 +17,11 @@ jobs: steps: - uses: actions/checkout@v2 + # just to see output + - run: locate jni.h + - run: find / -name jni.h + - run: brew reinstall openjdk + - name: Setup Haskell uses: actions/setup-haskell@v1 id: setup-haskell-cabal @@ -27,8 +32,7 @@ jobs: - name: Install build tools run: | brew install \ - automake \ - openjdk + automake cabal v1-install alex happy - name: Build macOS package From 012541ff5576ead9d999b5e66821a52b3bcfdace Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 18 Nov 2020 23:17:42 +0100 Subject: [PATCH 41/97] Remove locate command, which fails because of missing DB --- .github/workflows/build-macos-package.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 7c4854d3d..209b31de2 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -18,7 +18,6 @@ jobs: - uses: actions/checkout@v2 # just to see output - - run: locate jni.h - run: find / -name jni.h - run: brew reinstall openjdk From 8e9212d059f67a73a0413ed01d2cab1524af5d1f Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 18 Nov 2020 23:19:24 +0100 Subject: [PATCH 42/97] First install dependencies in Windows build --- .github/workflows/build-windows-package.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 994d377ca..0d347aedc 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -33,6 +33,8 @@ jobs: - name: Build GF package run: | + cabal install --only-dependencies + cabal configure cabal build # - name: Upload artifact From d39e4a22a8c591938170e7f66c3c1c8ea9073e15 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 18 Nov 2020 23:24:38 +0100 Subject: [PATCH 43/97] Don't build binaries on push --- .github/workflows/build-debian-package.yml | 1 - .github/workflows/build-macos-package.yml | 1 - .github/workflows/build-python-package.yml | 6 +++++- .github/workflows/build-windows-package.yml | 1 - 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-debian-package.yml b/.github/workflows/build-debian-package.yml index f3a937271..8248388ad 100644 --- a/.github/workflows/build-debian-package.yml +++ b/.github/workflows/build-debian-package.yml @@ -1,7 +1,6 @@ name: Build Debian Package on: - push: workflow_dispatch: jobs: diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 209b31de2..384f6527d 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -1,7 +1,6 @@ name: Build macOS Package on: - push: workflow_dispatch: jobs: diff --git a/.github/workflows/build-python-package.yml b/.github/workflows/build-python-package.yml index fef31a785..6326821dc 100644 --- a/.github/workflows/build-python-package.yml +++ b/.github/workflows/build-python-package.yml @@ -1,6 +1,10 @@ name: Build & Publish Python Package -on: [push, pull_request] +# Trigger the workflow on push or pull request, but only for the master branch +on: + pull_request: + push: + branches: [master] jobs: build_wheels: diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 0d347aedc..60647f982 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -1,7 +1,6 @@ name: Build Windows Package on: - push: workflow_dispatch: jobs: From 293d05fde14b1f2cf887e900e293b48b44dc65a6 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 18 Nov 2020 23:26:31 +0100 Subject: [PATCH 44/97] Install alex, happy in Windows build --- .github/workflows/build-windows-package.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 60647f982..2b1f31123 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -23,14 +23,11 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} - # - name: Install build tools - # run: | - # brew install \ - # automake \ - # openjdk - # cabal v1-install alex happy + - name: Install build tools + run: | + cabal install alex happy - - name: Build GF package + - name: Build GF run: | cabal install --only-dependencies cabal configure From b0341ec42d71eaa5ff9e527e4daff3501a2a1a62 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 18 Nov 2020 23:48:20 +0100 Subject: [PATCH 45/97] Add more test commands for JNI in macOS; re-enable mac & Windows builds on push for testing --- .github/workflows/build-macos-package.yml | 5 ++++- .github/workflows/build-windows-package.yml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 384f6527d..12c87e451 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -1,6 +1,7 @@ name: Build macOS Package on: + push: # testing until merged into master workflow_dispatch: jobs: @@ -17,7 +18,9 @@ jobs: - uses: actions/checkout@v2 # just to see output - - run: find / -name jni.h + - run: echo $JAVA_HOME + - run: echo $JAVA_INCLUDE_DIR + - run: export JAVA_INCLUDE_DIR=/usr/local/Cellar/openjdk/15.0.1/include - run: brew reinstall openjdk - name: Setup Haskell diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 2b1f31123..7f9397177 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -1,6 +1,7 @@ name: Build Windows Package on: + push: # testing until merged into master workflow_dispatch: jobs: From 131d196fadd4b05f2b37371f1ad63dfdd5e692e6 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 00:02:50 +0100 Subject: [PATCH 46/97] Add 'export CPPFLAGS' line to macOS build --- .github/workflows/build-macos-package.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 12c87e451..89b771427 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -17,12 +17,6 @@ jobs: steps: - uses: actions/checkout@v2 - # just to see output - - run: echo $JAVA_HOME - - run: echo $JAVA_INCLUDE_DIR - - run: export JAVA_INCLUDE_DIR=/usr/local/Cellar/openjdk/15.0.1/include - - run: brew reinstall openjdk - - name: Setup Haskell uses: actions/setup-haskell@v1 id: setup-haskell-cabal @@ -38,6 +32,7 @@ jobs: - name: Build macOS package run: | + export CPPFLAGS="-I/usr/local/opt/openjdk/include" make pkg - name: Upload artifact From a48bbb3b132d1ef1ba10ca3218e140624fba0b57 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 00:08:07 +0100 Subject: [PATCH 47/97] Enable server, upload artifact (only exe) to Windows build --- .github/workflows/build-windows-package.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 7f9397177..9bced8a01 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -30,13 +30,13 @@ jobs: - name: Build GF run: | - cabal install --only-dependencies - cabal configure + cabal install --only-dependencies -fserver + cabal configure -fserver cabal build - # - name: Upload artifact - # uses: actions/upload-artifact@v2 - # with: - # name: macOS package - # path: dist/gf-*.pkg - # if-no-files-found: error + - name: Upload exe to artifact + uses: actions/upload-artifact@v2 + with: + name: Windows package + path: dist\build\gf\gf.exe + if-no-files-found: error From 0b3ae5aaa28232353d787eac5a86d4298c50270c Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 00:26:53 +0100 Subject: [PATCH 48/97] Rename artifacts --- .github/workflows/build-debian-package.yml | 3 ++- .github/workflows/build-macos-package.yml | 2 +- .github/workflows/build-windows-package.yml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-debian-package.yml b/.github/workflows/build-debian-package.yml index 8248388ad..cfd48825f 100644 --- a/.github/workflows/build-debian-package.yml +++ b/.github/workflows/build-debian-package.yml @@ -1,6 +1,7 @@ name: Build Debian Package on: + push: # testing until merged into master workflow_dispatch: jobs: @@ -40,6 +41,6 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v2 with: - name: Debian package + name: gf-${{ github.sha }}-debian path: dist/gf_*.deb if-no-files-found: error diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 89b771427..5b751a9d6 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -38,6 +38,6 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v2 with: - name: macOS package + name: gf-${{ github.sha }}-macos path: dist/gf-*.pkg if-no-files-found: error diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 9bced8a01..56312717e 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -37,6 +37,6 @@ jobs: - name: Upload exe to artifact uses: actions/upload-artifact@v2 with: - name: Windows package + name: gf-${{ github.sha }}-windows path: dist\build\gf\gf.exe if-no-files-found: error From a072b4688b6045d2054d4910cccc26042544aae5 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 00:40:51 +0100 Subject: [PATCH 49/97] Create symlink to JNI headers in a place where the Java runtime makefile looks --- .github/workflows/build-macos-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 5b751a9d6..55f60d2c8 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -32,7 +32,7 @@ jobs: - name: Build macOS package run: | - export CPPFLAGS="-I/usr/local/opt/openjdk/include" + ln -s /usr/local/opt/openjdk/include /Library/Java/Home/include make pkg - name: Upload artifact From 4987b70df7711b274f7d420aa0ff99c74ac37d02 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 00:49:31 +0100 Subject: [PATCH 50/97] Make directory first --- .github/workflows/build-macos-package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 55f60d2c8..9f4f0a847 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -32,6 +32,7 @@ jobs: - name: Build macOS package run: | + mkdir -p /Library/Java/Home ln -s /usr/local/opt/openjdk/include /Library/Java/Home/include make pkg From 424e6887b517bfb2638ed19391ffc025b058ed34 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 00:58:07 +0100 Subject: [PATCH 51/97] Attempt to build C runtime in Windows build using MSYS --- .github/workflows/build-windows-package.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 56312717e..3b71a3c6e 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -17,6 +17,12 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Setup MSYS2 + uses: msys2/setup-msys2@v2 + with: + install: >- + base-devel + - name: Setup Haskell uses: actions/setup-haskell@v1 id: setup-haskell-cabal @@ -28,6 +34,19 @@ jobs: run: | cabal install alex happy + - name: Build C runtime + shell: msys2 {0} + run: | + cd src\runtime\c + autoreconf -i + ./configure + make + make install + + # - name: Build Java bindings + # + # - name: Build Python bindings + - name: Build GF run: | cabal install --only-dependencies -fserver From 12ece264092b7852f357c612c0fe616c388227b8 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 00:58:37 +0100 Subject: [PATCH 52/97] sudo mkdir --- .github/workflows/build-macos-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 9f4f0a847..d4ac26f77 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -32,8 +32,8 @@ jobs: - name: Build macOS package run: | - mkdir -p /Library/Java/Home - ln -s /usr/local/opt/openjdk/include /Library/Java/Home/include + sudo mkdir -p /Library/Java/Home + sudo ln -s /usr/local/opt/openjdk/include /Library/Java/Home/include make pkg - name: Upload artifact From 0a0060373b91ad1d881eaed78d678c86a3d56655 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 01:09:07 +0100 Subject: [PATCH 53/97] Flip slashes --- .github/workflows/build-windows-package.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 3b71a3c6e..3ed666c5e 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -37,16 +37,12 @@ jobs: - name: Build C runtime shell: msys2 {0} run: | - cd src\runtime\c + cd src/runtime/c autoreconf -i ./configure make make install - # - name: Build Java bindings - # - # - name: Build Python bindings - - name: Build GF run: | cabal install --only-dependencies -fserver From 3e20e735a3fe8c57a01ea75b647f89e16422e323 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 01:22:26 +0100 Subject: [PATCH 54/97] Install gcc in MSYS --- .github/workflows/build-windows-package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 3ed666c5e..9358e87f7 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -22,6 +22,7 @@ jobs: with: install: >- base-devel + gcc - name: Setup Haskell uses: actions/setup-haskell@v1 From af9c8ee553c2eef90742679342e873470ee22fa1 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 14:56:51 +0100 Subject: [PATCH 55/97] Add compiled C runtime to artifact in Windows build --- .github/workflows/build-windows-package.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 9358e87f7..1432b754b 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -44,6 +44,23 @@ jobs: make make install + - name: Upload C runtime to artifact + uses: actions/upload-artifact@v2 + with: + name: gf-${{ github.sha }}-windows + path: | + /mingw64/bin/libpgf-0.dll + /mingw64/bin/libgu-0.dll + if-no-files-found: error + + # - name: Build Java bindings + # + # - name: Upload Java bindings to artifact + # + # - name: Build Python bindings + # + # - name: Upload Python bindings to artifact + - name: Build GF run: | cabal install --only-dependencies -fserver From 4d2218a0d1aaffb3a5b13422a59718da83f67ff0 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 10:10:04 +0100 Subject: [PATCH 56/97] See what's in /mingw64/bin --- .github/workflows/build-debian-package.yml | 1 - .github/workflows/build-macos-package.yml | 1 - .github/workflows/build-windows-package.yml | 7 +++++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-debian-package.yml b/.github/workflows/build-debian-package.yml index cfd48825f..02a0b3846 100644 --- a/.github/workflows/build-debian-package.yml +++ b/.github/workflows/build-debian-package.yml @@ -1,7 +1,6 @@ name: Build Debian Package on: - push: # testing until merged into master workflow_dispatch: jobs: diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index d4ac26f77..1ebf5dfa6 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -1,7 +1,6 @@ name: Build macOS Package on: - push: # testing until merged into master workflow_dispatch: jobs: diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 1432b754b..d5b9a8664 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -44,13 +44,16 @@ jobs: make make install + - shell: mysys2 {0} + run: | + ls -al /mingw64/bin + - name: Upload C runtime to artifact uses: actions/upload-artifact@v2 with: name: gf-${{ github.sha }}-windows path: | - /mingw64/bin/libpgf-0.dll - /mingw64/bin/libgu-0.dll + /mingw64/bin if-no-files-found: error # - name: Build Java bindings From ee6082d1004d5696c4989f563af4d4f8e83db492 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 10:25:04 +0100 Subject: [PATCH 57/97] Typo --- .github/workflows/build-windows-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index d5b9a8664..34bb2db50 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -44,7 +44,7 @@ jobs: make make install - - shell: mysys2 {0} + - shell: msys2 {0} run: | ls -al /mingw64/bin From 43b06d5f53f21db7022a1977fcf8068c20a127da Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 10:41:26 +0100 Subject: [PATCH 58/97] Use windows path with upload-artifact --- .github/workflows/build-windows-package.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 34bb2db50..a8d568786 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -44,16 +44,13 @@ jobs: make make install - - shell: msys2 {0} - run: | - ls -al /mingw64/bin - - name: Upload C runtime to artifact uses: actions/upload-artifact@v2 with: name: gf-${{ github.sha }}-windows path: | - /mingw64/bin + D:\mingw64\bin\libgu-0.dll + D:\mingw64\bin\libpgf-0.dll if-no-files-found: error # - name: Build Java bindings From 9a697fbde47454393c5161891f808f00d6a56c9b Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:10:43 +0100 Subject: [PATCH 59/97] Try different upload path --- .github/workflows/build-windows-package.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index a8d568786..af826129b 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -48,9 +48,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: gf-${{ github.sha }}-windows - path: | - D:\mingw64\bin\libgu-0.dll - D:\mingw64\bin\libpgf-0.dll + path: /mingw64/bin/* if-no-files-found: error # - name: Build Java bindings From e47ce2a28bd967ba00667b1d60c2168f77c68b57 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:19:25 +0100 Subject: [PATCH 60/97] Try another upload path --- .github/workflows/build-windows-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index af826129b..db48bda66 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -48,7 +48,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: gf-${{ github.sha }}-windows - path: /mingw64/bin/* + path: /d/mingw64/bin/* if-no-files-found: error # - name: Build Java bindings From cac65418ff98c180cfad282893f376f3f10dc427 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:28:32 +0100 Subject: [PATCH 61/97] Try yet another path --- .github/workflows/build-windows-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index db48bda66..7383ab1e4 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -48,7 +48,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: gf-${{ github.sha }}-windows - path: /d/mingw64/bin/* + path: D:\mingw64\bin\* if-no-files-found: error # - name: Build Java bindings From 59dda75f1609fff06d436647c70f0d8116fc243e Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:30:53 +0100 Subject: [PATCH 62/97] Find Java stuff --- .github/workflows/build-windows-package.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 7383ab1e4..5250ee082 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -24,6 +24,11 @@ jobs: base-devel gcc + - name: Find Java stuff + shell: msys2 {0} + run: | + find / -name "jni.h" + - name: Setup Haskell uses: actions/setup-haskell@v1 id: setup-haskell-cabal From c8623e2be7c653a201dc65e40b7d77f313d45de9 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:40:42 +0100 Subject: [PATCH 63/97] Try to find Java stuff --- .github/workflows/build-windows-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 5250ee082..b2cb0a0b5 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -27,7 +27,7 @@ jobs: - name: Find Java stuff shell: msys2 {0} run: | - find / -name "jni.h" + find /c -name "jni.h" - name: Setup Haskell uses: actions/setup-haskell@v1 From d79fa6d22b302a30db0f3df00b79bcd8f59187fe Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:48:46 +0100 Subject: [PATCH 64/97] Move DLLs into another folder first --- .github/workflows/build-windows-package.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index b2cb0a0b5..151fd0548 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -24,11 +24,6 @@ jobs: base-devel gcc - - name: Find Java stuff - shell: msys2 {0} - run: | - find /c -name "jni.h" - - name: Setup Haskell uses: actions/setup-haskell@v1 id: setup-haskell-cabal @@ -40,6 +35,11 @@ jobs: run: | cabal install alex happy + - name: Prepare dist folder + shell: msys2 {0} + run: | + mkdir /c/tmp-dist + - name: Build C runtime shell: msys2 {0} run: | @@ -48,12 +48,13 @@ jobs: ./configure make make install + cp /mingw64/bin/*.dll /c/tmp-dist - name: Upload C runtime to artifact uses: actions/upload-artifact@v2 with: name: gf-${{ github.sha }}-windows - path: D:\mingw64\bin\* + path: C:\tmp-dist\* if-no-files-found: error # - name: Build Java bindings From 9131581f0311931deec0f43785b1aa4d2d800049 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:52:21 +0100 Subject: [PATCH 65/97] Add windows-testing workflow --- .github/workflows/windows-testing.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/workflows/windows-testing.yml diff --git a/.github/workflows/windows-testing.yml b/.github/workflows/windows-testing.yml new file mode 100644 index 000000000..33393129a --- /dev/null +++ b/.github/workflows/windows-testing.yml @@ -0,0 +1,10 @@ +name: Windows testing + +on: push + +jobs: + run: + runs-on: windows-2019 + + steps: + - run: where java From e36b7cb044aab0f77cc634e4aa81da0f45e63524 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:57:24 +0100 Subject: [PATCH 66/97] Windows testing... --- .github/workflows/windows-testing.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows-testing.yml b/.github/workflows/windows-testing.yml index 33393129a..75fbb332a 100644 --- a/.github/workflows/windows-testing.yml +++ b/.github/workflows/windows-testing.yml @@ -7,4 +7,5 @@ jobs: runs-on: windows-2019 steps: - - run: where java + - run: | + dir C:\Program Files\Java\ From 301f23ac55937319ab463fa6bb60a6fa7642a3c8 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:58:21 +0100 Subject: [PATCH 67/97] Windows testing... --- .github/workflows/windows-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-testing.yml b/.github/workflows/windows-testing.yml index 75fbb332a..91446bed8 100644 --- a/.github/workflows/windows-testing.yml +++ b/.github/workflows/windows-testing.yml @@ -8,4 +8,4 @@ jobs: steps: - run: | - dir C:\Program Files\Java\ + dir "C:\Program Files\Java" From 08e6aca83d2df5572a298df264969fd3631d93d9 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 13:00:05 +0100 Subject: [PATCH 68/97] Windows testing... --- .github/workflows/windows-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-testing.yml b/.github/workflows/windows-testing.yml index 91446bed8..02c409c5a 100644 --- a/.github/workflows/windows-testing.yml +++ b/.github/workflows/windows-testing.yml @@ -8,4 +8,4 @@ jobs: steps: - run: | - dir "C:\Program Files\Java" + dir "C:\Program Files\Java\jdk8u275-b01\include" From 951e439703f6f9b40e91ce4bec6571c75e49a85e Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 13:06:13 +0100 Subject: [PATCH 69/97] First attempt at building Java bindings --- .github/workflows/build-windows-package.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 151fd0548..92f83b913 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -57,8 +57,15 @@ jobs: path: C:\tmp-dist\* if-no-files-found: error - # - name: Build Java bindings - # + - name: Build Java bindings + shell: msys2 {0} + run: | + cd src/runtime/java + make \ + JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/local/include\" " \ + WINDOWS_LDFLAGS="-L\"/mingw64/local/lib\" -no-undefined" + make install + # - name: Upload Java bindings to artifact # # - name: Build Python bindings From f8da24c5ec35504a1192cb494ebe1d27aa172b04 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 15:36:13 +0100 Subject: [PATCH 70/97] Change include path when building Java bindings in Windows build --- .github/workflows/build-windows-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 92f83b913..7d1bcc2a1 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -62,8 +62,8 @@ jobs: run: | cd src/runtime/java make \ - JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/local/include\" " \ - WINDOWS_LDFLAGS="-L\"/mingw64/local/lib\" -no-undefined" + JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" " \ + WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" make install # - name: Upload Java bindings to artifact From 9932b10bf191b6da19a2c64d5c7750b7525243ec Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 15:48:22 +0100 Subject: [PATCH 71/97] Add -D__int64=int64_t flag to Java Windows build --- .github/workflows/build-windows-package.yml | 19 +++++-------------- .github/workflows/windows-testing.yml | 11 ----------- 2 files changed, 5 insertions(+), 25 deletions(-) delete mode 100644 .github/workflows/windows-testing.yml diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 7d1bcc2a1..5db2458ac 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -50,37 +50,28 @@ jobs: make install cp /mingw64/bin/*.dll /c/tmp-dist - - name: Upload C runtime to artifact - uses: actions/upload-artifact@v2 - with: - name: gf-${{ github.sha }}-windows - path: C:\tmp-dist\* - if-no-files-found: error - - name: Build Java bindings shell: msys2 {0} run: | cd src/runtime/java make \ JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" " \ - WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" + WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined -D__int64=int64_t" make install + # cp ... /c/tmp-dist - # - name: Upload Java bindings to artifact - # # - name: Build Python bindings - # - # - name: Upload Python bindings to artifact - name: Build GF run: | cabal install --only-dependencies -fserver cabal configure -fserver cabal build + copy dist\build\gf\gf.exe C:\tmp-dist - - name: Upload exe to artifact + - name: Upload artifact uses: actions/upload-artifact@v2 with: name: gf-${{ github.sha }}-windows - path: dist\build\gf\gf.exe + path: C:\tmp-dist\* if-no-files-found: error diff --git a/.github/workflows/windows-testing.yml b/.github/workflows/windows-testing.yml deleted file mode 100644 index 02c409c5a..000000000 --- a/.github/workflows/windows-testing.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Windows testing - -on: push - -jobs: - run: - runs-on: windows-2019 - - steps: - - run: | - dir "C:\Program Files\Java\jdk8u275-b01\include" From aad2ba61d4955e6ef1aa5008571acb641e01651c Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 15:59:01 +0100 Subject: [PATCH 72/97] Move flag --- .github/workflows/build-windows-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 5db2458ac..59c03d92e 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -55,8 +55,8 @@ jobs: run: | cd src/runtime/java make \ - JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" " \ - WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined -D__int64=int64_t" + JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ + WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" make install # cp ... /c/tmp-dist From 32f451f1d731d30c9b7381f3216e36d91c1a2753 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 20:29:04 +0100 Subject: [PATCH 73/97] Add jdk/bin to path --- .github/workflows/build-windows-package.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 59c03d92e..9c19b26ea 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -53,6 +53,9 @@ jobs: - name: Build Java bindings shell: msys2 {0} run: | + echo $PATH + export PATH="${PATH}:/c/Program Files/Java/jdk8u275-b01/bin" + cd src/runtime/java make \ JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ From 7501a7916e6e940a7530ade697c87d57b873c211 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 20:47:09 +0100 Subject: [PATCH 74/97] Copy jpgf.jar to dist --- .github/workflows/build-windows-package.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 9c19b26ea..a767cc8f4 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -48,20 +48,19 @@ jobs: ./configure make make install - cp /mingw64/bin/*.dll /c/tmp-dist + cp /mingw64/bin/libpgf-0.dll /c/tmp-dist + cp /mingw64/bin/libgu-0.dll /c/tmp-dist - name: Build Java bindings shell: msys2 {0} run: | - echo $PATH export PATH="${PATH}:/c/Program Files/Java/jdk8u275-b01/bin" - cd src/runtime/java make \ JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" make install - # cp ... /c/tmp-dist + cp /usr/local/lib/jpgf.jar /c/tmp-dist # - name: Build Python bindings From 78c1c099df93f7bc3d10bf317c6e17d68eb0da11 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 21:08:56 +0100 Subject: [PATCH 75/97] Find jpgf.jar --- .github/workflows/build-windows-package.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index a767cc8f4..e69f9cfbe 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -60,7 +60,8 @@ jobs: JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" make install - cp /usr/local/lib/jpgf.jar /c/tmp-dist + find /mingw64 -name jpgf.jar + cp /mingw64/lib/jpgf.jar /c/tmp-dist # - name: Build Python bindings From 4bcde7d6a21823c180e49fda53c4290a4804df16 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 22:09:37 +0100 Subject: [PATCH 76/97] Copy compiled Java files from local --- .github/workflows/build-windows-package.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index e69f9cfbe..0be77e614 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -61,7 +61,8 @@ jobs: WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" make install find /mingw64 -name jpgf.jar - cp /mingw64/lib/jpgf.jar /c/tmp-dist + cp .libs//msys-jpgf-0.dll /c/tmp-dist + cp jpgf.jar /c/tmp-dist # - name: Build Python bindings From 3e1c69da2138ad2d494e8ff0c30003f1dfbfb9aa Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 22:46:28 +0100 Subject: [PATCH 77/97] First attempt at building Python bindings for Windows --- .github/workflows/build-windows-package.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 0be77e614..2bd5051c3 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -60,11 +60,16 @@ jobs: JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" make install - find /mingw64 -name jpgf.jar - cp .libs//msys-jpgf-0.dll /c/tmp-dist + cp .libs//msys-jpgf-0.dll /c/tmp-dist/jpgf.dll cp jpgf.jar /c/tmp-dist - # - name: Build Python bindings + - name: Build Python bindings + shell: msys2 {0} + run: | + cd src/runtime/python + python setup.py build + python setup.py install + cp build/*/pgf.so /c/tmp-dist - name: Build GF run: | From cf6468a45283bdf85df13a78ef2a3082572972d9 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 23:03:46 +0100 Subject: [PATCH 78/97] Install Python dev tools --- .github/workflows/build-windows-package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 2bd5051c3..1e6fd8722 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -67,6 +67,7 @@ jobs: shell: msys2 {0} run: | cd src/runtime/python + pip install python-dev-tools python setup.py build python setup.py install cp build/*/pgf.so /c/tmp-dist From 88252cb107aefc6fadce063c4dd3e80b73061c09 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 23:21:05 +0100 Subject: [PATCH 79/97] Try build Python bindings not using msys2 --- .github/workflows/build-windows-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 1e6fd8722..5360d2b9c 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -64,13 +64,13 @@ jobs: cp jpgf.jar /c/tmp-dist - name: Build Python bindings - shell: msys2 {0} + # shell: msys2 {0} run: | cd src/runtime/python pip install python-dev-tools python setup.py build python setup.py install - cp build/*/pgf.so /c/tmp-dist + # cp build/*/pgf.so /c/tmp-dist - name: Build GF run: | From 0ed6b726a2c9a2365fadc05a75177c569469b4fd Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 25 Nov 2020 20:47:47 +0100 Subject: [PATCH 80/97] Add lib/include envvars for Python build --- .github/workflows/build-windows-package.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 5360d2b9c..e56184840 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -34,6 +34,7 @@ jobs: - name: Install build tools run: | cabal install alex happy + pip install python-dev-tools - name: Prepare dist folder shell: msys2 {0} @@ -64,10 +65,11 @@ jobs: cp jpgf.jar /c/tmp-dist - name: Build Python bindings - # shell: msys2 {0} + env: + EXTRA_INCLUDE_DIRS: /usr/local/include + EXTRA_LIB_DIRS: /usr/local/lib run: | cd src/runtime/python - pip install python-dev-tools python setup.py build python setup.py install # cp build/*/pgf.so /c/tmp-dist From 24bbeb31df6558c85ac7ff5a47e4bcfc532dfafe Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 26 Nov 2020 22:38:23 +0100 Subject: [PATCH 81/97] Change extra lib/include directories --- .github/workflows/build-windows-package.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index e56184840..6ebe71c06 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -64,10 +64,13 @@ jobs: cp .libs//msys-jpgf-0.dll /c/tmp-dist/jpgf.dll cp jpgf.jar /c/tmp-dist + - run: where python + - name: Build Python bindings + shell: msys2 {0} env: - EXTRA_INCLUDE_DIRS: /usr/local/include - EXTRA_LIB_DIRS: /usr/local/lib + EXTRA_INCLUDE_DIRS: /mingw64/include + EXTRA_LIB_DIRS: /mingw64/lib run: | cd src/runtime/python python setup.py build From 0632824b997965f2099676fa94e61b0314c2bd2b Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 26 Nov 2020 23:02:16 +0100 Subject: [PATCH 82/97] Need to add pip to msys2 path --- .github/workflows/build-windows-package.yml | 34 +++++++++++++-------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 6ebe71c06..9522d018b 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -24,18 +24,6 @@ jobs: base-devel gcc - - name: Setup Haskell - uses: actions/setup-haskell@v1 - id: setup-haskell-cabal - with: - ghc-version: ${{ matrix.ghc }} - cabal-version: ${{ matrix.cabal }} - - - name: Install build tools - run: | - cabal install alex happy - pip install python-dev-tools - - name: Prepare dist folder shell: msys2 {0} run: | @@ -64,7 +52,15 @@ jobs: cp .libs//msys-jpgf-0.dll /c/tmp-dist/jpgf.dll cp jpgf.jar /c/tmp-dist - - run: where python + - run: echo %PATH% + + - shell: msys2 {0} + run: echo $PATH + + - name: Install Python build tools + shell: msys2 {0} + run: | + pip install python-dev-tools - name: Build Python bindings shell: msys2 {0} @@ -72,11 +68,23 @@ jobs: EXTRA_INCLUDE_DIRS: /mingw64/include EXTRA_LIB_DIRS: /mingw64/lib run: | + pip install python-dev-tools cd src/runtime/python python setup.py build python setup.py install # cp build/*/pgf.so /c/tmp-dist + - name: Setup Haskell + uses: actions/setup-haskell@v1 + id: setup-haskell-cabal + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + - name: Install Haskell build tools + run: | + cabal install alex happy + - name: Build GF run: | cabal install --only-dependencies -fserver From 54c0949354590287dc745b6a2f86a5ea3dc7a734 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 26 Nov 2020 23:16:15 +0100 Subject: [PATCH 83/97] Change echo path command in powershell --- .github/workflows/build-windows-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 9522d018b..30c74c0bf 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -52,7 +52,7 @@ jobs: cp .libs//msys-jpgf-0.dll /c/tmp-dist/jpgf.dll cp jpgf.jar /c/tmp-dist - - run: echo %PATH% + - run: $Env:Path - shell: msys2 {0} run: echo $PATH From 78f42774dab8364d9204e73e7ea965f143b2e571 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 26 Nov 2020 23:30:47 +0100 Subject: [PATCH 84/97] Inherit path when running pip --- .github/workflows/build-windows-package.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 30c74c0bf..04afa2013 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -59,6 +59,8 @@ jobs: - name: Install Python build tools shell: msys2 {0} + env: + MSYS2_PATH_TYPE: inherit run: | pip install python-dev-tools @@ -68,7 +70,6 @@ jobs: EXTRA_INCLUDE_DIRS: /mingw64/include EXTRA_LIB_DIRS: /mingw64/lib run: | - pip install python-dev-tools cd src/runtime/python python setup.py build python setup.py install From 6b7e9c8c7ae67069e43fa963625e6058cb30a7cb Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 26 Nov 2020 23:40:08 +0100 Subject: [PATCH 85/97] Inherit path with Python compilation too --- .github/workflows/build-windows-package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 04afa2013..63e99b4ac 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -67,6 +67,7 @@ jobs: - name: Build Python bindings shell: msys2 {0} env: + MSYS2_PATH_TYPE: inherit EXTRA_INCLUDE_DIRS: /mingw64/include EXTRA_LIB_DIRS: /mingw64/lib run: | From 629a574dfa0142526582b2c2436c3d60c65799b8 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 26 Nov 2020 23:57:09 +0100 Subject: [PATCH 86/97] Considerable updates to 3.11 download page --- download/index-3.11.md | 131 ++++++++++++++++++++--------------------- 1 file changed, 64 insertions(+), 67 deletions(-) diff --git a/download/index-3.11.md b/download/index-3.11.md index 4e225f631..78b6af4bc 100644 --- a/download/index-3.11.md +++ b/download/index-3.11.md @@ -2,56 +2,60 @@ title: Grammatical Framework Download and Installation ... -**GF 3.11** was released on ? December 2020. +**GF 3.11** was released on ... December 2020. What's new? See the [release notes](release-3.11.html). -## Binary packages +#### Note: GF core and RGL -Unlike previous versions, these binary packages include only the GF core (compiler and runtime). +The following instructions explain how to install **GF core**, i.e. the compiler, shell and run-time systems. +Obtaining the **Resource Grammar Library (RGL)** is done separately; see the section at the bottom of this page. -| Platform | Download | Features | How to install | -|:----------------|:---------------------------------------------------|:---------------|:---------------------------------| -| macOS | [gf-3.11.pkg](gf-3.11.pkg) | GF, S, C, J, P | Double-click on the package icon | -| Ubuntu (32-bit) | [gf\_3.11\_i386.deb](gf_3.11_i386.deb) | GF, S, C, J, P | `sudo dpkg -i gf_3.11_i386.deb` | -| Ubuntu (64-bit) | [gf\_3.11\_amd64.deb](gf_3.11_amd64.deb) | GF, S, C, J, P | `sudo dpkg -i gf_3.11_amd64.deb` | -| Windows | [gf-3.11-bin-windows.zip](gf-3.11-bin-windows.zip) | GF, S | `unzip gf-3.11-bin-windows.zip` | +## Installing from a binary package -**Features** +Binary packages are available for Debian/Ubuntu, macOS, and Windows and include: -- GF = GF shell and grammar compiler -- S = `gf -server` mode -- C = C run-time system -- J/P = Java/Python binding to the C run-time system +- GF shell and grammar compiler +- `gf -server` mode +- C run-time system +- Java & Python bindings to the C run-time system -### Notes +Unlike in previous versions, the binaries **do not** include the RGL. -The Windows package is installed by just unpacking it anywhere. You will -probably need to set the `PATH` and `GF_LIB_PATH` environment variables, -see Inari's notes on [Installing GF on Windows](http://www.grammaticalframework.org/~inari/gf-windows.html#toc3). +[Binary packages on GitHub](https://github.com/GrammaticalFramework/gf-core/releases/tag/RELEASE-3.11) -The Ubuntu `.deb` packages should work on Ubuntu 16.04 and 18.04 and -similar Linux distributions. The `.deb` packages were updated -to version 3.10-2 after the release of GF 3.10. -(Because of a packaging bug the Resource Grammar Library was missing -in the 3.10-1 packages.) +### Debian/Ubuntu -The packages for macOS (Mac OS X) should work on at least 10.13 and -10.14 (High Sierra and Mojave) +To install the package use: +``` +sudo dpkg -i gf_3.11.deb +``` + +The Ubuntu `.deb` packages should work on Ubuntu 16.04, 18.04 and similar Linux distributions. + +### macOS + +To install the package, just double-click it and follow the installer instructions. + +The packages should work on at least 10.13 (High Sierra) and 10.14 (Mojave). + +### Windows + +To install the package, unpack it anywhere. + +You will probably need to update the `PATH` environment variable to include your chosen install location. + ## Installing the latest release from source [GF is on Hackage](http://hackage.haskell.org/package/gf), so under normal circumstances the procedure is fairly simple: -1. Install a recent version of the [Haskell - Platform](http://hackage.haskell.org/platform) (see note below) +1. Install a recent version of the [Haskell Platform](http://hackage.haskell.org/platform) (see note below) 2. `cabal update` 3. On Linux: install some C libraries from your Linux distribution (see note below) 4. `cabal install gf` -This installs the GF executable and Haskell libraries, but **does not include the RGL**. - You can also download the source code release from [GitHub](https://github.com/GrammaticalFramework/gf-core/releases), and follow the instructions below under **Installing from the latest developer source code**. @@ -59,22 +63,14 @@ and follow the instructions below under **Installing from the latest developer s **Installation location** -The above steps installs GF for a single user. The executables are put -in `$HOME/.cabal/bin` (or, with recent versions of the Haskell platform -on Mac OS X, in `$HOME/Library/Haskell/bin`), so it is a good idea to -put a line in your `.bash_profile` or `.profile` to add that directory -to you path: +The above steps installs GF for a single user. +The executables are put in `$HOME/.cabal/bin` (or on macOS in `$HOME/Library/Haskell/bin`), +so you might want to add this directory to your path (in `.bash_profile` or similar): ``` PATH=$HOME/.cabal/bin:$PATH ``` -or - -``` -PATH=$HOME/Library/Haskell/bin:$PATH -``` - **Build tools** In order to compile GF you need the build tools **Alex** and **Happy**. @@ -98,8 +94,7 @@ Here is one way to do this: **GHC version** -The GF source code has been updated to compile with GHC 8.4. -Using older versions of GHC (e.g. 8.2, 8.0 and 7.10) should still work too. +The GF source code has been updated to compile with GHC versions 7.10 through to 8.8. ## Installing from the latest developer source code @@ -131,26 +126,6 @@ The above notes for installing from source apply also in these cases. For more info on working with the GF source code, see the [GF Developers Guide](../doc/gf-developers.html). -## Installing the RGL from source - -To install the RGL from source, -you can download a release from [GitHub](https://github.com/GrammaticalFramework/gf-rgl/releases) -or get the latest version by cloning the repository: - -``` -git clone https://github.com/GrammaticalFramework/gf-rgl.git -``` - -In both cases, once you have the RGL sources you can install them by running: - -``` -make -``` - -in the RGL folder. -This assumes that you already have GF installed. -For more details about building the RGL, see the [RGL README](https://github.com/GrammaticalFramework/gf-rgl/blob/master/README.md). - ## Installing the Python bindings from PyPI The Python library is available on PyPI as `pgf`, so it can be installed using: @@ -159,11 +134,33 @@ The Python library is available on PyPI as `pgf`, so it can be installed using: pip install pgf ``` -We provide binary wheels for Linux and OSX (with Windows missing so far), which -include the C runtime and a ready-to-go. If there is no binary distribution for -your platform, this will install the source tarball, which will attempt to build -the binding during installation, and requires the GF C runtime to be installed on -your system. +We provide binary wheels for Linux and macOS, which include the C runtime and are ready-to-go. +If there is no binary distribution for your platform, this will install the source tarball, +which will attempt to build the binding during installation, +and requires the GF C runtime to be installed on your system. + +--- + +## Installing the RGL from a binary release + +Binary releases of the RGL are made available on [GitHub](https://github.com/GrammaticalFramework/gf-rgl/releases). +In general the steps to follow are: + +1. Download a binary release and extract it somewhere on your system. +2. Set the environment variable `GF_LIB_PATH` to point to wherever you extracted the RGL. + +## Installing the RGL from source + +To compile the RGL, you will need to have GF already installed and in your path. + +1. Obtain the RGL source code, either by: + - cloning with `git clone https://github.com/GrammaticalFramework/gf-rgl.git` + - downloading a source archive [here](https://github.com/GrammaticalFramework/gf-rgl/archive/master.zip) +2. Run `make` in the source code folder. + +For more options, see the [RGL README](https://github.com/GrammaticalFramework/gf-rgl/blob/master/README.md). + +--- ## Older releases From 169f2c786d6f518acb8c9c6eeff537177fe87885 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Fri, 27 Nov 2020 00:00:44 +0100 Subject: [PATCH 87/97] Install pip in msys2 --- .github/workflows/build-windows-package.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 63e99b4ac..69d0bd7bd 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -23,6 +23,7 @@ jobs: install: >- base-devel gcc + python-pip - name: Prepare dist folder shell: msys2 {0} @@ -59,15 +60,12 @@ jobs: - name: Install Python build tools shell: msys2 {0} - env: - MSYS2_PATH_TYPE: inherit run: | pip install python-dev-tools - name: Build Python bindings shell: msys2 {0} env: - MSYS2_PATH_TYPE: inherit EXTRA_INCLUDE_DIRS: /mingw64/include EXTRA_LIB_DIRS: /mingw64/lib run: | From 921a8981fbf6e67cea9236edb99f8cd3285a1bf6 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Fri, 27 Nov 2020 00:11:54 +0100 Subject: [PATCH 88/97] Install python-devel in msys2 --- .github/workflows/build-windows-package.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 69d0bd7bd..ab34d6f0c 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -23,7 +23,7 @@ jobs: install: >- base-devel gcc - python-pip + python-devel - name: Prepare dist folder shell: msys2 {0} @@ -58,11 +58,6 @@ jobs: - shell: msys2 {0} run: echo $PATH - - name: Install Python build tools - shell: msys2 {0} - run: | - pip install python-dev-tools - - name: Build Python bindings shell: msys2 {0} env: From 8f3a7a3b6a04f3e93060cd9293da7f467ff5e572 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Fri, 27 Nov 2020 00:51:38 +0100 Subject: [PATCH 89/97] Copy things into subfolders --- .github/workflows/build-windows-package.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index ab34d6f0c..fc788aa94 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -29,6 +29,9 @@ jobs: shell: msys2 {0} run: | mkdir /c/tmp-dist + mkdir /c/tmp-dist/c + mkdir /c/tmp-dist/java + mkdir /c/tmp-dist/python - name: Build C runtime shell: msys2 {0} @@ -38,8 +41,8 @@ jobs: ./configure make make install - cp /mingw64/bin/libpgf-0.dll /c/tmp-dist - cp /mingw64/bin/libgu-0.dll /c/tmp-dist + cp /mingw64/bin/libpgf-0.dll /c/tmp-dist/c + cp /mingw64/bin/libgu-0.dll /c/tmp-dist/c - name: Build Java bindings shell: msys2 {0} @@ -50,13 +53,8 @@ jobs: JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" make install - cp .libs//msys-jpgf-0.dll /c/tmp-dist/jpgf.dll - cp jpgf.jar /c/tmp-dist - - - run: $Env:Path - - - shell: msys2 {0} - run: echo $PATH + cp .libs//msys-jpgf-0.dll /c/tmp-dist/java/jpgf.dll + cp jpgf.jar /c/tmp-dist/java - name: Build Python bindings shell: msys2 {0} @@ -67,7 +65,7 @@ jobs: cd src/runtime/python python setup.py build python setup.py install - # cp build/*/pgf.so /c/tmp-dist + cp /usr/lib/python3.8/site-packages/pgf* /c/tmp-dist/python - name: Setup Haskell uses: actions/setup-haskell@v1 From 8dc1ed83b603d5ebb170912b4cefec0cf353288c Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 30 Nov 2020 13:01:51 +0100 Subject: [PATCH 90/97] Update RELEASE.md --- .github/workflows/build-windows-package.yml | 1 - RELEASE.md | 44 +++++++++++++-------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index fc788aa94..df6f77be9 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -1,7 +1,6 @@ name: Build Windows Package on: - push: # testing until merged into master workflow_dispatch: jobs: diff --git a/RELEASE.md b/RELEASE.md index 131a37b5d..0c304fe51 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,6 +1,8 @@ # GF Core releases -🚨 WARNING! The information here is preliminary! +**Note:** +The RGL is now released completely separately from GF Core. +See the [RGL's RELEASE.md](https://github.com/GrammaticalFramework/gf-rgl/blob/master/RELEASE.md). ## Creating a new release @@ -11,37 +13,47 @@ 1. Create `download/index-X.Y.md` with installation instructions. 1. Create `download/release-X.Y.md` with changelog information. 1. Update `download/index.html` to redirect to the new version. -1. Add announcement in news section in `index.html` +1. Add announcement in news section in `index.html`. **Version numbers** -1. Update version number in `gf.cabal` (ommitting `-git` suffix) -1. Add a new line in `debian/changelog` +1. Update version number in `gf.cabal` (ommitting `-git` suffix). +1. Add a new line in `debian/changelog`. ### 2. Create GitHub release -1. When the above changes are committed to the `master` branch in the repository, - check that all builds are successful: - - https://github.com/GrammaticalFramework/gf-core/actions - - https://travis-ci.org/github/GrammaticalFramework/gf-core -1. Create a GitHub release here: https://github.com/GrammaticalFramework/gf-core/releases/new - with a tag format `RELEASE-X.Y` +1. When the above changes are committed to the `master` branch in the repository + and pushed, check that all CI workflows are successful (fixing as necessary): + - + - +1. Create a GitHub release [here](https://github.com/GrammaticalFramework/gf-core/releases/new) using tag format `RELEASE-X.Y`. ### 3. Binary packages -Build and attach binaries to the release by running the relevant GitHub Actions workflows (TODO): +The binaries will be built automatically by the GitHub Actions workflows, +but the generated artifacts must be manually attached to the release as _assets_. -1. Go to https://github.com/GrammaticalFramework/gf-rgl/actions -1. Click "Build [platform] package" under _Workflows_ -1. Click "Run workflow" and specify the tag `RELEASE-X.Y` +1. Go to . +1. Click "Build [platform] Package" under _Workflows_. +1. Choose the workflow run corresponding to the release commit SHA. +1. Download the artifact locally, then add to the release with a name `gf-X.Y-PLATFORM.EXT` (e.g. `gf-3.11-macos.pkg`). ### 4. Upload to Hackage 1. Run `make sdist` -1. Visit `https://hackage.haskell.org/upload` and upload the file `dist/gf-X.Y.tar.gz`, - OR upload directly with Cabal (≥2.4): `cabal upload dist/gf-X.Y.tar.gz` +1. Upload the package, either: + 1. **Manually**: visit and upload the file `dist/gf-X.Y.tar.gz` + 2. **via Cabal (≥2.4)**: `cabal upload dist/gf-X.Y.tar.gz` 1. If the documentation-building fails on the Hackage server, do: ``` cabal v2-haddock --builddir=dist/docs --haddock-for-hackage --enable-doc cabal upload --documentation dist/docs/*-docs.tar.gz ``` + +## Miscellaneous + +### What is the tag `GF-3.10`? + +For GF 3.10, the Core and RGL repositories had already been separated, however +the binary packages still included the RGL. `GF-3.10` is a tag that was created +in both repositories ([gf-core](https://github.com/GrammaticalFramework/gf-core/releases/tag/GF-3.10) and [gf-rgl](https://github.com/GrammaticalFramework/gf-rgl/releases/tag/GF-3.10)) to indicate which versions of each went into the binaries. From 4223935b124a0b16053aef719abccdc5fca36287 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 30 Nov 2020 20:57:20 +0100 Subject: [PATCH 91/97] Combine binary workflows into one with multiple jobs --- ...-package.yml => build-binary-packages.yml} | 91 ++++++++++++++++++- .github/workflows/build-debian-package.yml | 45 --------- .github/workflows/build-macos-package.yml | 43 --------- 3 files changed, 86 insertions(+), 93 deletions(-) rename .github/workflows/{build-windows-package.yml => build-binary-packages.yml} (56%) delete mode 100644 .github/workflows/build-debian-package.yml delete mode 100644 .github/workflows/build-macos-package.yml diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-binary-packages.yml similarity index 56% rename from .github/workflows/build-windows-package.yml rename to .github/workflows/build-binary-packages.yml index df6f77be9..e387ae9b1 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-binary-packages.yml @@ -1,15 +1,96 @@ -name: Build Windows Package +name: Build Binary Packages on: workflow_dispatch: + release: jobs: - build: - name: Build on ${{ matrix.os }} - runs-on: ${{ matrix.os }} + +# --- + + ubuntu: + name: Build Ubuntu package + runs-on: ubuntu-18.04 + # env: + # LC_ALL: C.UTF-8 + + steps: + - uses: actions/checkout@v2 + + - name: Install build tools + run: | + sudo apt update + sudo apt install -y \ + make \ + dpkg-dev \ + debhelper \ + haskell-platform \ + libghc-json-dev \ + python-dev \ + default-jdk \ + libtool-bin + + - name: Build Debian package + run: | + make deb + + - name: Copy package + run: | + cp ../gf_*.deb dist/ + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: gf-${{ github.sha }}-debian + path: dist/gf_*.deb + if-no-files-found: error + +# --- + + macos: + name: Build macOS package + runs-on: macos-10.15 + strategy: + matrix: + ghc: ["8.6.5"] + cabal: ["2.4"] + + steps: + - uses: actions/checkout@v2 + + - name: Setup Haskell + uses: actions/setup-haskell@v1 + id: setup-haskell-cabal + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + - name: Install build tools + run: | + brew install \ + automake + cabal v1-install alex happy + + - name: Build macOS package + run: | + sudo mkdir -p /Library/Java/Home + sudo ln -s /usr/local/opt/openjdk/include /Library/Java/Home/include + make pkg + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: gf-${{ github.sha }}-macos + path: dist/gf-*.pkg + if-no-files-found: error + +# --- + + windows: + name: Build Windows package + runs-on: windows-2019 strategy: matrix: - os: [windows-2019] ghc: ["8.6.5"] cabal: ["2.4"] diff --git a/.github/workflows/build-debian-package.yml b/.github/workflows/build-debian-package.yml deleted file mode 100644 index 02a0b3846..000000000 --- a/.github/workflows/build-debian-package.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Build Debian Package - -on: - workflow_dispatch: - -jobs: - build: - name: Build on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-18.04] - env: - LC_ALL: C.UTF-8 - - steps: - - uses: actions/checkout@v2 - - - name: Install build tools - run: | - sudo apt update - sudo apt install -y \ - make \ - dpkg-dev \ - debhelper \ - haskell-platform \ - libghc-json-dev \ - python-dev \ - default-jdk \ - libtool-bin - - - name: Build Debian package - run: | - make deb - - - name: Copy package - run: | - cp ../gf_*.deb dist/ - - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: gf-${{ github.sha }}-debian - path: dist/gf_*.deb - if-no-files-found: error diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml deleted file mode 100644 index 1ebf5dfa6..000000000 --- a/.github/workflows/build-macos-package.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Build macOS Package - -on: - workflow_dispatch: - -jobs: - build: - name: Build on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-10.15] - ghc: ["8.6.5"] - cabal: ["2.4"] - - steps: - - uses: actions/checkout@v2 - - - name: Setup Haskell - uses: actions/setup-haskell@v1 - id: setup-haskell-cabal - with: - ghc-version: ${{ matrix.ghc }} - cabal-version: ${{ matrix.cabal }} - - - name: Install build tools - run: | - brew install \ - automake - cabal v1-install alex happy - - - name: Build macOS package - run: | - sudo mkdir -p /Library/Java/Home - sudo ln -s /usr/local/opt/openjdk/include /Library/Java/Home/include - make pkg - - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: gf-${{ github.sha }}-macos - path: dist/gf-*.pkg - if-no-files-found: error From a7a6eb55811a234a46b650b77357f0589ba6a46b Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 30 Nov 2020 21:34:50 +0100 Subject: [PATCH 92/97] Update release instructions --- .github/workflows/build-binary-packages.yml | 2 +- RELEASE.md | 31 ++++++++++++--------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-binary-packages.yml b/.github/workflows/build-binary-packages.yml index e387ae9b1..e33022e6e 100644 --- a/.github/workflows/build-binary-packages.yml +++ b/.github/workflows/build-binary-packages.yml @@ -41,7 +41,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v2 with: - name: gf-${{ github.sha }}-debian + name: gf-${{ github.sha }}-ubuntu path: dist/gf_*.deb if-no-files-found: error diff --git a/RELEASE.md b/RELEASE.md index 0c304fe51..3a771b78d 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -11,14 +11,14 @@ See the [RGL's RELEASE.md](https://github.com/GrammaticalFramework/gf-rgl/blob/m **Web pages** 1. Create `download/index-X.Y.md` with installation instructions. -1. Create `download/release-X.Y.md` with changelog information. -1. Update `download/index.html` to redirect to the new version. -1. Add announcement in news section in `index.html`. +2. Create `download/release-X.Y.md` with changelog information. +3. Update `download/index.html` to redirect to the new version. +4. Add announcement in news section in `index.html`. **Version numbers** 1. Update version number in `gf.cabal` (ommitting `-git` suffix). -1. Add a new line in `debian/changelog`. +2. Add a new line in `debian/changelog`. ### 2. Create GitHub release @@ -26,25 +26,30 @@ See the [RGL's RELEASE.md](https://github.com/GrammaticalFramework/gf-rgl/blob/m and pushed, check that all CI workflows are successful (fixing as necessary): - - -1. Create a GitHub release [here](https://github.com/GrammaticalFramework/gf-core/releases/new) using tag format `RELEASE-X.Y`. +2. Create a GitHub release [here](https://github.com/GrammaticalFramework/gf-core/releases/new): + - Tag version format `RELEASE-X.Y` + - Title: "GF X.Y" + - Description: mention major changes since last release +3. Publish the release to trigger the building of the binary packages (below). ### 3. Binary packages -The binaries will be built automatically by the GitHub Actions workflows, -but the generated artifacts must be manually attached to the release as _assets_. +The binaries will be built automatically by GitHub Actions when the release is created, +but the generated _artifacts_ must be manually attached to the release as _assets_. -1. Go to . -1. Click "Build [platform] Package" under _Workflows_. -1. Choose the workflow run corresponding to the release commit SHA. -1. Download the artifact locally, then add to the release with a name `gf-X.Y-PLATFORM.EXT` (e.g. `gf-3.11-macos.pkg`). +1. Go to the [actions page](https://github.com/GrammaticalFramework/gf-core/actions) and click "Build Binary Packages" under _Workflows_. +2. Choose the workflow run corresponding to the newly created release. +3. Download the artifacts locally. Extract the Ubuntu and macOS ones to get the `.deb` and `.pkg` files. +4. Go back to the [releases page](https://github.com/GrammaticalFramework/gf-core/releases) and click to edit the release information. +5. Add the downloaded artifacts as release assets, giving them names with format `gf-X.Y-PLATFORM.EXT` (e.g. `gf-3.11-macos.pkg`). ### 4. Upload to Hackage 1. Run `make sdist` -1. Upload the package, either: +2. Upload the package, either: 1. **Manually**: visit and upload the file `dist/gf-X.Y.tar.gz` 2. **via Cabal (≥2.4)**: `cabal upload dist/gf-X.Y.tar.gz` -1. If the documentation-building fails on the Hackage server, do: +3. If the documentation-building fails on the Hackage server, do: ``` cabal v2-haddock --builddir=dist/docs --haddock-for-hackage --enable-doc cabal upload --documentation dist/docs/*-docs.tar.gz From 68ec61f44d8479f3ed50e713badb9465c11606e9 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 30 Nov 2020 22:03:23 +0100 Subject: [PATCH 93/97] Remove build status badge from README The GitHub interface now provides much richer information about build status. --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 5ee8967a6..2afa476ea 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ # Grammatical Framework (GF) -[![Build Status](https://travis-ci.org/GrammaticalFramework/gf-core.svg?branch=master)](https://travis-ci.org/GrammaticalFramework/gf-core) - The Grammatical Framework is a grammar formalism based on type theory. It consists of: From d6be4ec3b0a77782b8287e0801d6ba60e8968c6f Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 30 Nov 2020 23:05:43 +0100 Subject: [PATCH 94/97] Add note about why we're not using Setup Haskell action for Ubuntu build. --- .github/workflows/build-binary-packages.yml | 24 +++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-binary-packages.yml b/.github/workflows/build-binary-packages.yml index e33022e6e..810fa1352 100644 --- a/.github/workflows/build-binary-packages.yml +++ b/.github/workflows/build-binary-packages.yml @@ -11,16 +11,28 @@ jobs: ubuntu: name: Build Ubuntu package runs-on: ubuntu-18.04 - # env: - # LC_ALL: C.UTF-8 + # strategy: + # matrix: + # ghc: ["8.6.5"] + # cabal: ["2.4"] steps: - uses: actions/checkout@v2 + # Note: `haskell-platform` is listed as requirement in debian/control, + # which is why it's installed using apt instead of the Setup Haskell action. + + # - name: Setup Haskell + # uses: actions/setup-haskell@v1 + # id: setup-haskell-cabal + # with: + # ghc-version: ${{ matrix.ghc }} + # cabal-version: ${{ matrix.cabal }} + - name: Install build tools run: | - sudo apt update - sudo apt install -y \ + sudo apt-get update + sudo apt-get install -y \ make \ dpkg-dev \ debhelper \ @@ -30,7 +42,7 @@ jobs: default-jdk \ libtool-bin - - name: Build Debian package + - name: Build package run: | make deb @@ -71,7 +83,7 @@ jobs: automake cabal v1-install alex happy - - name: Build macOS package + - name: Build package run: | sudo mkdir -p /Library/Java/Home sudo ln -s /usr/local/opt/openjdk/include /Library/Java/Home/include From 7f6bfa730bc738edbcb4f89a57cbcd1bf5e74196 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 7 Dec 2020 10:31:19 +0100 Subject: [PATCH 95/97] Update changelog for 3.11 by going through all commit messages since GF-3.10 --- download/index-3.11.md | 13 ++++++++----- download/release-3.11.md | 27 +++++++++++++++++++++------ 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/download/index-3.11.md b/download/index-3.11.md index 78b6af4bc..9de6811f9 100644 --- a/download/index-3.11.md +++ b/download/index-3.11.md @@ -6,11 +6,13 @@ title: Grammatical Framework Download and Installation What's new? See the [release notes](release-3.11.html). -#### Note: GF core and RGL +#### Note: GF core and the RGL The following instructions explain how to install **GF core**, i.e. the compiler, shell and run-time systems. Obtaining the **Resource Grammar Library (RGL)** is done separately; see the section at the bottom of this page. +--- + ## Installing from a binary package Binary packages are available for Debian/Ubuntu, macOS, and Windows and include: @@ -24,7 +26,7 @@ Unlike in previous versions, the binaries **do not** include the RGL. [Binary packages on GitHub](https://github.com/GrammaticalFramework/gf-core/releases/tag/RELEASE-3.11) -### Debian/Ubuntu +#### Debian/Ubuntu To install the package use: ``` @@ -33,18 +35,19 @@ sudo dpkg -i gf_3.11.deb The Ubuntu `.deb` packages should work on Ubuntu 16.04, 18.04 and similar Linux distributions. -### macOS +#### macOS To install the package, just double-click it and follow the installer instructions. The packages should work on at least 10.13 (High Sierra) and 10.14 (Mojave). -### Windows +#### Windows To install the package, unpack it anywhere. You will probably need to update the `PATH` environment variable to include your chosen install location. - + +For more information, see [Using GF on Windows](https://www.grammaticalframework.org/~inari/gf-windows.html) (may be outdated). ## Installing the latest release from source diff --git a/download/release-3.11.md b/download/release-3.11.md index a6af7fafe..87b85aa02 100644 --- a/download/release-3.11.md +++ b/download/release-3.11.md @@ -1,25 +1,40 @@ --- title: GF 3.11 Release Notes -date: ? December 2020 +date: ... December 2020 ... ## Installation -See the [download page](index.html). +See the [download page](index-3.11.html). ## What's new From this release, the binary GF core packages do not contain the RGL. The RGL's release cycle is now completely separate from GF's. See [RGL releases](https://github.com/GrammaticalFramework/gf-rgl/releases). -Over ... changes have been pushed to GF core +Over 400 changes have been pushed to GF core since the release of GF 3.10 in December 2018. ## General -- Testsuite. -- Compatibiilty with new versions of GHC. +- Make the test suite work again. +- Compatibility with new versions of GHC, including multiple Stack files for the different versions. +- Updates to build scripts and CI. +- Bug fixes. ## GF compiler and run-time library -- More improvements to error messages. +- Huge improvements in time & space requirements for grammar compilation. +- Add CoNLL output to `visualize_tree` shell command. +- Add canonical GF as output format in the compiler. +- Add PGF JSON as output format in the compiler. +- Deprecate JavaScript runtime in favour of updated [TypeScript runtime](https://github.com/GrammaticalFramework/gf-typescript). +- Improvements to Haskell export. +- Improvements to the C runtime. +- Improvements to `gf -server` mode. +- Clearer compiler error messages. + +## Other + +- Web page and documentation improvements. +- Add WordNet module to GFSE. From 2b6b315bd719504a2e3fdf43c3722f590b654b11 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 7 Dec 2020 10:35:11 +0100 Subject: [PATCH 96/97] Add note to changelog that #87 is still pending --- download/release-3.11.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download/release-3.11.md b/download/release-3.11.md index 87b85aa02..3cb448303 100644 --- a/download/release-3.11.md +++ b/download/release-3.11.md @@ -24,7 +24,7 @@ since the release of GF 3.10 in December 2018. ## GF compiler and run-time library -- Huge improvements in time & space requirements for grammar compilation. +- Huge improvements in time & space requirements for grammar compilation (pending [#87](https://github.com/GrammaticalFramework/gf-core/pull/87)). - Add CoNLL output to `visualize_tree` shell command. - Add canonical GF as output format in the compiler. - Add PGF JSON as output format in the compiler. From d77921005a429406398167c713969c6d807e56fa Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Wed, 16 Dec 2020 17:38:13 +0100 Subject: [PATCH 97/97] Specify that the Windows guide is for Windows 10 --- download/index-3.11.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download/index-3.11.md b/download/index-3.11.md index 9de6811f9..c128e77ce 100644 --- a/download/index-3.11.md +++ b/download/index-3.11.md @@ -47,7 +47,7 @@ To install the package, unpack it anywhere. You will probably need to update the `PATH` environment variable to include your chosen install location. -For more information, see [Using GF on Windows](https://www.grammaticalframework.org/~inari/gf-windows.html) (may be outdated). +For more information, see [Using GF on Windows](https://www.grammaticalframework.org/~inari/gf-windows.html) (latest updated for Windows 10). ## Installing the latest release from source