Commit Graph
66 Commits
Author SHA1 Message Date
Andreas Källberg cf1ef40789 gh-actions: Bump the python version
cibuildwheel requires python >= 3.8
2023-09-25 12:55:15 +02:00
Andreas Källberg 37f06a4ae8 gh-actions: Don't use ubuntu-18 and macos-10.15
There are no longer any gihub actions runners available for these

Note that this means we can't build for ubuntu-18 anymore, but that
should hopefully no longer be relevant, since it's over 5 years old now.
2023-09-25 12:48:56 +02:00
Andreas Källberg 30c1376232 Don't build twice for tests in CI 2023-09-25 12:43:19 +02:00
Andreas Källberg ea3cef46b0 Update test to match new error 2023-09-25 12:01:56 +02:00
Andreas Källberg 268a25f59c Indent each line of an error message
By indenting each line instead of just the first, we simplify
the work of the gf-lsp parser, so we can see which errors are the same
2023-09-25 09:55:02 +02:00
Andreas Källberg b90666455e Fix typo 2023-09-11 13:17:19 +02:00
Andreas Källberg 88db715c3d Fix ghc-7.10.3 build in gh-actions
ghc-7.10.3 is not supported in the latest builder, so we
need an older version of ubuntu for it to work
2023-09-11 13:03:05 +02:00
Andreas Källberg 003ab57576 Bump version of haskell github action
The old one was failing
2023-09-11 18:43:14 +08:00
Andreas Källberg ffd7b27abd Improve syntax error messages
Now you will get error messages like these:
example.gf:1:21:
   Syntax error:
     Unexpected token '}'.
     Expected one of:
     - '{'
     - 'open'
     - an identifier
2023-09-11 12:30:28 +02:00
Andreas Källberg a58c6d49d4 Extract the previous optimization to its own function 2022-10-04 17:01:47 +02:00
Andreas Källberg fef7b80d8e Use a Set in isInherited to speed up long extend lists
Now the time is O(log(n)*m) instead of O(n*m) where n is the number of
items in the extend list

e.g.
abstract FromWordNet = WordNet [
a_couple_Card,
a_la_carte_Adv,
a_la_mode_Adv,
a_little_Card,
...
];
2022-10-04 17:01:47 +02:00
Andreas Källberg 03df25bb7a Add support for ghc-9.2.4 2022-10-04 17:01:23 +02:00
Andreas Källberg 0a16b76875 Only include transformers-compat for ghc < 8
Since that's the only place where it's needed
and we don't have to fight with versions elsewhere
2022-10-04 13:28:23 +02:00
Andreas Källberg 51b7117a3d Restore build with ghc-7.10.3 2022-10-04 13:07:07 +02:00
Andreas Källberg fef03e755b Update some old unused code to support newer ghc 2022-10-04 13:07:07 +02:00
Andreas Källberg 9b9905c0b2 Always use UTF8 encoding in the gf executable
This fixes many of the "Invalid character" messages
you can get on different platforms.

This has helped both with a nix-installation that didn't have global
locale set and with a windows installation.
2022-05-18 14:42:01 +08:00
Andreas Källberg b0b2a06f3b Improve comment 2022-05-03 13:10:29 +08:00
Andreas Källberg 221597bd79 When profiling, don't add cost centres in Data.Binary.Get
This change speeds up profiling by an order of magnitude.
Without it, the >>= function for Get dominates runtime completely during profiling.
2022-05-03 13:08:35 +08:00
Andreas Källberg 308f4773dc Upgrade to ghc-8.10.7
This version has better support for m1 macbooks
2022-03-05 12:25:46 +08:00
Andreas Källberg 05fc093b5e Add restore key to cache 2022-03-05 12:25:46 +08:00
Andreas Källberg 4caf6d684e Another attempt at fixing linker errors 2022-03-05 12:25:46 +08:00
Andreas Källberg bfd8f9c16d Upgrade haskell setup action 2022-03-05 12:24:38 +08:00
Andreas Källberg aefac84670 Clear stack cache and make cache-key more fine-grained
Attempt at fixing #137
2022-03-05 12:24:10 +08:00
Andreas Källberg 1867bfc8a1 Rename packages based on git tag 2021-07-25 11:08:21 +08:00
Andreas Källberg 6ef4f27d32 Upload release assets automatically as well 2021-07-25 10:43:36 +08:00
Andreas Källberg 8814fde817 Only run the script once per release 2021-07-25 09:30:36 +08:00
Andreas Källberg 375b3cf285 Update release script to build for two ubuntu versions 2021-07-25 08:23:25 +08:00
Andreas Källberg 3c4f42db15 Build ubuntu packages on ubuntu-latest
Fixes #74
2021-07-25 08:23:25 +08:00
Andreas Källberg e3498d5ead Update to newest haskell github action
Also fix so the stack builds use the correct ghc versions
2021-07-25 08:23:25 +08:00
Andreas Källberg 4c5927c98c Update scripts to use cabal v1-... so they work on newer cabal
Fixes build failures like https://github.com/GrammaticalFramework/gf-core/runs/2949099280?check_suite_focus=true
2021-07-25 08:23:25 +08:00
Andreas Källberg 7faf8c9dad Clean up redundant case expressions 2021-07-12 16:38:29 +08:00
Andreas Källberg c2ffa6763b Github actions: Fix build for stack 2021-07-12 15:53:49 +08:00
Andreas Källberg b3881570c7 Remove last traces of the Either in value2term 2021-07-12 15:53:49 +08:00
Andreas Källberg bd270b05ff Remove the Either Int from value2term
This prevents HUGE space leak and makes compiling a PGF a LOT faster

