haskell / haskell/cabal

Cabal V3.0 changes how "freeform" fields are parsed

Open
#11,518 7 comments 0 reactions 0 assignees View on GitHub
cabal-install: cmd/check Cabal: parser type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**
Since Cabal V3.0, `freeTextField` `freeTextFieldDef`, `freeTextFieldDefST` uses the function `fieldlinesToFreeText3`. Prior to Cabal V3.0, we use `fieldlinesToFreeText`. However, `fieldlinesToFreeText` treats lines with only dots (let's call them dotlines) as empty lines and `fieldlinesToFreeText3` doesn't.

**To Reproduce**
Steps to reproduce the behavior:

- Look at cabal on hackage
- Image

This dot is a dotline that used to be interpreted as a empty newline.
Image

**Expected behavior**
Is this a breaking change in the cabal parser since cabal3.0?

Contributor guide

Open the contributing guide

Research direction

Start by comparing the mentioned fieldlinesToFreeText and fieldlinesToFreeText3 functions, then reproduce the dotline behavior using the Cabal package example on Hackage. Done means the parser's intended treatment of lines containing only dots is established and the Cabal 3.0 behavior is corrected or explicitly confirmed.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.