haskell / text

Haskell library for space- and time-efficient operations over Unicode text.
http://hackage.haskell.org/package/text
BSD 2-Clause "Simplified" License
406 stars 158 forks source link

`text-2.1.2` breaks `parsers-0.12.11` #623

Open geekosaur opened 4 hours ago

geekosaur commented 4 hours ago

parsers has a constraint text < 2.2, which apparently isn't good enough. But should a minor revision be breaking other packages?

[7 of 8] Compiling Text.Parser.Token ( src/Text/Parser/Token.hs, dist/build/Text/Parser/Token.o )

src/Text/Parser/Token.hs:571:52: error:
Error:     Ambiguous occurrence ‘show’
    It could refer to
       either ‘Prelude.show’,
              imported from ‘Prelude’ at src/Text/Parser/Token.hs:31:8-24
              (and originally defined in ‘GHC.Show’)
           or ‘Data.Text.show’,
              imported from ‘Data.Text’ at src/Text/Parser/Token.hs:114:1-81
    |
571 |    notFollowedBy (_styleLetter s) <?> "end of " ++ show name
    |                                                    ^^^^

src/Text/Parser/Token.hs:578:52: error:
Error:     Ambiguous occurrence ‘show’
    It could refer to
       either ‘Prelude.show’,
              imported from ‘Prelude’ at src/Text/Parser/Token.hs:31:8-24
              (and originally defined in ‘GHC.Show’)
           or ‘Data.Text.show’,
              imported from ‘Data.Text’ at src/Text/Parser/Token.hs:114:1-81
    |
578 |    notFollowedBy (_styleLetter s) <?> "end of " ++ show name
    |                                                    ^^^^

src/Text/Parser/Token.hs:586:102: error:
Error:     Ambiguous occurrence ‘show’
    It could refer to
       either ‘Prelude.show’,
              imported from ‘Prelude’ at src/Text/Parser/Token.hs:31:8-24
              (and originally defined in ‘GHC.Show’)
           or ‘Data.Text.show’,
              imported from ‘Data.Text’ at src/Text/Parser/Token.hs:114:1-81
    |
586 |   when (HashSet.member name (_styleReserved s)) $ unexpected $ "reserved " ++ _styleName s ++ " " ++ show name
    |                                                                                                      ^^^^

(https://github.com/haskell/cabal/actions/runs/11533905253/job/32107358221?pr=10477, https://github.com/haskell/cabal/actions/runs/11534133925/job/32107825720?pr=10478)

phadej commented 3 hours ago

parsers has

import Data.Text hiding (empty,zip,foldl',take,map,length,splitAt,null,transpose)

It's their fault. They have a wildcard import, can blame themselves for that. In other words, open issue in parsers issue tracker.

Bodigrim commented 3 hours ago

Minor release can export more entities, this is not a violation of PVP.

geekosaur commented 3 hours ago

Opened ticket against parsers (https://github.com/ekmett/parsers/issues/90). I still need to find a Hackage trustee for an emergency revision.

RyanGlScott commented 3 hours ago

I've applied a revision to parsers-0.12.11 to restrict the upper bounds to text < 2.1.2.

phadej commented 3 hours ago

I've applied a revision to parsers-0.12.11 to restrict the upper bounds to text < 2.1.2.

I'd double check, it's pretty likely that many older parsers version are affected to.

RyanGlScott commented 3 hours ago

All other releases of parsers impose an upper bound of text < 2.1 or earlier, so they are unaffected.