Skip to content

Commit

Permalink
chore: Update to new third_party method for haskell deps.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Nov 7, 2023
1 parent 236dc56 commit a869a3c
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ bazel-opt_task:
- /src/workspace/tools/inject-repo hs-github-tools
test_all_script:
- cd /src/workspace && bazel test -k
--remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
--config=ci
//hs-github-tools/...
4 changes: 2 additions & 2 deletions .github/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM toxchat/toktok-stack:haskell AS build

RUN ["rm", "-rf", "/work/hs-github-tools"]
COPY --chown=builder:users . /work/hs-github-tools/
RUN ["stack", "install", "github-tools", "--fast", "--ghc-options", "-j8"]
COPY --chown=builder:users . /work/hs-github-tools
RUN ["stack", "install", "github-tools"]

FROM scratch
COPY --from=build /home/builder/.local/ /
73 changes: 36 additions & 37 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -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")
Expand All @@ -17,11 +16,11 @@ haskell_library(
src_strip_prefix = "src",
visibility = ["//visibility:public"],
deps = [
hazel_library("QuickCheck"),
hazel_library("aeson"),
hazel_library("base"),
hazel_library("quickcheck-text"),
hazel_library("text"),
"//third_party/haskell:QuickCheck",
"//third_party/haskell:aeson",
"//third_party/haskell:base",
"//third_party/haskell:quickcheck-text",
"//third_party/haskell:text",
],
)

Expand All @@ -36,10 +35,10 @@ haskell_library(
visibility = ["//visibility:public"],
deps = [
":github-base",
hazel_library("QuickCheck"),
hazel_library("aeson"),
hazel_library("base"),
hazel_library("text"),
"//third_party/haskell:QuickCheck",
"//third_party/haskell:aeson",
"//third_party/haskell:base",
"//third_party/haskell:text",
],
)

Expand All @@ -60,29 +59,29 @@ haskell_library(
deps = [
":github-base",
":github-events",
hazel_library("QuickCheck"),
hazel_library("aeson"),
hazel_library("base"),
hazel_library("bytestring"),
hazel_library("containers"),
hazel_library("cryptohash"),
hazel_library("directory"),
hazel_library("exceptions"),
hazel_library("github"),
hazel_library("html"),
hazel_library("http-client"),
hazel_library("http-client-tls"),
hazel_library("monad-parallel"),
hazel_library("process"),
hazel_library("quickcheck-text"),
hazel_library("split"),
hazel_library("tabular"),
hazel_library("text"),
hazel_library("time"),
hazel_library("unordered-containers"),
hazel_library("uuid"),
hazel_library("vector"),
hazel_library("unix"),
"//third_party/haskell:QuickCheck",
"//third_party/haskell:aeson",
"//third_party/haskell:base",
"//third_party/haskell:bytestring",
"//third_party/haskell:containers",
"//third_party/haskell:cryptohash",
"//third_party/haskell:directory",
"//third_party/haskell:exceptions",
"//third_party/haskell:github",
"//third_party/haskell:html",
"//third_party/haskell:http-client",
"//third_party/haskell:http-client-tls",
"//third_party/haskell:monad-parallel",
"//third_party/haskell:process",
"//third_party/haskell:quickcheck-text",
"//third_party/haskell:split",
"//third_party/haskell:tabular",
"//third_party/haskell:text",
"//third_party/haskell:time",
"//third_party/haskell:unix",
"//third_party/haskell:unordered-containers",
"//third_party/haskell:uuid",
"//third_party/haskell:vector",
],
)

Expand All @@ -102,9 +101,9 @@ hspec_test(
":github-base",
":github-events",
":hs-github-tools",
hazel_library("QuickCheck"),
hazel_library("aeson"),
hazel_library("base"),
hazel_library("hspec"),
"//third_party/haskell:QuickCheck",
"//third_party/haskell:aeson",
"//third_party/haskell:base",
"//third_party/haskell:hspec",
],
)
9 changes: 4 additions & 5 deletions tools/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("@ai_formation_hazel//tools:mangling.bzl", "hazel_library")
load("@rules_haskell//haskell:defs.bzl", "haskell_binary")

[haskell_binary(
Expand All @@ -7,9 +6,9 @@ load("@rules_haskell//haskell:defs.bzl", "haskell_binary")
visibility = ["//visibility:public"],
deps = [
"//hs-github-tools",
hazel_library("base"),
hazel_library("bytestring"),
hazel_library("github"),
hazel_library("text"),
"//third_party/haskell:base",
"//third_party/haskell:bytestring",
"//third_party/haskell:github",
"//third_party/haskell:text",
],
) for file in glob(["*.hs"])]
2 changes: 1 addition & 1 deletion tools/git-submit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eu

Expand Down
2 changes: 1 addition & 1 deletion tools/git-sync
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

REMOTE=""
BRANCH="${1-master}"
Expand Down
47 changes: 23 additions & 24 deletions web/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("@ai_formation_hazel//tools:mangling.bzl", "hazel_library")
load("@rules_haskell//haskell:defs.bzl", "haskell_binary")

package(features = ["-layering_check"])
Expand All @@ -9,28 +8,28 @@ haskell_binary(
visibility = ["//visibility:public"],
deps = [
"//hs-github-tools",
hazel_library("Diff"),
hazel_library("aeson-pretty"),
hazel_library("base"),
hazel_library("bytestring"),
hazel_library("case-insensitive"),
hazel_library("containers"),
hazel_library("expiring-cache-map"),
hazel_library("github"),
hazel_library("http-media"),
hazel_library("http-types"),
hazel_library("pretty"),
hazel_library("servant"),
hazel_library("servant-server"),
hazel_library("suspend"),
hazel_library("text"),
hazel_library("time"),
hazel_library("timers"),
hazel_library("unordered-containers"),
hazel_library("uuid"),
hazel_library("wai"),
hazel_library("wai-cors"),
hazel_library("wai-extra"),
hazel_library("warp"),
"//third_party/haskell:Diff",
"//third_party/haskell:aeson-pretty",
"//third_party/haskell:base",
"//third_party/haskell:bytestring",
"//third_party/haskell:case-insensitive",
"//third_party/haskell:containers",
"//third_party/haskell:expiring-cache-map",
"//third_party/haskell:github",
"//third_party/haskell:http-media",
"//third_party/haskell:http-types",
"//third_party/haskell:pretty",
"//third_party/haskell:servant",
"//third_party/haskell:servant-server",
"//third_party/haskell:suspend",
"//third_party/haskell:text",
"//third_party/haskell:time",
"//third_party/haskell:timers",
"//third_party/haskell:unordered-containers",
"//third_party/haskell:uuid",
"//third_party/haskell:wai",
"//third_party/haskell:wai-cors",
"//third_party/haskell:wai-extra",
"//third_party/haskell:warp",
],
)

0 comments on commit a869a3c

Please sign in to comment.