Skip to content

Commit

Permalink
Update ghcide executable definition
Browse files Browse the repository at this point in the history
  • Loading branch information
aherrmann committed Jun 5, 2020
1 parent e4aef59 commit 890fc95
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 74 deletions.
2 changes: 1 addition & 1 deletion .ghcide
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
build_ghcide() {
bazel build @ghcide//:ghcide \
bazel build @ghcide-exe//ghcide \
--experimental_show_artifacts \
2>&1 \
| awk '
Expand Down
75 changes: 3 additions & 72 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -108,81 +108,12 @@ stack_snapshot(
)

stack_snapshot(
name = "stackage_ghcide",
name = "ghcide",
extra_deps = {"zlib": ["@zlib.dev//:zlib" if is_nix_shell else "@zlib.hs//:zlib"]},
haddock = False,
local_snapshot = "//:ghcide-stack-snapshot.yaml",
packages = [
"aeson",
"base",
"base16-bytestring",
"binary",
"bytestring",
"containers",
"cryptohash-sha1",
"data-default",
"deepseq",
"directory",
"extra",
"filepath",
"ghc",
"ghc-check",
"ghc-paths",
"ghcide",
"gitrev",
"hashable",
"haskell-lsp",
"haskell-lsp-types",
"hie-bios",
"hslogger",
"optparse-applicative",
"shake",
"text",
"unordered-containers",
],
)

http_archive(
name = "ghcide",
build_file_content = """
load("@rules_haskell//haskell:cabal.bzl", "haskell_cabal_binary")
haskell_cabal_binary(
name = "ghcide",
srcs = glob(["**"]),
deps = [
"@stackage_ghcide//:hslogger",
"@stackage_ghcide//:aeson",
"@stackage_ghcide//:base",
"@stackage_ghcide//:binary",
"@stackage_ghcide//:base16-bytestring",
"@stackage_ghcide//:bytestring",
"@stackage_ghcide//:containers",
"@stackage_ghcide//:cryptohash-sha1",
"@stackage_ghcide//:data-default",
"@stackage_ghcide//:deepseq",
"@stackage_ghcide//:directory",
"@stackage_ghcide//:extra",
"@stackage_ghcide//:filepath",
"@stackage_ghcide//:ghc-check",
"@stackage_ghcide//:ghc-paths",
"@stackage_ghcide//:ghc",
"@stackage_ghcide//:gitrev",
"@stackage_ghcide//:hashable",
"@stackage_ghcide//:haskell-lsp",
"@stackage_ghcide//:haskell-lsp-types",
"@stackage_ghcide//:hie-bios",
"@stackage_ghcide//:ghcide",
"@stackage_ghcide//:optparse-applicative",
"@stackage_ghcide//:shake",
"@stackage_ghcide//:text",
"@stackage_ghcide//:unordered-containers",
],
visibility = ["//visibility:public"],
)
""",
sha256 = "fa1f0cfb0357e7bfa6c86076493f038e0ea5fcd75c470473f2ede7e32566cd9a",
strip_prefix = "ghcide-0c9a0961abbeef851b4117e6408f15a6d46eb1f1",
urls = ["https://github.com/digital-asset/ghcide/archive/0c9a0961abbeef851b4117e6408f15a6d46eb1f1.tar.gz"],
packages = ["ghcide"],
components = {"ghcide": ["lib", "exe"]},
)

load(
Expand Down
2 changes: 1 addition & 1 deletion tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ haskell_repl(

sh_test(
name = "ghcide-smoke-test",
srcs = ["@ghcide"],
srcs = ["@ghcide-exe//ghcide"],
args = ["--version"],
tags = [
# Building ghcide fails in profiling mode with:
Expand Down

0 comments on commit 890fc95

Please sign in to comment.