diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-06-22 13:26:28 +0100 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-07-01 10:21:00 +0100 |
commit | 6bbe941b78d476fd10cb56d246fed93866948b05 (patch) | |
tree | 0e73bf90998c364aa7722232cdf57325c8b3e88a /libraries/template-haskell/template-haskell.cabal.in | |
parent | 16b9100c9ef6b34b88a52b3b9e663dd40abd028f (diff) | |
download | haskell-wip/vendor-filepath.tar.gz |
Vendor filepath inside template-haskellwip/vendor-filepath
Adding filepath as a dependency of template-haskell means that it can't
be reinstalled if any build-plan depends on template-haskell.
This is a temporary solution for the 9.4 release.
A longer term solution is to split-up the template-haskell package into
the wired-in part and a non-wired-in part which can be reinstalled. This
was deemed quite risky on the 9.4 release timescale.
Fixes #21738
Diffstat (limited to 'libraries/template-haskell/template-haskell.cabal.in')
-rw-r--r-- | libraries/template-haskell/template-haskell.cabal.in | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/libraries/template-haskell/template-haskell.cabal.in b/libraries/template-haskell/template-haskell.cabal.in index 58d0d70d7d..6cbe41fe01 100644 --- a/libraries/template-haskell/template-haskell.cabal.in +++ b/libraries/template-haskell/template-haskell.cabal.in @@ -27,6 +27,14 @@ source-repository head location: https://gitlab.haskell.org/ghc/ghc.git subdir: libraries/template-haskell + +-- We give the option to vendor filepath to avoid making filepath non-reinstallable.. +-- see #21738 for why we are doing this now and what the plan is for the future. +Flag vendor-filepath + Description: Vendor the dependency on filepath + Default: False + Manual: True + Library default-language: Haskell2010 other-extensions: @@ -58,9 +66,20 @@ Library base >= 4.11 && < 4.18, ghc-boot-th == @ProjectVersionMunged@, ghc-prim, - filepath, pretty == 1.1.* + if flag(vendor-filepath) + other-modules: + System.FilePath + System.FilePath.Posix + System.FilePath.Windows + hs-source-dirs: ../filepath . + default-extensions: + ImplicitPrelude + else + build-depends: filepath + hs-source-dirs: . + ghc-options: -Wall -- We need to set the unit ID to template-haskell (without a |