From 0662c1b2059d26a6bd76caf0fadc5fa6774aab13 Mon Sep 17 00:00:00 2001 From: Emmanuel Denloye-Ito Date: Thu, 28 Mar 2024 16:14:50 -0400 Subject: [PATCH 1/9] Remove pact as a dependency We only seemed to need it for generating the richlist. This is a lot easier than I had imagined. --- cabal.project | 17 - cabal.project.freeze | 437 -------------------------- haskell-src/chainweb-data.cabal | 2 +- haskell-src/exec/Chainweb/RichList.hs | 25 +- 4 files changed, 8 insertions(+), 473 deletions(-) delete mode 100644 cabal.project.freeze diff --git a/cabal.project b/cabal.project index a820ded8..a3bb6840 100644 --- a/cabal.project +++ b/cabal.project @@ -4,12 +4,6 @@ with-compiler: ghc-9.2.8 package aeson flags: +cffi -source-repository-package - type: git - location: https://github.com/kadena-io/pact.git - tag: e5c922664fb4df53e3b8e2c48618d71b3ef612ad - --sha256: sha256-t1p+Zd5I/mW2Aggi4xMRl0wj6k3ztsgzydvNkBachFA= - source-repository-package type: git location: https://github.com/kadena-io/chainweb-api.git @@ -33,12 +27,6 @@ package vault write-ghc-environment-files: never -package pact - ghc-options: -Wwarn - optimization: True - flags: -build-tool - -constraints: sbv <10 constraints: http2 <4.2 allow-newer: streaming-events:* @@ -46,8 +34,3 @@ allow-newer: postgresql-simple-migration:* allow-newer: beam-postgres:* -- allow-newer: *:aeson allow-newer: *:vector - -allow-older: pact:base -allow-older: pact:mtl -allow-older: pact:text -allow-older: pact-json:text diff --git a/cabal.project.freeze b/cabal.project.freeze deleted file mode 100644 index 73401577..00000000 --- a/cabal.project.freeze +++ /dev/null @@ -1,437 +0,0 @@ -active-repositories: hackage.haskell.org:merge -constraints: any.Boolean ==0.2.4, - any.Cabal ==3.6.3.0, - any.Decimal ==0.5.2, - any.Glob ==0.10.2, - any.HUnit ==1.6.2.0, - any.MemoTrie ==0.6.11, - MemoTrie -examples, - any.NumInstances ==1.4, - any.OneTuple ==0.4.1.1, - any.Only ==0.1, - any.QuickCheck ==2.14.3, - QuickCheck -old-random +templatehaskell, - any.StateVar ==1.2.2, - any.adjunctions ==4.4.2, - any.aeson ==2.1.2.1, - aeson +cffi +ordered-keymap, - any.aeson-pretty ==0.8.10, - aeson-pretty -lib-only, - any.ansi-terminal ==1.0, - ansi-terminal -example, - any.ansi-terminal-types ==0.11.5, - any.ansi-wl-pprint ==0.6.9, - ansi-wl-pprint -example, - any.appar ==0.1.8, - any.array ==0.5.4.0, - any.asn1-encoding ==0.9.6, - any.asn1-parse ==0.9.5, - any.asn1-types ==0.3.4, - any.assoc ==1.1, - assoc +tagged, - any.async ==2.2.5, - async -bench, - any.atomic-primops ==0.8.4, - atomic-primops -debug, - any.attoparsec ==0.14.4, - attoparsec -developer, - any.attoparsec-aeson ==2.1.0.0, - any.auto-update ==0.1.6, - any.base ==4.16.4.0, - any.base-compat ==0.13.1, - any.base-compat-batteries ==0.13.1, - any.base-orphans ==0.9.1, - any.base-prelude ==1.6.1.1, - any.base-unicode-symbols ==0.2.4.2, - base-unicode-symbols +base-4-8 -old-base, - any.base16-bytestring ==1.0.2.0, - any.base64-bytestring ==1.2.1.0, - any.basement ==0.0.16, - any.beam-automigrate ==0.1.4.0, - beam-automigrate -ghcipretty -werror, - any.beam-core ==0.10.1.0, - beam-core -werror, - any.beam-migrate ==0.5.2.1, - beam-migrate -werror, - any.beam-postgres ==0.5.3.1, - beam-postgres -werror, - any.bifunctors ==5.6.1, - bifunctors +tagged, - any.binary ==0.8.9.0, - any.binary-orphans ==1.0.4.1, - any.bitvec ==1.1.5.0, - bitvec +simd, - any.blake2 ==0.3.0.1, - blake2 +hlint -llvm -support_blake2_sse, - any.blaze-builder ==0.4.2.3, - any.blaze-html ==0.9.1.2, - any.blaze-markup ==0.8.3.0, - any.boring ==0.2.1, - boring +tagged, - any.bound ==2.0.7, - bound +template-haskell, - any.bsb-http-chunked ==0.0.0.4, - any.byteable ==0.1.1, - any.byteorder ==1.0.4, - any.bytes ==0.17.3, - any.bytestring ==0.11.4.0, - any.bytestring-builder ==0.10.8.2.0, - bytestring-builder +bytestring_has_builder, - any.cabal-doctest ==1.0.9, - any.cache ==0.1.3.0, - any.call-stack ==0.4.0, - any.case-insensitive ==1.2.1.0, - any.cassava ==0.5.3.0, - cassava -bytestring--lt-0_10_4, - any.cborg ==0.2.10.0, - cborg +optimize-gmp, - any.cereal ==0.5.8.3, - cereal -bytestring-builder, - any.chainweb-api ==1.2.1, - chainweb-data -ghc-flags +threaded, - any.charset ==0.3.10, - any.clock ==0.8.4, - clock -llvm, - any.cmdargs ==0.10.22, - cmdargs +quotation -testprog, - any.code-page ==0.2.1, - any.colour ==2.3.6, - any.comonad ==5.0.8, - comonad +containers +distributive +indexed-traversable, - any.conduit ==1.3.5, - any.configuration-tools ==0.6.1, - configuration-tools -remote-configs, - any.connection ==0.3.1, - any.constraints ==0.14, - any.constraints-extras ==0.4.0.0, - constraints-extras +build-readme, - any.containers ==0.6.5.1, - any.contravariant ==1.5.5, - contravariant +semigroups +statevar +tagged, - any.cookie ==0.4.6, - any.criterion ==1.6.1.0, - criterion -embed-data-files -fast, - any.criterion-measurement ==0.2.1.0, - criterion-measurement -fast, - any.cryptohash ==0.11.9, - any.cryptohash-md5 ==0.11.101.0, - any.cryptohash-sha1 ==0.11.101.0, - any.crypton ==0.34, - crypton -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq +support_pclmuldq +support_rdrand -support_sse +use_target_attributes, - any.cryptonite ==0.30, - cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse +use_target_attributes, - any.data-array-byte ==0.1.0.1, - any.data-default ==0.7.1.1, - any.data-default-class ==0.1.2.0, - any.data-default-instances-containers ==0.0.1, - any.data-default-instances-dlist ==0.0.1, - any.data-default-instances-old-locale ==0.0.1, - any.data-fix ==0.3.2, - any.dec ==0.0.5, - any.deepseq ==1.4.6.1, - any.deferred-folds ==0.9.18.5, - any.dense-linear-algebra ==0.1.0.0, - any.dependent-map ==0.4.0.0, - any.dependent-sum ==0.7.2.0, - any.deriving-compat ==0.6.5, - deriving-compat +base-4-9 +new-functor-classes +template-haskell-2-11, - any.direct-sqlite ==2.3.28, - direct-sqlite +fulltextsearch +haveusleep +json1 -systemlib +urifilenames, - any.directory ==1.3.6.2, - any.distributive ==0.6.2.1, - distributive +semigroups +tagged, - any.dlist ==1.0, - dlist -werror, - any.easy-file ==0.2.5, - any.enclosed-exceptions ==1.0.3, - any.entropy ==0.4.1.10, - entropy -donotgetentropy, - any.errors ==2.3.0, - any.exceptions ==0.10.4, - any.fast-logger ==3.2.2, - any.file-embed ==0.0.15.0, - any.file-embed-lzma ==0.0.1, - any.filelock ==0.1.1.7, - any.filepath ==1.4.2.2, - any.fingertree ==0.1.5.0, - any.finite-typelits ==0.1.6.0, - any.foldable1-classes-compat ==0.1, - foldable1-classes-compat +tagged, - any.foldl ==1.4.15, - any.free ==5.2, - any.gargoyle ==0.1.1.1, - any.gargoyle-postgresql ==0.2.0.2, - gargoyle-postgresql -enable-psql-test, - any.gargoyle-postgresql-connect ==0.1.0.1, - any.gargoyle-postgresql-nix ==0.3.0.1, - any.generically ==0.1.1, - any.generics-sop ==0.5.1.3, - any.ghc-bignum >=1.2, - any.ghc-boot-th ==9.2.8, - any.ghc-prim ==0.8.0, - any.groups ==0.5.3, - any.half ==0.3.1, - any.happy ==1.20.1.1, - any.hashable ==1.4.3.0, - hashable +integer-gmp -random-initial-seed, - any.haskell-lexer ==1.1.1, - any.haskell-src-exts ==1.23.1, - any.headed-megaparsec ==0.2.1.2, - any.hourglass ==0.2.12, - any.hsc2hs ==0.68.10, - hsc2hs -in-ghc-tree, - any.hspec ==2.11.7, - any.hspec-core ==2.11.7, - any.hspec-discover ==2.11.7, - any.hspec-expectations ==0.8.4, - any.http-api-data ==0.6, - http-api-data -use-text-show, - any.http-client ==0.7.15, - http-client +network-uri, - any.http-client-tls ==0.3.6.1, - any.http-date ==0.0.11, - any.http-media ==0.8.1.1, - any.http-types ==0.12.4, - any.http2 ==4.1.4, - http2 -devel -h2spec, - any.indexed-list-literals ==0.2.1.3, - any.indexed-profunctors ==0.1.1.1, - any.indexed-traversable ==0.1.3, - any.indexed-traversable-instances ==0.1.1.2, - any.insert-ordered-containers ==0.2.5.3, - any.integer-conversion ==0.1.0.1, - any.integer-gmp ==1.1, - any.integer-logarithms ==1.0.3.1, - integer-logarithms -check-bounds +integer-gmp, - any.invariant ==0.6.2, - any.iproute ==1.7.12, - any.isomorphism-class ==0.1.0.12, - any.js-chart ==2.9.4.1, - any.kan-extensions ==5.2.5, - any.lens ==5.2.3, - lens -benchmark-uniplate -dump-splices +inlining -j +test-hunit +test-properties +test-templates +trustworthy, - any.lens-aeson ==1.2.3, - any.libyaml ==0.1.2, - libyaml -no-unicode -system-libyaml, - any.lifted-async ==0.10.2.5, - any.lifted-base ==0.2.3.12, - any.lzma ==0.0.1.0, - lzma +pkgconfig, - any.managed ==1.0.10, - any.math-functions ==0.3.4.3, - math-functions +system-erf +system-expm1, - any.megaparsec ==9.6.1, - megaparsec -dev, - any.memory ==0.18.0, - memory +support_bytestring +support_deepseq, - any.microlens ==0.4.13.1, - any.microstache ==1.0.2.3, - any.mime-types ==0.1.2.0, - any.mmorph ==1.2.0, - any.mod ==0.2.0.1, - mod +semirings +vector, - any.monad-control ==1.0.3.1, - any.mono-traversable ==1.0.15.3, - any.mtl ==2.2.2, - any.mtl-compat ==0.2.2, - mtl-compat -two-point-one -two-point-two, - any.mwc-random ==0.15.0.2, - any.neat-interpolation ==0.5.1.4, - any.network ==3.1.4.0, - network -devel, - any.network-byte-order ==0.1.7, - any.network-info ==0.2.1, - any.network-uri ==2.6.4.2, - any.newtype-generics ==0.6.2, - any.old-locale ==1.0.0.7, - any.old-time ==1.1.0.3, - any.openapi3 ==3.2.4, - any.optics-core ==0.4.1.1, - optics-core -explicit-generic-labels, - any.optics-extra ==0.4.2.1, - any.optics-th ==0.4.1, - any.optparse-applicative ==0.16.1.0, - optparse-applicative +process, - any.pact ==4.10, - pact -build-tool +cryptonite-ed25519 -tests-in-lib, - any.pact-json ==0.1.0.0, - any.pact-time ==0.2.0.2, - pact-time -with-time, - any.parallel ==3.2.2.0, - any.parsec ==3.1.15.0, - any.parser-combinators ==1.3.0, - parser-combinators -dev, - any.parsers ==0.12.11, - parsers +attoparsec +binary +parsec, - any.pem ==0.2.4, - any.poly ==0.5.1.0, - poly +sparse, - any.posix-escape ==0.1, - any.postgresql-libpq ==0.9.5.0, - postgresql-libpq -use-pkg-config, - any.postgresql-simple ==0.6.5.1, - any.postgresql-simple-migration ==0.1.15.0, - any.postgresql-syntax ==0.4.1, - any.pqueue ==1.4.3.0, - any.pretty ==1.1.3.6, - any.pretty-simple ==4.1.2.0, - pretty-simple -buildexample +buildexe, - any.prettyprinter ==1.7.1, - prettyprinter -buildreadme +text, - any.prettyprinter-ansi-terminal ==1.1.3, - any.primitive ==0.8.0.0, - any.process ==1.6.16.0, - any.profunctors ==5.6.2, - any.psqueues ==0.2.8.0, - any.pvar ==1.0.0.0, - any.quickcheck-instances ==0.3.30, - quickcheck-instances -bytestring-builder, - any.quickcheck-io ==0.2.0, - any.random ==1.2.1.1, - any.readable ==0.3.1, - any.recv ==0.1.0, - any.reducers ==3.12.4, - any.reflection ==2.1.7, - reflection -slow +template-haskell, - any.resource-pool ==0.4.0.0, - any.resourcet ==1.3.0, - any.retry ==0.9.3.1, - retry -lib-werror, - any.rts ==1.0.2, - any.safe ==0.3.19, - any.safe-exceptions ==0.1.7.4, - any.scheduler ==2.0.0.1, - any.scientific ==0.3.7.0, - scientific -bytestring-builder -integer-simple, - any.selective ==0.7, - any.semialign ==1.3, - semialign +semigroupoids, - any.semigroupoids ==6.0.0.1, - semigroupoids +comonad +containers +contravariant +distributive +tagged +unordered-containers, - any.semigroups ==0.20, - semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +template-haskell +text +transformers +unordered-containers, - any.semirings ==0.6, - semirings +containers +unordered-containers, - any.serialise ==0.2.6.1, - serialise +newtime15, - any.servant ==0.20.1, - any.servant-blaze ==0.9.1, - any.servant-client ==0.20, - any.servant-client-core ==0.20, - any.servant-openapi3 ==2.0.1.6, - any.servant-server ==0.20, - any.servant-swagger-ui ==0.3.5.5.0.0, - any.servant-swagger-ui-core ==0.3.5, - any.shelly ==1.9.0, - shelly -build-examples -lifted, - any.simple-sendfile ==0.2.32, - simple-sendfile +allow-bsd -fallback, - any.singleton-bool ==0.1.7, - any.socks ==0.6.1, - any.some ==1.0.6, - some +newtype-unsafe, - any.sop-core ==0.5.0.2, - any.split ==0.2.4, - any.splitmix ==0.1.0.5, - splitmix -optimised-mixer, - any.statistics ==0.16.2.1, - any.stm ==2.5.0.2, - any.stm-chans ==3.0.0.9, - any.streaming ==0.2.4.0, - any.streaming-attoparsec ==1.0.0.1, - any.streaming-bytestring ==0.3.2, - any.streaming-commons ==0.2.2.6, - streaming-commons -use-bytestring-builder, - any.streaming-events ==1.0.1, - any.strict ==0.5, - any.strict-tuple ==0.1.5.3, - any.string-conv ==0.2.0, - string-conv -lib-werror, - any.string-conversions ==0.4.0.1, - any.stringsearch ==0.3.6.6, - stringsearch -base3 +base4, - any.syb ==0.7.2.4, - any.tagged ==0.8.8, - tagged +deepseq +transformers, - any.tasty ==1.5, - tasty +unix, - any.tasty-hunit ==0.10.1, - any.tasty-quickcheck ==0.10.3, - any.template-haskell ==2.18.0.0, - any.text ==1.2.5.0, - any.text-builder ==0.6.7, - any.text-builder-dev ==0.3.3.2, - any.text-iso8601 ==0.1, - any.text-short ==0.1.5, - text-short -asserts, - any.tf-random ==0.5, - any.th-abstraction ==0.5.0.0, - any.th-compat ==0.1.4, - any.these ==1.2, - any.thyme ==0.3.6.0, - thyme +bug-for-bug -ghcjs -hlint -lens -show-internal -werror, - any.time ==1.11.1.1, - any.time-compat ==1.9.6.1, - time-compat -old-locale, - any.time-manager ==0.0.1, - any.tls ==1.6.0, - tls +compat -hans +network, - any.tls-session-manager ==0.0.4, - any.token-bucket ==0.1.0.1, - token-bucket +use-cbits, - any.transformers ==0.5.6.2, - any.transformers-base ==0.4.6, - transformers-base +orphaninstances, - any.transformers-compat ==0.7.2, - transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, - any.trifecta ==2.1.3, - any.type-equality ==1, - any.unix ==2.7.2.2, - any.unix-compat ==0.5.4, - unix-compat -old-time, - any.unix-time ==0.4.11, - any.unliftio ==0.2.25.0, - any.unliftio-core ==0.2.1.0, - any.unordered-containers ==0.2.19.1, - unordered-containers -debug, - any.utf8-string ==1.0.2, - any.uuid ==1.3.15, - any.uuid-types ==1.0.5.1, - any.vault ==0.3.1.5, - vault +useghc, - any.vector ==0.13.1.0, - vector +boundschecks -internalchecks -unsafechecks -wall, - any.vector-algorithms ==0.9.0.1, - vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, - any.vector-binary-instances ==0.2.5.2, - any.vector-sized ==1.5.0, - any.vector-space ==0.16, - any.vector-stream ==0.1.0.0, - any.vector-th-unbox ==0.2.2, - any.void ==0.7.3, - void -safe, - any.wai ==3.2.3, - any.wai-app-static ==3.1.8, - wai-app-static +crypton -print, - any.wai-cors ==0.2.7, - any.wai-extra ==3.1.13.0, - wai-extra -build-example, - any.wai-logger ==2.4.0, - any.wai-middleware-throttle ==0.3.0.1, - any.warp ==3.3.25, - warp +allow-sendfilefd -network-bytestring -warp-debug +x509, - any.warp-tls ==3.3.6, - any.which ==0.2.0.1, - any.witherable ==0.4.2, - any.word8 ==0.1.3, - any.x509 ==1.7.7, - any.x509-store ==1.6.9, - any.x509-system ==1.6.7, - any.x509-validation ==1.6.12, - any.yaml ==0.11.11.2, - yaml +no-examples +no-exe, - any.yet-another-logger ==0.4.2, - yet-another-logger -tbmqueue, - any.zlib ==0.6.3.0, - zlib -bundled-c-zlib -non-blocking-ffi -pkg-config -index-state: hackage.haskell.org 2023-12-05T08:50:28Z diff --git a/haskell-src/chainweb-data.cabal b/haskell-src/chainweb-data.cabal index a5298dec..06bbe2ec 100644 --- a/haskell-src/chainweb-data.cabal +++ b/haskell-src/chainweb-data.cabal @@ -125,7 +125,6 @@ executable chainweb-data , managed , mtl , optparse-applicative >=0.14 - , pact >=4.3.1 , postgresql-simple , postgresql-simple-migration , process >=1.6 @@ -142,6 +141,7 @@ executable chainweb-data , streaming-events , strict-tuple >=0.1 , string-conv + , sqlite-simple , vector , wai , wai-app-static diff --git a/haskell-src/exec/Chainweb/RichList.hs b/haskell-src/exec/Chainweb/RichList.hs index f76a4f2c..618c118c 100644 --- a/haskell-src/exec/Chainweb/RichList.hs +++ b/haskell-src/exec/Chainweb/RichList.hs @@ -4,7 +4,6 @@ module Chainweb.RichList ( richList ) where import Control.Applicative ((<|>)) -import Control.Exception import Control.Monad import Control.Lens import Data.Aeson (eitherDecodeStrict, Value(..)) @@ -29,14 +28,10 @@ import System.Logger.Types import Text.Printf (printf) import Text.Read -import Database.SQLite3 -import Database.SQLite3.Direct (Utf8(..)) +import Database.SQLite.Simple import ChainwebData.Env (ChainwebVersion(..)) -import Pact.Types.SQLite - - richList :: LogFunctionIO Text -> FilePath -> ChainwebVersion -> IO () richList logger fp (ChainwebVersion version) = do @@ -46,7 +41,7 @@ richList logger fp (ChainwebVersion version) = do $ "Chainweb-node top-level db directory does not exist: " <> fp logger Info "Aggregating richlist ..." - results <- fmap mconcat $ forM files $ \(cid, file) -> fmap (fmap (\(acct,txid, bal) -> (cid,acct,txid,bal))) $ withSQLiteConnection file richListQuery + results <- fmap mconcat $ forM files $ \(cid, file) -> fmap (fmap (\(acct,txid, bal) -> (cid,acct,txid,bal))) $ withConnection file richListQuery logger Info $ "Filtering top 100 richest accounts..." pruneRichList (either error id . parseResult <$> results) where @@ -107,18 +102,12 @@ pruneRichList = LBS.writeFile "richlist.csv" . M.fromListWith (+) . map (\(cid,acct,txid, balance) -> ((cid,acct,txid), balance)) --- WARNING: This function will throw errors if found. We don't "catch" errors in an Either type -withSQLiteConnection :: FilePath -> (Database -> IO a) -> IO a -withSQLiteConnection fp action = bracket (open (T.pack fp)) close action - -richListQuery :: Database -> IO [(Text, Int64, ByteString)] -richListQuery db = do - rows <- qry_ db richListQueryStmt [RText, RInt, RBlob] - return $ rows <&> \case - [SText (Utf8 account), SInt txid, SBlob jsonvalue] -> (toS account,txid, jsonvalue) - _ -> error "impossible?" -- TODO: Make this use throwError/throwM instead of error +richListQuery :: Connection -> IO [(Text, Int64, ByteString)] +richListQuery conn = do + rows <- query_ conn richListQueryStmt + forM rows $ \(account, txid, jsonvalue) -> return (toS @ByteString @Text account,txid, jsonvalue) -richListQueryStmt :: Utf8 +richListQueryStmt :: Query richListQueryStmt = "select rowkey as acct_id, txid, rowdata \ \ from [coin_coin-table] as coin\ From fb2b8b1960238dbf3fe930ad6e258fd36f9d6b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enis=20Bayramo=C4=9Flu?= Date: Wed, 1 May 2024 10:35:05 +0200 Subject: [PATCH 2/9] Fix beam-migrate constraints issues --- cabal.project | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cabal.project b/cabal.project index a3bb6840..8da77353 100644 --- a/cabal.project +++ b/cabal.project @@ -29,6 +29,9 @@ write-ghc-environment-files: never constraints: http2 <4.2 +allow-newer: beam-migrate:pqueue +allow-newer: beam-migrate:aeson +allow-newer: beam-core:aeson allow-newer: streaming-events:* allow-newer: postgresql-simple-migration:* allow-newer: beam-postgres:* From 178cb92f21eaa0f4568f820cc9f3e7c7abb0bdce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enis=20Bayramo=C4=9Flu?= Date: Wed, 1 May 2024 10:35:22 +0200 Subject: [PATCH 3/9] Remove pact-json dependency --- cabal.project | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cabal.project b/cabal.project index 8da77353..c3e3834c 100644 --- a/cabal.project +++ b/cabal.project @@ -10,12 +10,6 @@ source-repository-package tag: 1b2de025cfdc09698bfb1ec3807cd85405d6a339 --sha256: sha256-06jvD1kmkmthcRkyWhVLTbytwabghInxqXQD/Lm7kbA= -source-repository-package - type: git - location: https://github.com/kadena-io/pact-json - tag: e43073d0b8d89d9b300980913b842f4be339846d - --sha256: sha256-ZWbAId0JBaxDsYhwcYUyw04sjYstXyosSCenzOvUxsQ= - source-repository-package type: git location: https://github.com/kadena-io/thyme.git From 4abb4cc75be5342b1230b20b06fc7c95fa4929ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enis=20Bayramo=C4=9Flu?= Date: Wed, 1 May 2024 10:39:50 +0200 Subject: [PATCH 4/9] Slim down cabal.project further --- cabal.project | 9 --------- 1 file changed, 9 deletions(-) diff --git a/cabal.project b/cabal.project index c3e3834c..fe2c2d38 100644 --- a/cabal.project +++ b/cabal.project @@ -1,21 +1,12 @@ packages: haskell-src/chainweb-data.cabal with-compiler: ghc-9.2.8 -package aeson - flags: +cffi - source-repository-package type: git location: https://github.com/kadena-io/chainweb-api.git tag: 1b2de025cfdc09698bfb1ec3807cd85405d6a339 --sha256: sha256-06jvD1kmkmthcRkyWhVLTbytwabghInxqXQD/Lm7kbA= -source-repository-package - type: git - location: https://github.com/kadena-io/thyme.git - tag: 6ee9fcb026ebdb49b810802a981d166680d867c9 - --sha256: sha256-DqGIoPGBg8py044Xa7l/Y09K+cKGFwlxONHoZRJyzCU= - package vault documentation: false From f282bd6cb0a6aaae9acd0c00a0bf08352b4d93e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enis=20Bayramo=C4=9Flu?= Date: Wed, 1 May 2024 11:12:52 +0200 Subject: [PATCH 5/9] Install xz on Macos in CI --- .github/workflows/ci.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 44d09728..75469f05 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,6 +41,11 @@ jobs: dist-newstyle key: ${{ matrix.os }}-${{ matrix.ghc }}-4-cabal + # System dependencies + - name: Install liblzma + run: brew install xz # xz package contains liblzma + if: startsWith(matrix.os, 'macOS') + # Build - name: Update package database run: cabal update From 950628e1a81ba69f840346d46a130180b6989d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enis=20Bayramo=C4=9Flu?= Date: Wed, 1 May 2024 11:22:38 +0200 Subject: [PATCH 6/9] Remove non-Nix macOS builds from CI --- .github/workflows/ci.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 75469f05..fe1baa3f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,7 +11,7 @@ jobs: matrix: ghc: ['9.2.8'] cabal: ['3.10'] - os: ['ubuntu-20.04', 'ubuntu-22.04', 'macOS-latest'] + os: ['ubuntu-20.04', 'ubuntu-22.04'] steps: - name: 'GitHub actions env workaround' @@ -41,11 +41,6 @@ jobs: dist-newstyle key: ${{ matrix.os }}-${{ matrix.ghc }}-4-cabal - # System dependencies - - name: Install liblzma - run: brew install xz # xz package contains liblzma - if: startsWith(matrix.os, 'macOS') - # Build - name: Update package database run: cabal update From cae90704e9734c3416fe7fd1b07b48307ee46a32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enis=20Bayramo=C4=9Flu?= Date: Wed, 1 May 2024 11:50:24 +0200 Subject: [PATCH 7/9] Revert "Remove non-Nix macOS builds from CI" This reverts commit 950628e1a81ba69f840346d46a130180b6989d3a. --- .github/workflows/ci.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fe1baa3f..75469f05 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,7 +11,7 @@ jobs: matrix: ghc: ['9.2.8'] cabal: ['3.10'] - os: ['ubuntu-20.04', 'ubuntu-22.04'] + os: ['ubuntu-20.04', 'ubuntu-22.04', 'macOS-latest'] steps: - name: 'GitHub actions env workaround' @@ -41,6 +41,11 @@ jobs: dist-newstyle key: ${{ matrix.os }}-${{ matrix.ghc }}-4-cabal + # System dependencies + - name: Install liblzma + run: brew install xz # xz package contains liblzma + if: startsWith(matrix.os, 'macOS') + # Build - name: Update package database run: cabal update From bfad14e4db7eb0b201b9a3d515b8373873b53608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enis=20Bayramo=C4=9Flu?= Date: Wed, 1 May 2024 11:51:44 +0200 Subject: [PATCH 8/9] Install postgresql on macOS CI --- .github/workflows/ci.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 75469f05..4ce5e66a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -46,6 +46,10 @@ jobs: run: brew install xz # xz package contains liblzma if: startsWith(matrix.os, 'macOS') + - name: Install postgresql + run: brew install postgresql # needed by libpq + if: startsWith(matrix.os, 'macOS') + # Build - name: Update package database run: cabal update From aed85145fc1d7c7aa9a4bbd2fc489f82732a92cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enis=20Bayramo=C4=9Flu?= Date: Wed, 1 May 2024 12:17:21 +0200 Subject: [PATCH 9/9] Add index-state to cabal.project As a measure to make non-Nix builds more stable since we're removing the freeze file. --- cabal.project | 1 + 1 file changed, 1 insertion(+) diff --git a/cabal.project b/cabal.project index fe2c2d38..0edbbe76 100644 --- a/cabal.project +++ b/cabal.project @@ -1,5 +1,6 @@ packages: haskell-src/chainweb-data.cabal with-compiler: ghc-9.2.8 +index-state: 2024-02-01T00:00:00Z source-repository-package type: git