Skip to content

Missing line numbers in cabal.project parse failure errors #10611

@9999years

Description

@9999years

Describe the bug
If a source-repository-package is missing its type field, the error message doesn't report a line number.

To Reproduce
Steps to reproduce the behavior:

$ cd $(mktemp -d)
$ echo > cabal.project
$ echo >> cabal.project
$ echo source-repository-package >> cabal.project
$ cabal build
Error: [Cabal-7090]
Error parsing project file /my-project/cabal.project:
???:0:0: "type" field missing

Expected behavior
The error message should show the line number containing the error.

System information

  • Operating system: macOS 15.1.1 (24B91)
  • Cabal: 3.12.1.0

Additional context
The error message is the same on the latest master commit (55ccc0a).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions