Missing line numbers in `cabal.project` parse failure errors
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**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 (55ccc0a91c1fb388c4f78a29584c7190cae6838a).
Contributor guide
Assessment
This issue has not been assessed yet.