diff --git a/cabal.project b/cabal.project index 0d96ea86c6..390d1f7cfb 100644 --- a/cabal.project +++ b/cabal.project @@ -12,7 +12,7 @@ constraints: zip +disable-bzip2 +disable-zstd source-repository-package type: git location: https://github.com/simplex-chat/simplexmq.git - tag: c34ab973ab17e91a086e5b2d2899abe578d0daeb + tag: 8b94264623eb8f32793a3b4129cb12770f54ef3a source-repository-package type: git diff --git a/package.yaml b/package.yaml index e9f2bc28c7..0b4c608f92 100644 --- a/package.yaml +++ b/package.yaml @@ -150,6 +150,7 @@ tests: ghc-options: # - -haddock + - -O2 - -Wall - -Wcompat - -Werror=incomplete-patterns @@ -157,3 +158,6 @@ ghc-options: - -Wincomplete-record-updates - -Wincomplete-uni-patterns - -Wunused-type-patterns + +default-extensions: + - StrictData diff --git a/scripts/nix/sha256map.nix b/scripts/nix/sha256map.nix index 694b42b667..9df2d8773f 100644 --- a/scripts/nix/sha256map.nix +++ b/scripts/nix/sha256map.nix @@ -1,5 +1,5 @@ { - "https://github.com/simplex-chat/simplexmq.git"."c34ab973ab17e91a086e5b2d2899abe578d0daeb" = "05c68ij9m5nxakk1cfw4rmdwvnrn5hhkm464z8h3g20lazram6hj"; + "https://github.com/simplex-chat/simplexmq.git"."8b94264623eb8f32793a3b4129cb12770f54ef3a" = "0n4wwpkj9dps7ansvlrdf4kiwjczij7y79i4cnr3gr0lmml8bpbs"; "https://github.com/simplex-chat/hs-socks.git"."a30cc7a79a08d8108316094f8f2f82a0c5e1ac51" = "0yasvnr7g91k76mjkamvzab2kvlb1g5pspjyjn2fr6v83swjhj38"; "https://github.com/simplex-chat/direct-sqlcipher.git"."f814ee68b16a9447fbb467ccc8f29bdd3546bfd9" = "1ql13f4kfwkbaq7nygkxgw84213i0zm7c1a8hwvramayxl38dq5d"; "https://github.com/simplex-chat/sqlcipher-simple.git"."a46bd361a19376c5211f1058908fc0ae6bf42446" = "1z0r78d8f0812kxbgsm735qf6xx8lvaz27k1a0b4a2m0sshpd5gl"; diff --git a/simplex-chat.cabal b/simplex-chat.cabal index 27aab2be9f..a61b4b4a8d 100644 --- a/simplex-chat.cabal +++ b/simplex-chat.cabal @@ -181,7 +181,9 @@ library Paths_simplex_chat hs-source-dirs: src - ghc-options: -Wall -Wcompat -Werror=incomplete-patterns -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns -Wunused-type-patterns + default-extensions: + StrictData + ghc-options: -O2 -Wall -Wcompat -Werror=incomplete-patterns -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns -Wunused-type-patterns build-depends: aeson ==2.2.* , ansi-terminal >=0.10 && <0.12 @@ -240,7 +242,9 @@ executable simplex-bot Paths_simplex_chat hs-source-dirs: apps/simplex-bot - ghc-options: -Wall -Wcompat -Werror=incomplete-patterns -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns -Wunused-type-patterns -threaded + default-extensions: + StrictData + ghc-options: -O2 -Wall -Wcompat -Werror=incomplete-patterns -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns -Wunused-type-patterns -threaded build-depends: aeson ==2.2.* , ansi-terminal >=0.10 && <0.12 @@ -300,7 +304,9 @@ executable simplex-bot-advanced Paths_simplex_chat hs-source-dirs: apps/simplex-bot-advanced - ghc-options: -Wall -Wcompat -Werror=incomplete-patterns -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns -Wunused-type-patterns -threaded + default-extensions: + StrictData + ghc-options: -O2 -Wall -Wcompat -Werror=incomplete-patterns -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns -Wunused-type-patterns -threaded build-depends: aeson ==2.2.* , ansi-terminal >=0.10 && <0.12 @@ -359,11 +365,13 @@ executable simplex-broadcast-bot hs-source-dirs: apps/simplex-broadcast-bot apps/simplex-broadcast-bot/src + default-extensions: + StrictData other-modules: Broadcast.Bot Broadcast.Options Paths_simplex_chat - ghc-options: -Wall -Wcompat -Werror=incomplete-patterns -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns -Wunused-type-patterns -threaded + ghc-options: -O2 -Wall -Wcompat -Werror=incomplete-patterns -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns -Wunused-type-patterns -threaded build-depends: aeson ==2.2.* , ansi-terminal >=0.10 && <0.12 @@ -424,7 +432,9 @@ executable simplex-chat Paths_simplex_chat hs-source-dirs: apps/simplex-chat - ghc-options: -Wall -Wcompat -Werror=incomplete-patterns -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns -Wunused-type-patterns -threaded + default-extensions: + StrictData + ghc-options: -O2 -Wall -Wcompat -Werror=incomplete-patterns -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns -Wunused-type-patterns -threaded build-depends: aeson ==2.2.* , ansi-terminal >=0.10 && <0.12 @@ -484,6 +494,8 @@ executable simplex-directory-service hs-source-dirs: apps/simplex-directory-service apps/simplex-directory-service/src + default-extensions: + StrictData other-modules: Directory.Events Directory.Options @@ -491,7 +503,7 @@ executable simplex-directory-service Directory.Service Directory.Store Paths_simplex_chat - ghc-options: -Wall -Wcompat -Werror=incomplete-patterns -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns -Wunused-type-patterns -threaded + ghc-options: -O2 -Wall -Wcompat -Werror=incomplete-patterns -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns -Wunused-type-patterns -threaded build-depends: aeson ==2.2.* , ansi-terminal >=0.10 && <0.12 @@ -582,7 +594,9 @@ test-suite simplex-chat-test tests apps/simplex-broadcast-bot/src apps/simplex-directory-service/src - ghc-options: -Wall -Wcompat -Werror=incomplete-patterns -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns -Wunused-type-patterns -threaded + default-extensions: + StrictData + ghc-options: -O2 -Wall -Wcompat -Werror=incomplete-patterns -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns -Wunused-type-patterns -threaded build-depends: QuickCheck ==2.14.* , aeson ==2.2.* diff --git a/src/Simplex/Chat.hs b/src/Simplex/Chat.hs index 2020574bbc..104300ae7a 100644 --- a/src/Simplex/Chat.hs +++ b/src/Simplex/Chat.hs @@ -132,7 +132,7 @@ defaultChatConfig = ChatConfig { agentConfig = defaultAgentConfig - { tcpPort = undefined, -- agent does not listen to TCP + { tcpPort = Nothing, -- agent does not listen to TCP tbqSize = 1024 }, chatVRange = supportedChatVRange, diff --git a/tests/ChatClient.hs b/tests/ChatClient.hs index a9e6b9df7b..a827236a15 100644 --- a/tests/ChatClient.hs +++ b/tests/ChatClient.hs @@ -87,7 +87,7 @@ testOpts = testCoreOpts :: CoreChatOpts testCoreOpts = CoreChatOpts - { dbFilePrefix = undefined, + { dbFilePrefix = "./simplex_v1", dbKey = "", -- dbKey = "this is a pass-phrase to encrypt the database", smpServers = ["smp://LcJUMfVhwD8yxjAiSaDzzGF3-kLG4Uh0Fl_ZIjrRwjI=:server_password@localhost:7001"],