Skip to content
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 sdist with directory listed in extra-source-files silently fails #5195

Closed
alunduil opened this issue Mar 8, 2018 · 4 comments · Fixed by #5348
Closed

cabal sdist with directory listed in extra-source-files silently fails #5195

alunduil opened this issue Mar 8, 2018 · 4 comments · Fixed by #5348

Comments

@alunduil
Copy link

alunduil commented Mar 8, 2018

When a directory gets added to extra-source-files, cabal sdist silently fails. Using strace revealed the error was due to a directory in the extra-source-files directive, but cabal itself didn't indicate any issue other than an exit code of 1.

It would be nice if mistakes like this could have an error message indicating roughly where and what to look for to get things working again.

Let me know if any other information is useful and I'll be sure to add it.

% cabal --version                                                                                                                                                             (git)-[develop] 
cabal-install version 2.0.0.0                                                                                                                                                                                                    
compiled using version 2.0.0.2 of the Cabal library

If anyone is willing to point me in the right direction, I'm more than happy to put forth an effort to work this issue myself as well.

@23Skidoo
Copy link
Member

23Skidoo commented Mar 8, 2018

If anyone is willing to point me in the right direction, I'm more than happy to put forth an effort to work this issue myself as well.

Awesome! The relevant part of Cabal is https://github.com/haskell/cabal/blob/master/Cabal/Distribution/Simple/SrcDist.hs#L145. If you need further pointers, just ask.

@alunduil
Copy link
Author

@23Skidoo , sorry for the delay on this. I've finally got a little freedom to work on this. Looks like the line you linked has moved but that file seems mostly straight-forward.

Is it a known discrepancy that in the cabal file there is an extra-source-files but an extraDocFiles in the code? Let me know if I'm just reading this incorrectly as well. Thanks!

@23Skidoo
Copy link
Member

@alunduil
Copy link
Author

Alright, I'll have to dive into it one more time. Thanks for the sanity check!

quasicomputational added a commit to quasicomputational/cabal that referenced this issue May 26, 2018
I fixed this in passing with haskell#5284, but let's add a test to make sure
it stays fixed. The error message isn't perfect, but it's a lot better
than failing silently!

Closes haskell#5195.
quasicomputational added a commit that referenced this issue May 26, 2018
I fixed this in passing with #5284, but let's add a test to make sure
it stays fixed. The error message isn't perfect, but it's a lot better
than failing silently!

Closes #5195.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants