From d8452bf11cb7704b77dbc20f47fedb4d055441c7 Mon Sep 17 00:00:00 2001 From: Gil Mizrahi Date: Thu, 6 Oct 2022 15:25:19 +0300 Subject: [PATCH] server: remove ghc libs from freeze file, update guides PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6231 GitOrigin-RevId: d877e46d7130217cd95eb9c507921e76a0009151 --- cabal.project.freeze | 10 +++++----- server/COMPILING-ON-MACOS.md | 13 +++++++------ server/CONTRIBUTING.md | 2 +- server/lib/api-tests/README.md | 18 +++--------------- 4 files changed, 16 insertions(+), 27 deletions(-) diff --git a/cabal.project.freeze b/cabal.project.freeze index fc6376bc3d6..b6f3c75973b 100644 --- a/cabal.project.freeze +++ b/cabal.project.freeze @@ -123,14 +123,14 @@ constraints: any.Cabal ==3.6.3.0, any.formatting ==7.1.3, any.free ==5.1.7, any.generics-sop ==0.5.1.2, - any.ghc ==9.2.4.20220919, + any.ghc ==9.2.*, any.ghc-bignum ==1.2, - any.ghc-boot ==9.2.4.20220919, - any.ghc-boot-th ==9.2.4.20220919, - any.ghc-heap ==9.2.4.20220919, + any.ghc-boot ==9.2.*, + any.ghc-boot-th ==9.2.*, + any.ghc-heap ==9.2.*, any.ghc-heap-view ==0.6.3, any.ghc-prim ==0.8.0, - any.ghci ==9.2.4.20220919, + any.ghci ==9.2.*, any.graphql-parser ==0.2.0.0, any.happy ==1.20.0, any.hashable ==1.3.5.0, diff --git a/server/COMPILING-ON-MACOS.md b/server/COMPILING-ON-MACOS.md index a71517da546..ecaba3834ff 100644 --- a/server/COMPILING-ON-MACOS.md +++ b/server/COMPILING-ON-MACOS.md @@ -1,8 +1,8 @@ -# Compile a graphql-engine executable using brew and ghc-8.10.7 +# Compile a graphql-engine executable using brew and ghc-9.2.4 *Note: These instructions use the path `/opt/homebrew` in various places, but this path may be different on your machine depending on where you have installed homebrew (for example, many older homebrew installation were installed to `/usr/local`). You can find out the path of your homebrew installation by running the command `brew --prefix`, and if the output is not `/opt/homebrew`, then you should replace any instances of `/opt/homebrew` in these instructions with the path output by `brew --prefix`.* -1. Install ghc-8.10.7 and cabal-install via [ghcup](https://www.haskell.org/ghcup/) +1. Install ghc-9.2.4 and cabal-install via [ghcup](https://www.haskell.org/ghcup/). 2. Install dependencies: @@ -19,6 +19,7 @@ brew install microsoft/mssql-release/mssql-tools brew install direnv brew install coreutils + brew install pcre ``` And add them to your environment: @@ -103,10 +104,10 @@ (Copying and pasting allows you to add local projects overrides, which may be needed if you are are planning to make changes to the graphql-engine code, but is not required for simply compiling the code as-is). 6. Write the version number of the graphql-server that you are intending to build to the file `server/CURRENT_VERSION`. - For example if you are building `v2.6.1` then you can run the following command: + For example if you are building `v2.13.0` then you can run the following command: ```sh - echo '2.6.1' > server/CURRENT_VERSION + echo '2.13.0' > server/CURRENT_VERSION ``` This version number is used for the output of `graphql-engine --version` in your compiled binary, and it also used when fetching the frontend assets for the console from the CDN when running the server (if you do not specify `--console-assets-dir` to make it load from a locally compiled version). @@ -114,6 +115,6 @@ 7. Building the server should now work: ```sh - cabal v2-update - cabal v2-build exe:graphql-engine -j4 + cabal update + cabal build exe:graphql-engine -j4 ``` diff --git a/server/CONTRIBUTING.md b/server/CONTRIBUTING.md index 8f9a79e5e3b..edc99008aef 100644 --- a/server/CONTRIBUTING.md +++ b/server/CONTRIBUTING.md @@ -5,7 +5,7 @@ own machine and how to contribute. ## Pre-requisites -- [GHC](https://www.haskell.org/ghc/) 8.10.7 and [cabal-install](https://cabal.readthedocs.io/en/latest/) +- [GHC](https://www.haskell.org/ghc/) 9.2.4 and [cabal-install](https://cabal.readthedocs.io/en/latest/) - There are various ways these can be installed, but [ghcup](https://www.haskell.org/ghcup/) is a good choice if you’re not sure. - There are few system packages required like `libpq-dev`, `libssl-dev`, etc. The best place to get the entire list is from the packager [Dockerfile](../.buildkite/dockerfiles/ci-builders/server-builder.dockerfile) - Additional Haskell tools (expected versions can be found in _VERSIONS.json_): diff --git a/server/lib/api-tests/README.md b/server/lib/api-tests/README.md index 142207acbae..cfc01f2e947 100644 --- a/server/lib/api-tests/README.md +++ b/server/lib/api-tests/README.md @@ -176,7 +176,7 @@ An example session: ``` $ cabal repl api-tests -GHCi, version 8.10.7: https://www.haskell.org/ghc/ :? for help +GHCi, version 9.2.4: https://www.haskell.org/ghc/ :? for help [ 1 of 59] Compiling Harness.Constants ( lib/api-tests/Harness/Constants.hs, interpreted ) ... [59 of 59] Compiling Main ( lib/api-tests/Spec.hs, interpreted ) @@ -289,19 +289,7 @@ or M2. We have a few problems with Microsoft SQL Server on Apple aarch64: -1. Due to compiler bugs in GHC 8.10.7, we need to use patched Haskell ODBC - bindings as a workaround for aarch64 systems. - - Add the following to `cabal.project.local`: - - ``` - source-repository-package - type: git - location: https://github.com/soupi/odbc.git - tag: a6acf6b4eca31022babbf8045f31a0f7f26c5923 - ``` - -2. Microsoft has not yet released SQL Server for aarch64. We need to use Azure +1. Microsoft has not yet released SQL Server for aarch64. We need to use Azure SQL Edge instead. You don't need to do anything if you're using the `make` commands; they @@ -316,7 +304,7 @@ We have a few problems with Microsoft SQL Server on Apple aarch64: You can add this to your _.envrc.local_ file if you like. -3. Azure SQL Edge for aarch64 does not ship with the `sqlcmd` utility with +2. Azure SQL Edge for aarch64 does not ship with the `sqlcmd` utility with which we use to setup the SQL Server schema. If you need it, you can instead use the `mssql-tools` Docker image, for