haskell / haskell/HTTP

Data.ByteString.hGetLine is deprecated since bytestring-0.12

Open Beginner friendly
#166 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
186
Forks
59
PR merge metrics
No merged PRs in 30d

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

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.