Preserve `tested-with` formatting from existing `.cabal` file
Problem:
hpack changes capitalization and spacing in the tested-with section, breaking Gild formatting. Related: #617
Expected behavior:
Maintain exact formatting, including capitalization, spacing, and commas.
Example:
-- Before (Gild-formatted)
tested-with:
ghc ==9.4.7
ghc ==9.6.6
-- After (hpack)
tested-with:
GHC == 9.4.7,
GHC == 9.6.6
If commas are optional, then that is something we want to address. Again I will need to know:
- Starting from which
cabal-versionis the comma optional?
The other things are less clear cut, as they are not strictly better.
What is the original package.yaml that produces this output (minimal example).
Hello, Sorry for the late update, there has been a lot happening during the latest weeks. I created a example repo for demonstrating how cabal gild formats files which were created by hpack.
Hpack example formatted by cabal gild: https://github.com/webdevred/hpack-example/commit/bf5f10b661618f08c24d4b1f33f7d94c5b77f2e4#diff-82b199226141b11408adea375e7906f2b46cb334c109d99525adcf6cc95712f3R114
Regarding this issue, I found this in the Cabal source code. https://github.com/haskell/cabal/blob/ae2ea9ecdb01e67d9f4801080be3d56cb4525422/Cabal-syntax/src/Distribution/Parsec.hs#L362
Best regards, webdevred