Skip to content

cabal cannot find cabal.project or *.cabal unless packages is defined #5850

Open
@ericnething

Description

@ericnething

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]. 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 <pkgname>.cabal package file or cabal.project file. To
build packages locally you need at minimum a <pkgname>.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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions