mirror of
https://github.com/haskell/ghcide.git
synced 2024-12-17 15:11:41 +03:00
35e2d881dd
Previously we had two layers of indirection: In the compiler we emitted Event, we then translated this to ClientNotification which was then translated to FromServerMessage. Apart from being confusing and convoluted this also resulted in us doing the conversion to generic LSP types too late so we had scenario specific code in places where it shouldn’t be. This PR removes the indirection and just uses FromServerMessage directly.
90 lines
1.9 KiB
Python
90 lines
1.9 KiB
Python
# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
load("//bazel_tools:haskell.bzl", "da_haskell_binary", "da_haskell_library")
|
|
load("@os_info//:os_info.bzl", "is_windows")
|
|
|
|
depends = [
|
|
"aeson",
|
|
"base",
|
|
"binary",
|
|
"bytestring",
|
|
"containers",
|
|
"deepseq",
|
|
"directory",
|
|
"either",
|
|
"extra",
|
|
"filepath",
|
|
"hashable",
|
|
"haskell-lsp",
|
|
"haskell-lsp-types",
|
|
"mtl",
|
|
"network-uri",
|
|
"pretty",
|
|
"rope-utf16-splay",
|
|
"safe-exceptions",
|
|
"sorted-list",
|
|
"shake",
|
|
"stm",
|
|
"syb",
|
|
"text",
|
|
"time",
|
|
"transformers",
|
|
"uniplate",
|
|
"unordered-containers",
|
|
"uri-encode",
|
|
]
|
|
|
|
da_haskell_library(
|
|
name = "haskell-ide-core",
|
|
srcs = glob(["src/**/*.hs"]),
|
|
hazel_deps = depends + [
|
|
"ghc-lib",
|
|
"ghc-lib-parser",
|
|
],
|
|
src_strip_prefix = "src",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//libs-haskell/prettyprinter-syntax",
|
|
],
|
|
)
|
|
|
|
da_haskell_library(
|
|
name = "haskell-ide-core-public",
|
|
srcs = glob(["src/**/*.hs"]),
|
|
compiler_flags = ["-DGHC_STABLE"],
|
|
hazel_deps = depends + [
|
|
"ghc",
|
|
"ghc-boot",
|
|
"ghc-boot-th",
|
|
],
|
|
src_strip_prefix = "src",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//libs-haskell/prettyprinter-syntax",
|
|
],
|
|
)
|
|
|
|
da_haskell_binary(
|
|
name = "haskell-ide-core-demo",
|
|
srcs = glob(["test/**/*.hs"]),
|
|
hazel_deps = [
|
|
"base",
|
|
"containers",
|
|
"extra",
|
|
"filepath",
|
|
"ghc-paths",
|
|
"ghc",
|
|
"haskell-lsp",
|
|
"shake",
|
|
"text",
|
|
],
|
|
main_function = "Demo.main",
|
|
src_strip_prefix = "test",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"haskell-ide-core-public",
|
|
"//libs-haskell/prettyprinter-syntax",
|
|
],
|
|
) if not is_windows else None # Disable on Windows until ghc-paths is fixed upstream
|