Commit 24083672 authored by Alfredo Di Napoli's avatar Alfredo Di Napoli

Use newly-created opaleye-textsearch instead of fork

This commit removes the need for a custom Opaleye fork by relying on
a newly-created `opaleye-textsearch` package following the design
outlined here:

https://github.com/tomjaguarpaw/haskell-opaleye/pull/563#issuecomment-1782794439
parent 9c80d56c
Pipeline #5930 passed with stages
...@@ -18,8 +18,8 @@ fi ...@@ -18,8 +18,8 @@ fi
# with the `sha256sum` result calculated on the `cabal.project` and # with the `sha256sum` result calculated on the `cabal.project` and
# `cabal.project.freeze`. This ensures the files stay deterministic so that CI # `cabal.project.freeze`. This ensures the files stay deterministic so that CI
# cache can kick in. # cache can kick in.
expected_cabal_project_hash="4e2bc98c9e153d35a18644f22c9b764f4190d2b6bb2a55f863be1112c2e6bebc" expected_cabal_project_hash="11043def9ea48943c952ff23f14832eaf203480d4cb9f4eef32a3941e734b151"
expected_cabal_project_freeze_hash="a88c2d091ee6223b64fb5dd38e71ab8379710a2aa716d2467f318789e4d75589" expected_cabal_project_freeze_hash="409aceaa4d59a1ddd0ed33a20382ef36131e23a557481f4963ef07ccb3518468"
cabal --store-dir=$STORE_DIR v2-build --dry-run cabal --store-dir=$STORE_DIR v2-build --dry-run
cabal2stack --system-ghc --allow-newer --resolver lts-21.17 --resolver-file devops/stack/lts-21.17.yaml -o stack.yaml cabal2stack --system-ghc --allow-newer --resolver lts-21.17 --resolver-file devops/stack/lts-21.17.yaml -o stack.yaml
......
...@@ -32,8 +32,8 @@ source-repository-package ...@@ -32,8 +32,8 @@ source-repository-package
source-repository-package source-repository-package
type: git type: git
location: https://github.com/garganscript/haskell-opaleye.git location: https://gitlab.iscpif.fr/gargantext/opaleye-textsearch.git
tag: 6cf1bcfe215143efac17919cfd0abdd60e0f717c tag: cb07b604bfb7a22aa21dd8918de5cb65c8a4bdf1
source-repository-package source-repository-package
type: git type: git
......
...@@ -393,6 +393,7 @@ constraints: any.Cabal ==3.8.1.0, ...@@ -393,6 +393,7 @@ constraints: any.Cabal ==3.8.1.0,
any.old-locale ==1.0.0.7, any.old-locale ==1.0.0.7,
any.old-time ==1.1.0.3, any.old-time ==1.1.0.3,
any.opaleye ==0.9.6.1, any.opaleye ==0.9.6.1,
any.opaleye-textsearch ==0.1.0.0,
any.openalex ==0.1.0.0, any.openalex ==0.1.0.0,
any.optics-core ==0.4.1.1, any.optics-core ==0.4.1.1,
optics-core -explicit-generic-labels, optics-core -explicit-generic-labels,
......
...@@ -558,6 +558,7 @@ library ...@@ -558,6 +558,7 @@ library
, natural-transformation ^>= 0.4 , natural-transformation ^>= 0.4
, network-uri ^>= 2.6.4.1 , network-uri ^>= 2.6.4.1
, opaleye ^>= 0.9.6.1 , opaleye ^>= 0.9.6.1
, opaleye-textsearch >= 0.1.0.0
, openalex , openalex
, pandoc ^>= 2.14.0.3 , pandoc ^>= 2.14.0.3
, parallel ^>= 3.2.2.0 , parallel ^>= 3.2.2.0
......
...@@ -54,6 +54,7 @@ import Gargantext.Database.Schema.Node ( NodePolySearch(_ns_hyperdata, _ns_searc ...@@ -54,6 +54,7 @@ import Gargantext.Database.Schema.Node ( NodePolySearch(_ns_hyperdata, _ns_searc
import Gargantext.Prelude hiding (groupBy) import Gargantext.Prelude hiding (groupBy)
import Opaleye hiding (Order) import Opaleye hiding (Order)
import Opaleye qualified as O hiding (Order) import Opaleye qualified as O hiding (Order)
import Opaleye.TextSearch
-- --
-- Interpreting a query into a Postgres' TSQuery -- Interpreting a query into a Postgres' TSQuery
......
...@@ -41,7 +41,8 @@ import Gargantext.Database.Schema.Context ...@@ -41,7 +41,8 @@ import Gargantext.Database.Schema.Context
import Gargantext.Database.Schema.Node ( NodePoly(Node), NodePolySearch(NodeSearch) ) import Gargantext.Database.Schema.Node ( NodePoly(Node), NodePolySearch(NodeSearch) )
import Gargantext.Prelude import Gargantext.Prelude
import Gargantext.Prelude.Crypto.Hash (Hash) import Gargantext.Prelude.Crypto.Hash (Hash)
import Opaleye (DefaultFromField, defaultFromField, SqlInt4, SqlText, SqlTSVector, Nullable, fromPGSFromField) import Opaleye (DefaultFromField, defaultFromField, SqlInt4, SqlText, Nullable, fromPGSFromField)
import Opaleye.TextSearch (SqlTSVector)
import Opaleye qualified as O import Opaleye qualified as O
import Prelude qualified import Prelude qualified
import Servant hiding (Context) import Servant hiding (Context)
......
...@@ -27,6 +27,7 @@ module Gargantext.Database.Schema.Prelude ...@@ -27,6 +27,7 @@ module Gargantext.Database.Schema.Prelude
, module Opaleye , module Opaleye
, module Opaleye.Internal.Table , module Opaleye.Internal.Table
, module Opaleye.Internal.QueryArr , module Opaleye.Internal.QueryArr
, module Opaleye.TextSearch
, module Test.QuickCheck.Arbitrary , module Test.QuickCheck.Arbitrary
) )
where where
...@@ -41,6 +42,7 @@ import Gargantext.Core.Utils.Prefix (unPrefix, unPrefixSwagger) ...@@ -41,6 +42,7 @@ import Gargantext.Core.Utils.Prefix (unPrefix, unPrefixSwagger)
import Opaleye hiding (FromField) import Opaleye hiding (FromField)
import Opaleye.Internal.QueryArr (Query) import Opaleye.Internal.QueryArr (Query)
import Opaleye.Internal.Table (Table(..)) import Opaleye.Internal.Table (Table(..))
import Opaleye.TextSearch
import Test.QuickCheck.Arbitrary hiding (vector) import Test.QuickCheck.Arbitrary hiding (vector)
import Database.PostgreSQL.Simple.FromField (FromField, fromField) import Database.PostgreSQL.Simple.FromField (FromField, fromField)
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
- "morpheus-graphql-server-0.24.3" - "morpheus-graphql-server-0.24.3"
- "morpheus-graphql-subscriptions-0.24.3" - "morpheus-graphql-subscriptions-0.24.3"
- "morpheus-graphql-tests-0.24.3" - "morpheus-graphql-tests-0.24.3"
- "opaleye-0.9.6.1"
- "rake-0.0.1" - "rake-0.0.1"
- "random-1.2.1" - "random-1.2.1"
- "recover-rtti-0.4.3" - "recover-rtti-0.4.3"
...@@ -110,10 +111,6 @@ ...@@ -110,10 +111,6 @@
git: "https://github.com/delanoe/patches-map" git: "https://github.com/delanoe/patches-map"
subdirs: subdirs:
- . - .
- commit: 6cf1bcfe215143efac17919cfd0abdd60e0f717c
git: "https://github.com/garganscript/haskell-opaleye.git"
subdirs:
- .
- commit: 4fd2edf30c141600ffad6d730cc4c1c08a6dbce4 - commit: 4fd2edf30c141600ffad6d730cc4c1c08a6dbce4
git: "https://github.com/robstewart57/rdf4h.git" git: "https://github.com/robstewart57/rdf4h.git"
subdirs: subdirs:
...@@ -174,6 +171,10 @@ ...@@ -174,6 +171,10 @@
git: "https://gitlab.iscpif.fr/gargantext/iso639.git" git: "https://gitlab.iscpif.fr/gargantext/iso639.git"
subdirs: subdirs:
- . - .
- commit: cb07b604bfb7a22aa21dd8918de5cb65c8a4bdf1
git: "https://gitlab.iscpif.fr/gargantext/opaleye-textsearch.git"
subdirs:
- .
- commit: 3668d28607867a88b2dfc62158139b3cfd629ddb - commit: 3668d28607867a88b2dfc62158139b3cfd629ddb
git: "https://gitlab.iscpif.fr/gargantext/patches-class.git" git: "https://gitlab.iscpif.fr/gargantext/patches-class.git"
subdirs: subdirs:
...@@ -318,8 +319,8 @@ flags: ...@@ -318,8 +319,8 @@ flags:
"full-text-search": "full-text-search":
"build-search-demo": false "build-search-demo": false
gargantext: gargantext:
"disable-db-obfuscation-executable": false "disable-db-obfuscation-executable": true
"no-phylo-debug-logs": true "no-phylo-debug-logs": false
"test-crypto": false "test-crypto": false
"generic-deriving": "generic-deriving":
"base-4-9": true "base-4-9": true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment