haskell-servant / servant

Main repository for the servant libraries — DSL for describing, serving, querying, mocking, documenting web applications and more!
https://docs.servant.dev/
1.8k stars 407 forks source link

Text-2.0 support #1684

Closed yaitskov closed 1 year ago

yaitskov commented 1 year ago

Hi,

I wanted to use function Data.Text.Encoding.decodeUtf8Lenient and noticed that it is not available in text-1.*, then I noticed that latest servant version cannot depend on text-2.*, and there is no open issue - which is very strange. First thought is servant deprecated? Is there newer fork for servant? Is there a some type hack which makes upgrading to text-2 impossible?

jhrcek commented 1 year ago

Latest versions of servant definitely do support text 2.0. (check version bounds in Dependencies section on hackage: https://hackage.haskell.org/package/servant-server)

Assuming you're using stack, Is it possible that you're maybe using older version of stack resolver that has older version of servant which doesn't yet support text 2.0? Try running stack ls dependencies where you stack.yaml is and see what servant version you're using.