-
Notifications
You must be signed in to change notification settings - Fork 848
extra-deps: Cabal
is ignored when .cabal
file does not have Cabal
dependency
#5706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I understand that the |
I tested Extract from cabal-version: 2.4
data-files: data\**\*.txt Test program: module Main where
import Paths_test (getDataFileName)
main :: IO ()
main = do
fp <- getDataFileName "data\\sub\\data.txt"
contents <- readFile fp
putStrLn contents With test data file |
@mpilgrem, thanks for looking into this. I am using stack-2.7.5 (on macOS):
Can you reproduce the problem as follows?
|
My experience of trying to build
|
The problem with data Class
= Tm -- sort of terms, only needed for erasure
-- | Ty -- use Set 0! -- sort of type(constructor)s, only needed for erasure
-- | Ki -- sort of kinds -- use Set 0 ... for mor precision
| Size -- sort of sizes
| TSize -- sort of Size
-- | Type -- no longer used
deriving (Eq, Ord, Show) if that comment is deleted, then compilation continues to the next parse error - which is similar (a Haddock-like comment). If all of those problematic comments are deleted, the compilation then fails with:
|
I took a different approach to building resolver: lts-19.4
packages:
. -
resolver: lts-19.4
packages:
- .
extra-deps:
- haskell-src-exts-1.21.1@sha256:11d18ec3f463185f81b7819376b532e3087f8192cffc629aac5c9eec88897b35,4541 Then,
|
After some further investigation: First, the change log of the
Second, GHC did not come with Third, the first LTS resolver based on GHC >= 8.8.1 was Fourth, a now-deleted documentation file
|
So, # GHC 8.8.2
resolver: lts-15.1
packages:
- .
extra-deps:
- haskell-src-exts-1.21.1@sha256:11d18ec3f463185f81b7819376b532e3087f8192cffc629aac5c9eec88897b35,4541 but subject to the strange problem of the Haddock-type comments that will not parse. |
The malformed Haddock comments giving rise to parsing problems above are likely because I have |
On further investigation, custom-setup
setup-depends: base
, Cabal and a simple import Distribution.Simple
main = defaultMain The # GHC 8.6.5
resolver: lts-14.27
packages:
- .
extra-deps:
- Cabal-3.0.0.0
- haskell-src-exts-1.21.1@sha256:11d18ec3f463185f81b7819376b532e3087f8192cffc629aac5c9eec88897b35,4541
|
Given my investigation above and the updating of the documentation, I am going to close this issue. |
@mpilgrem wrote:
It is plausible that this will do the trick. Thank you for the thorough investigation! However, I am reluctant to switch to a custom setup because of a cabal issue: I would trade one evil for another. It seems easier to just not support stack build for old LTSs. |
I am using
cabal-version: 2.4
in my.cabal
file because I am using**
globbing patterns in thedata-files
section.It seems that
Cabal-2.4.0.1
shipped withlts-14.27
does not correctly implement these yet, at leaststack build
fails:Indeed the
should-fail
directory does not exist, but**
exists instead (looks like a bug handling globbing pattern**
):However, working around this problem by bumping the
Cabal
version in thestack.yaml
files fails:is seemingly ignored, and also any newer
Cabal
version.Note that my
.cabal
file does not declare a dependency onCabal
directly, the dependency is more indirect viacabal-version: 2.4
.Maybe related:
extra-dep
is ignored when other version already in snapshot #5679The text was updated successfully, but these errors were encountered: