Skip to content

Commit

Permalink
Remove workaround for Cabal splitFileName and minusFileName issue
Browse files Browse the repository at this point in the history
  • Loading branch information
avdv committed May 19, 2023
1 parent f81b9ab commit 78ddc14
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 81 deletions.
152 changes: 76 additions & 76 deletions non_module_deps_2.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -92,29 +92,29 @@ haskell_library(
packages = [
"ghcide",
],
setup_deps = {
"bifunctors": ["@ghcide//:Cabal"],
"call-stack": ["@ghcide//:Cabal"],
"ghcide": ["@ghcide//:Cabal"],
"hie-bios": ["@ghcide//:Cabal"],
"hls-graph": ["@ghcide//:Cabal"],
"hspec-discover": ["@ghcide//:Cabal"],
"implicit-hie": ["@ghcide//:Cabal"],
"implicit-hie-cradle": ["@ghcide//:Cabal"],
"invariant": ["@ghcide//:Cabal"],
"js-dgtable": ["@ghcide//:Cabal"],
"js-flot": ["@ghcide//:Cabal"],
"js-jquery": ["@ghcide//:Cabal"],
"libyaml": ["@ghcide//:Cabal"],
"mono-traversable": ["@ghcide//:Cabal"],
"regex-base": ["@ghcide//:Cabal"],
"regex-tdfa": ["@ghcide//:Cabal"],
"transformers-compat": ["@ghcide//:Cabal"],
"typed-process": ["@ghcide//:Cabal"],
"unliftio": ["@ghcide//:Cabal"],
"unliftio-core": ["@ghcide//:Cabal"],
"yaml": ["@ghcide//:Cabal"],
},
# setup_deps = {
# "bifunctors": ["@ghcide//:Cabal"],
# "call-stack": ["@ghcide//:Cabal"],
# "ghcide": ["@ghcide//:Cabal"],
# "hie-bios": ["@ghcide//:Cabal"],
# "hls-graph": ["@ghcide//:Cabal"],
# "hspec-discover": ["@ghcide//:Cabal"],
# "implicit-hie": ["@ghcide//:Cabal"],
# "implicit-hie-cradle": ["@ghcide//:Cabal"],
# "invariant": ["@ghcide//:Cabal"],
# "js-dgtable": ["@ghcide//:Cabal"],
# "js-flot": ["@ghcide//:Cabal"],
# "js-jquery": ["@ghcide//:Cabal"],
# "libyaml": ["@ghcide//:Cabal"],
# "mono-traversable": ["@ghcide//:Cabal"],
# "regex-base": ["@ghcide//:Cabal"],
# "regex-tdfa": ["@ghcide//:Cabal"],
# "transformers-compat": ["@ghcide//:Cabal"],
# "typed-process": ["@ghcide//:Cabal"],
# "unliftio": ["@ghcide//:Cabal"],
# "unliftio-core": ["@ghcide//:Cabal"],
# "yaml": ["@ghcide//:Cabal"],
# },
stack_snapshot_json = "//:ghcide-snapshot.json" if not is_windows else None,
vendored_packages = {
"data-default-instances-containers": "@data-default-ic//:lib",
Expand All @@ -128,17 +128,17 @@ haskell_library(
build_file_content = """
load("@rules_haskell//haskell:cabal.bzl", "haskell_cabal_library", "haskell_cabal_binary")
haskell_cabal_library(
name = "alex-lib",
setup_deps = ["@Cabal//:Cabal"],
srcs = glob(["**"]),
version = "3.2.7.1",
visibility = ["//visibility:public"],
)
# haskell_cabal_library(
# name = "alex-lib",
# setup_deps = ["@Cabal//:Cabal"],
# srcs = glob(["**"]),
# version = "3.2.7.1",
# visibility = ["//visibility:public"],
# )
haskell_cabal_binary(
name = "alex",
setup_deps = ["@Cabal//:Cabal"],
#setup_deps = ["@Cabal//:Cabal"],
srcs = glob(["**"]),
verbose = False,
visibility = ["//visibility:public"],
Expand All @@ -149,24 +149,24 @@ haskell_cabal_binary(
urls = ["http://hackage.haskell.org/package/alex-3.2.7.1/alex-3.2.7.1.tar.gz"],
)

# TODO: Remove when tests are run with a ghc version containing Cabal >= 3.10
# See https://github.com/tweag/rules_haskell/issues/1871
http_archive(
name = "Cabal",
build_file_content = """
load("@rules_haskell//haskell:cabal.bzl", "haskell_cabal_library")
haskell_cabal_library(
name = "Cabal",
srcs = glob(["Cabal/**"]),
verbose = False,
version = "3.6.3.0",
visibility = ["//visibility:public"],
)
""",
sha256 = "f69b46cb897edab3aa8d5a4bd7b8690b76cd6f0b320521afd01ddd20601d1356",
strip_prefix = "cabal-gg-8220-with-3630",
urls = ["https://github.com/tweag/cabal/archive/refs/heads/gg/8220-with-3630.zip"],
)
# # TODO: Remove when tests are run with a ghc version containing Cabal >= 3.10
# # See https://github.com/tweag/rules_haskell/issues/1871
# http_archive(
# name = "Cabal",
# build_file_content = """
# load("@rules_haskell//haskell:cabal.bzl", "haskell_cabal_library")
# haskell_cabal_library(
# name = "Cabal",
# srcs = glob(["Cabal/**"]),
# verbose = False,
# version = "3.6.3.0",
# visibility = ["//visibility:public"],
# )
# """,
# sha256 = "f69b46cb897edab3aa8d5a4bd7b8690b76cd6f0b320521afd01ddd20601d1356",
# strip_prefix = "cabal-gg-8220-with-3630",
# urls = ["https://github.com/tweag/cabal/archive/refs/heads/gg/8220-with-3630.zip"],
# )

stack_snapshot(
name = "stackage-pinning-test",
Expand All @@ -187,13 +187,13 @@ haskell_cabal_library(
],
setup_deps = {
# See https://github.com/tweag/rules_haskell/issues/1871
"HUnit": ["@Cabal//:Cabal"],
"call-stack": ["@Cabal//:Cabal"],
"hspec": ["@Cabal//:Cabal"],
"hspec-core": ["@Cabal//:Cabal"],
"hspec-discover": ["@Cabal//:Cabal"],
"hspec-expectations": ["@Cabal//:Cabal"],
"quickcheck-io": ["@Cabal//:Cabal"],
# "HUnit": ["@Cabal//:Cabal"],
# "call-stack": ["@Cabal//:Cabal"],
# "hspec": ["@Cabal//:Cabal"],
# "hspec-core": ["@Cabal//:Cabal"],
# "hspec-discover": ["@Cabal//:Cabal"],
# "hspec-expectations": ["@Cabal//:Cabal"],
# "quickcheck-io": ["@Cabal//:Cabal"],
},
stack_snapshot_json = "//:stackage-pinning-test_snapshot.json" if not is_windows else None,
)
Expand Down Expand Up @@ -264,26 +264,26 @@ haskell_cabal_library(
],
setup_deps = {
"polysemy": ["cabal-doctest"],
# See https://github.com/tweag/rules_haskell/issues/1871
"HUnit": ["@Cabal//:Cabal"],
"bifunctors": ["@Cabal//:Cabal"],
"c2hs": ["@Cabal//:Cabal"],
"call-stack": ["@Cabal//:Cabal"],
"doctest": ["@Cabal//:Cabal"],
"generic-deriving": ["@Cabal//:Cabal"],
"happy": ["@Cabal//:Cabal"],
"hspec": ["@Cabal//:Cabal"],
"hspec-core": ["@Cabal//:Cabal"],
"hspec-discover": ["@Cabal//:Cabal"],
"hspec-expectations": ["@Cabal//:Cabal"],
"mono-traversable": ["@Cabal//:Cabal"],
"proto-lens-protoc": ["@Cabal//:Cabal"],
"proto-lens-runtime": ["@Cabal//:Cabal"],
"quickcheck-io": ["@Cabal//:Cabal"],
"transformers-compat": ["@Cabal//:Cabal"],
"type-errors": ["@Cabal//:Cabal"],
"typed-process": ["@Cabal//:Cabal"],
"unliftio-core": ["@Cabal//:Cabal"],
# # See https://github.com/tweag/rules_haskell/issues/1871
# "HUnit": ["@Cabal//:Cabal"],
# "bifunctors": ["@Cabal//:Cabal"],
# "c2hs": ["@Cabal//:Cabal"],
# "call-stack": ["@Cabal//:Cabal"],
# "doctest": ["@Cabal//:Cabal"],
# "generic-deriving": ["@Cabal//:Cabal"],
# "happy": ["@Cabal//:Cabal"],
# "hspec": ["@Cabal//:Cabal"],
# "hspec-core": ["@Cabal//:Cabal"],
# "hspec-discover": ["@Cabal//:Cabal"],
# "hspec-expectations": ["@Cabal//:Cabal"],
# "mono-traversable": ["@Cabal//:Cabal"],
# "proto-lens-protoc": ["@Cabal//:Cabal"],
# "proto-lens-runtime": ["@Cabal//:Cabal"],
# "quickcheck-io": ["@Cabal//:Cabal"],
# "transformers-compat": ["@Cabal//:Cabal"],
# "type-errors": ["@Cabal//:Cabal"],
# "typed-process": ["@Cabal//:Cabal"],
# "unliftio-core": ["@Cabal//:Cabal"],
},
stack_snapshot_json = "//:stackage_snapshot.json" if not is_windows else None,
tools = [
Expand Down
10 changes: 5 additions & 5 deletions tools/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ def rules_haskell_worker_dependencies(**stack_kwargs):
"text",
"vector",
],
setup_deps = {
"bifunctors": ["@Cabal//:Cabal"],
"proto-lens-runtime": ["@Cabal//:Cabal"],
"transformers-compat": ["@Cabal//:Cabal"],
},
# setup_deps = {
# "bifunctors": ["@Cabal//:Cabal"],
# "proto-lens-runtime": ["@Cabal//:Cabal"],
# "transformers-compat": ["@Cabal//:Cabal"],
# },
**stack_kwargs
)

0 comments on commit 78ddc14

Please sign in to comment.