Data.ByteString.hGetLine is deprecated since bytestring-0.12

Open Beginner friendly
#166 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
haskell
Domain
networking

Research direction

Open Network/BufferType.hs at lines 100 and 125 and inspect the two uses of Data.ByteString's deprecated hGetLine. Update those uses to the recommended Data.ByteString.Char8 function, then build the package and confirm the bytestring-0.12 deprecation warnings are gone.

Written by the indexing model from the issue text.

Description

Network/BufferType.hs:100:28: warning: [GHC-68441] [-Wdeprecations]
    In the use of `hGetLine' (imported from Data.ByteString):
    Deprecated: "Deprecated since @bytestring-0.12@. Use 'Data.ByteString.Char8.hGetLine' instead. (Functions that rely on ASCII encodings belong in "Data.ByteString.Char8")"
    |
100 |       , buf_hGetLine     = Strict.hGetLine
    |                            ^^^^^^^^^^^^^^^

Network/BufferType.hs:125:35: warning: [GHC-68441] [-Wdeprecations]
    In the use of `hGetLine' (imported from Data.ByteString):
    Deprecated: "Deprecated since @bytestring-0.12@. Use 'Data.ByteString.Char8.hGetLine' instead. (Functions that rely on ASCII encodings belong in "Data.ByteString.Char8")"
    |
125 |       , buf_hGetLine     = \ h -> Strict.hGetLine h >>= \ l -> return (Lazy.fromChunks [l])
    |                                   ^^^^^^^^^^^^^^^

https://github.com/haskell/HTTP/blob/e0ea99c332cdaccc7921d96967eb1dda3db003c8/Network/BufferType.hs#L100
https://github.com/haskell/HTTP/blob/e0ea99c332cdaccc7921d96967eb1dda3db003c8/Network/BufferType.hs#L125

Dominant language
Haskell
Stars
186
Forks
59
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from haskell/HTTP

All issues in haskell/HTTP

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.