Skip to content

Inscrutable error message if cabal.project has no packages field #6013

@Boarders

Description

@Boarders

If I create a project with a cabal.project file that does not list the packages field then I get the error:

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.

I think this is not a very helpful message for the problem at hand.

Metadata

Metadata

Assignees

Labels

cabal-install: v2-build systemAffecting v2-build and related commands that use v2-architecture (aka "nix local builds").type: bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions