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 cannot find cabal.project or *.cabal unless packages
is defined
#5850
Comments
It's a documentation deficiency; the defaults for We might also want to improve |
I just hit this, being surprised that I need to write a |
Issue about a better error message: #7401 |
By the way, the default is set here and it seems fairly easy to apply it even if cabal.project is present: cabal/cabal-install/src/Distribution/Client/ProjectConfig.hs Lines 507 to 524 in 207d4ee
|
Yes, I think the ticket number was mixed up in the PR description and github just followed that. Let me re-open. |
@jneira my view is that this ticket can be turned into a feature request to extend the default on cabal.project. But if people disagree, I could open a separate ticket. Or if people think it's a bad idea (for the default), we can just close this one and forget about it, yes. |
hmm i would open a specific issue about the feature, to make it more visible and hopefully provoke a discussion about, but as you consider, of course |
All right, let's close then. |
If @Mikolaj agrees that is. |
Sounds like a plan, though I'd close after the other ticket is opened and mentioned here so that we don't forget. |
I just ran in circles, trying to find, why “it’s a good thing”. I can see no benefit over a sensible default. And neither could anyone else I came across. So since I’m assuming your statement is based on something you remember, I’m curious: Could you share that good reason with us, so one can at least find it? (Or, alternatively, correct the statement, of course. ;) |
For the record, this statement came from @hvr, who is not active in cabal development any more. If I were to guess, empty default for That's only my guess. Perhaps others have better guesses. |
I am using cabal 2.4.1.0.
In the cabal user guide section for
cabal.project
files, it states that the default value ofpackages:
is./*.cabal
[Reference]. However, if you do not specify this explicitly in the file, cabal fails to find any cabal.project files or *.cabal files at all.But as soon as I add the line
packages: ./*.cabal
, it works. Either the documentation is wrong, or the implementation is wrong, but I don't know which.The text was updated successfully, but these errors were encountered: