JuliaWeb / HTTP.jl

HTTP for Julia
https://juliaweb.github.io/HTTP.jl/stable/
Other
626 stars 177 forks source link

Remove `readuntil` type piracy #1083

Closed mortenpi closed 11 months ago

mortenpi commented 11 months ago

This makes sure that the readuntil function used by HTTP is owned by the IOExtras module, and so that it would be safe to add the currently type-pirated method taking an IOBuffer. Towards #1021.

I am not entirely sure what the best approach here is in terms of code maintainability though. Currently, I opted to keep the name the same (readuntil) and export it from IOExtras, so any module doing using IOExtras and using an unqualified readuntil will error (as the same name is exported from Base).

codecov-commenter commented 11 months ago

Codecov Report

Merging #1083 (9aaabdb) into master (10182c0) will decrease coverage by 0.03%. The diff coverage is 88.88%.

@@            Coverage Diff             @@
##           master    #1083      +/-   ##
==========================================
- Coverage   82.33%   82.30%   -0.03%     
==========================================
  Files          32       32              
  Lines        3040     3041       +1     
==========================================
  Hits         2503     2503              
- Misses        537      538       +1     
Files Changed Coverage Δ
src/IOExtras.jl 76.31% <50.00%> (-2.07%) :arrow_down:
src/Connections.jl 84.87% <100.00%> (ø)
src/Messages.jl 85.47% <100.00%> (ø)
src/Streams.jl 96.21% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

mortenpi commented 11 months ago

It looks like the invalidations test failure is unrelated?

quinnj commented 11 months ago

All looks good; thanks @mortenpi!