-
Notifications
You must be signed in to change notification settings - Fork 696
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
Cabal install fails when ** wildcards are used #6125
Comments
I can't replicate this locally with just
|
@quasicomputational The full This is on NixOS, getting GHC and This is using the following $ cabal --version
cabal-install version 2.4.1.0
compiled using version 2.4.1.0 of the Cabal library |
Thanks! Here's what look like the critical lines:
To me, that looks like Unfortunately, the code there looks reasonable to me and just eyeballing it doesn't reveal an obvious bug. I don't understand why this would only be occurring in a Nix environment - when I try it locally, I don't get that second Just to confirm where the bug is, could you run this script (with
|
@quasicomputational Here's the output of It looks like it is listing all the files correctly, so I'm not sure what could be going on here :-\ |
Here's the function you linked to: cabal/Cabal/Distribution/Simple/Install.hs Lines 224 to 236 in ed3ae13
Particularly these lines: cabal/Cabal/Distribution/Simple/Install.hs Lines 231 to 233 in ed3ae13
And here is the relevant line from your main =
matchDirFileGlob normal (mkVersion [2,4]) "." "data/**/*.hs" >>= traverse_ putStrLn In |
So, that makes sense why this is failing. And I just worked out why I couldn't replicate it: I had the wrong branch cheked out. Whoops. Thanks for the remote debugging support! I'll put together a test and a patch for this. (Also, this bug would've been caught if globs were a newtype instead of |
Treating globs like filenames was always illegitimate, but this code was broken further by the addition of recursive globs. I had a look around for other dubious code along these lines, and it looks like this site is the only problematic one. Fixes haskell#6125.
Treating globs like filenames was always illegitimate, but this code was broken further by the addition of recursive globs. I had a look around for other dubious code along these lines, and it looks like this site is the only problematic one. Fixes #6125.
@quasicomputational So when we'll be able to use the fix? |
Hopefully soon, when Cabal 3.0 comes out with GHC 8.8! But one snag is that users will still have 2.4 installs for a while, so, yeah. |
I can make one final lib:Cabal 2.4 point release if this helps. |
If that will allow users to build cabal install without the bug, that would be awesome. |
@23Skidoo Is that release coming? |
From what I know, upgrading a library bundled with GHC is a PITA. Yet, I heard that Nix is good at pulling stuff from |
I'll try today or tomorrow. |
|
I tried this today but apparently
I don't have time to make the whole tree build against this Here is the code: |
This is necessary to avoid haskell/cabal#6125. Fixes haskell/cabal#6125 at last.
This is necessary to avoid haskell/cabal#6125. Fixes haskell/cabal#6125 at last.
Issue summary:
|
`cabal-version: 2.4` allows e.g. `data-files: foo/**/*.txt` but `**` directories are only handled correctly since Cabal 3.0 (issue #6125). This information should be part of the cabal file format history documentation.
`cabal-version: 2.4` allows e.g. `data-files: foo/**/*.txt` but `**` directories are only handled correctly since Cabal 3.0 (issue #6125). This information should be part of the cabal file format history documentation.
Re #6125: document that glob dirs are buggy in Cabal 2.4
See NixOS/nixpkgs#64173 (comment)
The text was updated successfully, but these errors were encountered: