cabal cannot find cabal.project or *.cabal unless `packages` is defined
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
I am using cabal 2.4.1.0.
In the cabal user guide section for `cabal.project` files, it states that the default value of `packages:` is `./*.cabal` [[Reference]](https://www.haskell.org/cabal/users-guide/nix-local-build.html?highlight=project#cfg-field-packages). However, if you do not specify this explicitly in the file, cabal fails to find any cabal.project files or *.cabal files at all.
~~~
$ cabal new-build
cabal: There is no .cabal package file or cabal.project file. To
build packages locally you need at minimum a .cabal file. You can use
'cabal init' to create one.
For non-trivial projects you will also want a cabal.project file in the root
directory of your project. This file lists the packages in your project and
all other build configuration. See the Cabal user guide for full details.
~~~
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.
Contributor guide
Assessment
This issue has not been assessed yet.