For example, an application grammar moved from taking over 50GB
of ram and taking 5 minutes (most of which is spent on garbage colelction)
to taking 1.2 seconds and using 42mb of memory

The price we pay is that the "variable #n is out of scope" error is now
lazy and will happen when we try to evaluate the term instead of
happening when the function returns and allowing the caller to chose how
to handle the error.
I don't think this should matter in practice, since it's very rare;
at least Inari has never encountered it.
2021-07-12 15:50:43 +08:00
Andreas Källberg 02671cafd0 Disable cabal tests
The test suite isn't currently able to find the gf executable on cabal
2021-06-17 20:20:18 +08:00
Andreas Källberg 0a18688788 Remove gf-lib-path from testsuite
Since it no longer depends on RGL and it caused issues in the testsuite
2021-06-17 19:24:14 +08:00
Andreas Källberg 889be1ab8e Enable tests in github actions 2021-06-17 16:42:04 +08:00
Andreas Källberg 65522a63c3 Testsuite: Add support for expected failures
And mark the currently failing tests as expected failures
2021-06-17 16:38:33 +08:00
Andreas Källberg 7065125e19 Fix "canonicalizePath: does not exist" issue on ghc-7.10
This caused failures in the test suite
Only fixes it for stack builds.
We should probably add constraints to the cabal file as well
2021-06-16 15:30:24 +08:00
Andreas Källberg 2c37e7dfad Fix build for ghc-7.10.3 2021-06-16 14:54:36 +08:00
Andreas Källberg f505d88a8e Fix build of test suite on ghc-8.2.2 2021-06-16 14:27:19 +08:00
Andreas Källberg b1ed63b089 Don't print stack traces in Command.hs
They don't provide useful info anyways and they are needlessly verbose.
2021-06-16 14:26:22 +08:00
Andreas Källberg 1ff66006b8 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.
2020-10-26 17:21:22 +01:00
Andreas Källberg 7b4eeb368c Make CI green
See https://github.com/joerick/cibuildwheel/issues/446
2020-10-08 21:50:12 +02:00
Andreas Källberg f2e4b89a22 Fix syntax error problem for older versions of GHC 2020-10-08 17:41:44 +02:00
Andreas Källberg 8bcdeedba0 Bump default stack.yaml to ghc8.6.5 2020-09-14 17:44:23 +02:00
Andreas Källberg 7d6a115cc1 Bump stackage snapshots to latest versions 2020-09-14 15:15:23 +02:00
Andreas Källberg 127a1b2842 Remove MonadFail requirements for aeson code 2020-09-12 11:04:32 +02:00
Andreas Källberg 2fd1040724 Fix incorrect type and update dependencies 2020-09-12 11:04:32 +02:00
Andreas Källberg 340f8d9b93 First attempt at github actions for stack 2020-09-12 10:55:18 +02:00
Andreas Källberg 9d8cd55cd5 Import orphan instances of MonadFail for ghc<8
Also upgrade alex/happy so automatic install works
2020-09-09 11:05:41 +02:00
Andreas Källberg 150b592aa9 Add stack file for ghc8.8.4 2020-09-08 15:10:29 +02:00
Andreas Källberg 56f94da772 Merge remote-tracking branch 'origin/master' into fix-newer-cabal 2020-09-05 21:11:12 +02:00
Andreas Källberg 57ce76dbc1 Add two more missing MonadFail imports 2020-09-05 20:57:30 +02:00
Andreas Källberg 2b23e0f27e Fix wrong indent 2020-09-05 20:45:08 +02:00
Andreas Källberg 57c1014e9f Update package database on ubuntu build
Fixes 404 error:
https://github.com/GrammaticalFramework/gf-core/runs/1076062405
2020-09-05 20:36:04 +02:00
Andreas Källberg 7268253f5a MonadFail: Make backwards-compatible 2020-09-05 20:23:07 +02:00
Andreas Källberg 1234c715fc Fix MonadFail for c-runtime as well 2020-09-05 18:57:40 +02:00
Andreas Källberg 47dbf9ac27 Add stack file for a more recent ghc 2020-08-19 14:13:17 +02:00
Andreas Källberg 85ab6daaaa Add cabal dist-newtyle to gitignore 2020-08-05 19:09:25 +02:00
Andreas Källberg e351e7b79a Remove NoMonadFailDesugaring flag
I've fixed so everything has the fail it needs now
2020-08-05 18:48:24 +02:00
Andreas Källberg 05903b271c Fix testsuite compatability with newer Cabal 2020-08-05 18:48:24 +02:00
Andreas Källberg 3bd1f01959 Fix a few warnings 2020-08-05 18:48:24 +02:00
Andreas Källberg 0581d6827e Fix most build errors 2020-08-05 18:48:24 +02:00
Andreas Källberg b8812b54b2 fix newer ghc: Don't try to be backwards compatible 2020-08-05 18:48:24 +02:00
Andreas Källberg 251845f83e First attempt at fixing incompabilities with newer cabal 2020-08-05 18:48:24 +02:00