From a4827f5d691167c822518201fec3d05b9e3d37c7 Mon Sep 17 00:00:00 2001 From: iphydf Date: Sat, 14 Oct 2023 21:56:00 +0000 Subject: [PATCH] chore: Update to new third_party method for haskell deps. --- .cirrus.yml | 2 +- BUILD.bazel | 27 +++++++++++++-------------- test/Network/Tox/Types/EventsSpec.hs | 3 +-- tools/BUILD.bazel | 19 +++++++++---------- 4 files changed, 24 insertions(+), 27 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 400b1ca..942feb6 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -8,5 +8,5 @@ bazel-opt_task: - /src/workspace/tools/inject-repo hs-toxcore-c test_all_script: - cd /src/workspace && bazel test -k - --remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST + --config=ci //hs-toxcore-c/... diff --git a/BUILD.bazel b/BUILD.bazel index b8fa08d..0118d07 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,4 +1,3 @@ -load("@ai_formation_hazel//tools:mangling.bzl", "hazel_library") load("@rules_haskell//haskell:defs.bzl", "haskell_library") load("//third_party/haskell/hspec-discover:build_defs.bzl", "hspec_test") load("//tools/project:build_defs.bzl", "project") @@ -14,11 +13,11 @@ haskell_library( deps = [ "//c-toxcore", "//hs-msgpack-binary", - hazel_library("QuickCheck"), - hazel_library("base"), - hazel_library("bytestring"), - hazel_library("generic-arbitrary"), - hazel_library("quickcheck-instances"), + "//third_party/haskell:QuickCheck", + "//third_party/haskell:base", + "//third_party/haskell:bytestring", + "//third_party/haskell:generic-arbitrary", + "//third_party/haskell:quickcheck-instances", ], ) @@ -28,13 +27,13 @@ hspec_test( deps = [ ":hs-toxcore-c", "//hs-msgpack-binary", - hazel_library("QuickCheck"), - hazel_library("base"), - hazel_library("base16-bytestring"), - hazel_library("bytestring"), - hazel_library("cryptohash"), - hazel_library("hspec"), - hazel_library("saltine"), - hazel_library("vector"), + "//third_party/haskell:QuickCheck", + "//third_party/haskell:base", + "//third_party/haskell:base16-bytestring", + "//third_party/haskell:bytestring", + "//third_party/haskell:cryptohash", + "//third_party/haskell:hspec", + "//third_party/haskell:saltine", + "//third_party/haskell:vector", ], ) diff --git a/test/Network/Tox/Types/EventsSpec.hs b/test/Network/Tox/Types/EventsSpec.hs index 0e31464..2e64b20 100644 --- a/test/Network/Tox/Types/EventsSpec.hs +++ b/test/Network/Tox/Types/EventsSpec.hs @@ -48,7 +48,6 @@ toxIterate countdown toxes = do spec :: Spec spec = do - return () {- TODO(iphydf): re-enable once the c-toxcore system PR is in. describe "event serialisation format" $ do it "is linear encoding" $ @@ -62,6 +61,7 @@ spec = do property $ \(sort -> events) -> do events' <- C.toxEventsToPtr events >>= C.toxEventsFromPtr sort <$> events' `shouldBe` Right events +-} describe "toxcore" $ it "can bootstrap" $ do @@ -72,4 +72,3 @@ spec = do must $ C.toxBootstrap tox2 "127.0.0.1" bootstrapPort bootstrapKey toxIterate 100 [tox1, tox2] --} diff --git a/tools/BUILD.bazel b/tools/BUILD.bazel index 855a023..9174b13 100644 --- a/tools/BUILD.bazel +++ b/tools/BUILD.bazel @@ -1,4 +1,3 @@ -load("@ai_formation_hazel//tools:mangling.bzl", "hazel_library") load("@rules_haskell//haskell:defs.bzl", "haskell_binary") haskell_binary( @@ -7,10 +6,10 @@ haskell_binary( deps = [ "//hs-schema", "//hs-toxcore-c", - hazel_library("base"), - hazel_library("bytestring"), - hazel_library("data-fix"), - hazel_library("groom"), + "//third_party/haskell:base", + "//third_party/haskell:bytestring", + "//third_party/haskell:data-fix", + "//third_party/haskell:groom", ], ) @@ -19,10 +18,10 @@ haskell_binary( srcs = ["groupbot.hs"], deps = [ "//hs-toxcore-c", - hazel_library("base"), - hazel_library("base16-bytestring"), - hazel_library("bytestring"), - hazel_library("directory"), - hazel_library("text"), + "//third_party/haskell:base", + "//third_party/haskell:base16-bytestring", + "//third_party/haskell:bytestring", + "//third_party/haskell:directory", + "//third_party/haskell:text", ], )