haskell / haskell/HTTP

Data.ByteString.hGetLine is deprecated since bytestring-0.12

Abierto Apto para principiantes
#166 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Haskell
Estrellas
186
Forks
59
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

```
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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Abre Network/BufferType.hs en las líneas 100 y 125 e inspecciona los dos usos del hGetLine obsoleto de Data.ByteString. Actualiza esos usos para utilizar la función recomendada de Data.ByteString.Char8, luego compila el paquete y confirma que las advertencias de obsolescencia de bytestring-0.12 han desaparecido.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
haskell
Área
networking
Tipo de issue
Error
Dificultad
1/5
Tiempo estimado
1-3 horas
Estado de actividad
Tranquilo
Claridad
Bien especificado
Aptitud para principiantes
88/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.