berberman / arch-hs

Distribute hackage packages to archlinux
MIT License
19 stars 4 forks source link

Unaligned prefix spaces in arch-hs-diff when running for optparse-applicative #6

Closed felixonmars closed 4 years ago

felixonmars commented 4 years ago
$ arch-hs-diff optparse-applicative 0.15.1.0 0.16.0.0
  ⓘ Start running...
  ⓘ Downloading cabal file from https://hackage.haskell.org/package/optparse-applicative-0.15.1.0/revision/0.cabal...
  ⓘ Downloading cabal file from https://hackage.haskell.org/package/optparse-applicative-0.16.0.0/revision/0.cabal...
Package: optparse-applicative
Version: 0.15.1.0  ⇒  0.16.0.0
Synopsis: Utilities and combinators for parsing command line options
Depends:
base  ==4.*
    transformers  >=0.2 && <0.6
    transformers-compat  >=0.3 && <0.7
    process  >=1.0 && <1.7
    ansi-wl-pprint  >=0.6.8 && <0.7
MakeDepends:
        base  -any
    bytestring  >=0.9 && <0.11
    optparse-applicative  -any
    QuickCheck  >=2.8 && <2.14
----------------------------
    base  -any
    bytestring  >=0.9 && <0.11
    optparse-applicative  -any
    QuickCheck  >=2.8 && <2.15

  ✔ Success!

As you can see, base ==4.* in Depends has no prefix space, and the first base -any in MakeDepends has 8 spaces instead of 4.

berberman commented 4 years ago

This was caused by an error in concatenation of strings. Currently, all of the output texts are processed manually such as adding spaces or line feeds etc. Adopting pretty print libraries is an elegant way to avoid similar issues, which is already in ToDoList. However, I'm still thinking about the reasonable way combining pretty print libraries with colourista, in charge of coloring terminal outputs.

berberman commented 4 years ago

Close it temporarily if 25c28d5 works.

felixonmars commented 4 years ago

It works here now, thanks!