-
Notifications
You must be signed in to change notification settings - Fork 711
Cabal fails to "properly" fetch and build dependencies from github when mentioned as source-repository-package
in cabal.project
#8406
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
Is the problem that both deps use the same repo? What happens in you manually clone of of them, but keep the other as source-repository-package? |
Another thing to try is listing both
|
It used to work earlier with both packages using the same repo, it started failing only recently. I did not try it but my guess is it has something to do with this commit composewell/streamly@cc3bbd7 in streamly. It probably has something to do with using correct path for finding the pre-processor macro include files. |
I tried the above methods.
This doesn't work
This doesn't work.
This works!! The difference between this and the above is that in this case the nested package is fetched locally, while the above case (that doesn't work) the nested package is fetched from github. Weird 🤔. |
Thank you for the investigation. It would be wonderful to get to the bottom of this and, at least, document in the manual. Ideally, suggest where the fix needs to go or what a warning to display if the fix is hard. |
cabal doesn't warn about it because during the sdist phase it doesn't know that the file will be required, and during the build phase it doesn't know that the file was there before sdisting |
Thanks @fgaz ! I appreciate the PR. I did not know that cabal uses sdist after fetching with git. I thought it uses the package directly as it would use local packages. streamly-core is a new package, not yet on hackage, we have not started doing sdist CI on it yet, so the problem of not including assert.hs in extra-source-files escaped. The question is whether cabal should use sdist on git repos? If so should it use sdist on local repos as well then? So that both cases show similar behavior? |
Describe the bug
A cabal project that fetches certain dependencies from github fails to compile with errors of the following kind.
To Reproduce
composewell/streamly-process depends on composewell/streamly. Here's streamly-process
cabal.project
. Building it with v2-build gives the error given below.Expected behavior
The build should succeed.
System information
Ubuntu 20.04
Additional context
The build succeeds when I clone the dependencies and use the local paths as given below.
The text was updated successfully, but these errors were encountered: