Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport to v1.9 some fixes for Julia master #1214

Draft
wants to merge 5 commits into
base: release-1.9
Choose a base branch
from

Conversation

nickrobinson251
Copy link
Collaborator

Trying to make HTTP.jl v1.9 work on Julia v1.12

Backports:


Using v1.12 with HTTP.jl v1.9.19 we have seen:

2025-01-17 13:00:59   """Underlying error:
2025-01-17 13:00:59   TaskFailedException
2025-01-17 13:00:59   
2025-01-17 13:00:59       nested task error: MethodError: Cannot `convert` an object of type 
2025-01-17 13:00:59         SubArray{UInt8,1,Memory{UInt8},Tuple{UnitRange{Int64}},true} to an object of type 
2025-01-17 13:00:59         SubArray{UInt8,1,Vector{UInt8},Tuple{UnitRange{Int64}},true}
2025-01-17 13:00:59       The function `convert` exists, but no method is defined for this combination of argument types.
2025-01-17 13:00:59       
2025-01-17 13:00:59       Closest candidates are:
2025-01-17 13:00:59         SubArray{T, N, P, I, L}(::Any, !Matched::Any, !Matched::Any, !Matched::Any) where {T, N, P, I, L}
2025-01-17 13:00:59          @ Base subarray.jl:19
2025-01-17 13:00:59         convert(::Type{T}, !Matched::RAI_Common.Alg.SemiringElement{T}) where T
2025-01-17 13:00:59          @ RAI_Common ~/packages/RAI_Common/src/Alg.jl:84
2025-01-17 13:00:59         convert(::Type{T}, !Matched::T) where T
2025-01-17 13:00:59          @ Base Base_compiler.jl:133
2025-01-17 13:00:59         ...
2025-01-17 13:00:59       
2025-01-17 13:00:59       Stacktrace:
2025-01-17 13:00:59        [1] readuntil(buf::IOBuffer, find_delimiter::typeof(HTTP.Parsers.find_end_of_header))
2025-01-17 13:00:59          @ HTTP.IOExtras ~/julia-depot-path/.julia/packages/HTTP/1MepD/src/IOExtras.jl:125
2025-01-17 13:00:59        [2] readuntil(c::HTTP.Connections.Connection{Sockets.TCPSocket}, f::typeof(HTTP.Parsers.find_end_of_header), sizehint::Int64)
2025-01-17 13:00:59          @ HTTP.Connections ~/julia-depot-path/.julia/packages/HTTP/1MepD/src/Connections.jl:242
2025-01-17 13:00:59        [3] readuntil(c::HTTP.Connections.Connection{Sockets.TCPSocket}, f::typeof(HTTP.Parsers.find_end_of_header))
2025-01-17 13:00:59          @ HTTP.Connections ~/julia-depot-path/.julia/packages/HTTP/1MepD/src/Connections.jl:238
2025-01-17 13:00:59        [4] readheaders(io::HTTP.Connections.Connection{Sockets.TCPSocket}, message::HTTP.Messages.Response)
2025-01-17 13:00:59          @ HTTP.Messages ~/julia-depot-path/.julia/packages/HTTP/1MepD/src/Messages.jl:533
2025-01-17 13:00:59        [5] startread(http::HTTP.Streams.Stream{HTTP.Messages.Response, HTTP.Connections.Connection{Sockets.TCPSocket}})
2025-01-17 13:00:59          @ HTTP.Streams ~/julia-depot-path/.julia/packages/HTTP/1MepD/src/Streams.jl:153
2025-01-17 13:00:59        [6] macro expansion
2025-01-17 13:00:59          @ ~/julia-depot-path/.julia/packages/HTTP/1MepD/src/clientlayers/StreamRequest.jl:52 [inlined]
2025-01-17 13:00:59        [7] (::HTTP.StreamRequest.var"#6#7"{Nothing, HTTP.Streams.Stream{HTTP.Messages.Response, HTTP.Connections.Connection{Sockets.TCPSocket}}, HTTP.Messages.Request, HTTP.Messages.Response, Float64, ReentrantLock})()
2025-01-17 13:00:59          @ HTTP.StreamRequest ~/julia-depot-path/.julia/packages/ConcurrentUtilities/j1gVM/src/ConcurrentUtilities.jl:9

The offending line is

)::ByteView where {F <: Function}

Note the return type conversion ::ByteView on the function definition, fixed by #1149

vtjnash and others added 5 commits February 5, 2025 12:13
* delete ByteView

* Update Streams.jl

* Use `isempty` instead equality with an empty buffer
* Update readbytes! to avoid using internal API of IOBuffer less

Note that this claims to be supported for all GenericIOBuffer, but Base only defines this function on a normal IOBuffer for which `pointer(data)` is contiguous space

* Update Streams.jl

* Update Streams.jl

* Update Streams.jl

* fix some tests relying on implementation details
@nickrobinson251
Copy link
Collaborator Author

nickrobinson251 commented Feb 5, 2025

Test failures are autobahn client test cases:
(https://github.com/JuliaWeb/HTTP.jl/actions/runs/13159293324/job/36723735264)

Test Summary:                                                                            | Pass  Fail  Broken  Total      Time
HTTP                                                                                     | 4205   135     107   4447  13m26.4s
  ...
  Autobahn WebSocket Tests                                                               |  576   135            711   7m15.8s
    Client                                                                               |  112   135            247   6m32.9s
      ...
      6.1.1                                                                              |    1                    1      0.0s
      6.1.2                                                                              |    1                    1      0.0s
      6.1.3                                                                              |    1                    1      0.0s
      6.10.1                                                                             |          1              1      1.4s
      6.10.2                                                                             |          1              1      0.0s
      6.10.3                                                                             |          1              1      0.0s
      6.11.1                                                                             |          1              1      0.0s
      6.11.2                                                                             |          1              1      0.0s
      6.11.3                                                                             |          1              1      0.0s
      6.11.4                                                                             |          1              1      0.0s
      6.11.5                                                                             |          1              1      0.0s
      6.12.1                                                                             |          1              1      0.0s
      6.12.2                                                                             |          1              1      0.0s
      6.12.3                                                                             |          1              1      0.0s
      6.12.4                                                                             |          1              1      0.0s
      6.12.5                                                                             |          1              1      0.0s
      6.12.6                                                                             |          1              1      0.0s
      6.12.7                                                                             |          1              1      0.0s
      6.12.8                                                                             |          1              1      0.0s
      6.13.1                                                                             |          1              1      0.0s
      6.13.2                                                                             |          1              1      0.0s
      6.13.3                                                                             |          1              1      0.0s
      6.13.4                                                                             |          1              1      0.0s
      6.13.5                                                                             |          1              1      0.0s
      6.14.1                                                                             |          1              1      0.0s
      6.14.10                                                                            |          1              1      0.0s
      6.14.2                                                                             |          1              1      0.0s
      6.14.3                                                                             |          1              1      0.0s
      6.14.4                                                                             |          1              1      0.0s
      6.14.5                                                                             |          1              1      0.0s
      6.14.6                                                                             |          1              1      0.0s
      6.14.7                                                                             |          1              1      0.0s
      6.14.8                                                                             |          1              1      0.0s
      6.14.9                                                                             |          1              1      0.0s
      6.15.1                                                                             |          1              1      0.0s
      6.16.1                                                                             |          1              1      0.0s
      6.16.2                                                                             |          1              1      0.0s
      6.16.3                                                                             |          1              1      0.0s
      6.17.1                                                                             |          1              1      0.0s
      6.17.2                                                                             |          1              1      0.0s
      6.17.3                                                                             |          1              1      0.0s
      6.17.4                                                                             |          1              1      0.0s
      6.17.5                                                                             |          1              1      0.0s
      6.18.1                                                                             |          1              1      0.0s
      6.18.2                                                                             |          1              1      0.0s
      6.18.3                                                                             |          1              1      0.0s
      6.18.4                                                                             |          1              1      0.0s
      6.18.5                                                                             |          1              1      0.0s
      6.19.1                                                                             |          1              1      0.0s
      6.19.2                                                                             |          1              1      0.0s
      6.19.3                                                                             |          1              1      0.0s
      6.19.4                                                                             |          1              1      0.0s
      6.19.5                                                                             |          1              1      0.0s
      6.2.1                                                                              |    1                    1      0.0s
      6.2.2                                                                              |    1                    1      0.0s
      6.2.3                                                                              |          1              1      0.0s
      6.2.4                                                                              |          1              1      0.0s
      6.20.1                                                                             |          1              1      0.0s
      6.23.3                                                                             |          1              1      0.0s
      6.23.4                                                                             |          1              1      0.0s
      6.23.5                                                                             |          1              1      0.0s
      6.23.6                                                                             |          1              1      0.0s
      6.23.7                                                                             |          1              1      0.0s
      6.3.1                                                                              |    1                    1      0.0s
      6.3.2                                                                              |          1              1      0.0s
      6.4.1                                                                              |    1                    1      0.0s
      6.4.2                                                                              |    1                    1      0.0s
      6.4.3                                                                              |    1                    1      0.0s
      6.4.4                                                                              |    1                    1      0.0s
      6.5.1                                                                              |          1              1      0.0s
      6.5.2                                                                              |          1              1      0.0s
      6.5.3                                                                              |          1              1      0.0s
      6.5.4                                                                              |          1              1      0.0s
      6.5.5                                                                              |          1              1      0.0s
      6.6.1                                                                              |          1              1      0.0s
      6.6.10                                                                             |          1              1      0.0s
      6.6.11                                                                             |          1              1      0.0s
      6.6.2                                                                              |          1              1      0.0s
      6.6.3                                                                              |          1              1      0.0s
      6.6.4                                                                              |          1              1      0.0s
      6.6.5                                                                              |          1              1      0.0s
      6.6.6                                                                              |          1              1      0.0s
      6.6.7                                                                              |          1              1      0.0s
      6.6.8                                                                              |          1              1      0.0s
      6.6.9                                                                              |          1              1      0.0s
      6.7.1                                                                              |          1              1      0.0s
      6.7.2                                                                              |          1              1      0.0s
      6.7.3                                                                              |          1              1      0.0s
      6.7.4                                                                              |          1              1      0.0s
      6.8.1                                                                              |          1              1      0.0s
      6.8.2                                                                              |          1              1      0.0s
      6.9.1                                                                              |          1              1      0.0s
      6.9.2                                                                              |          1              1      0.0s
      6.9.3                                                                              |          1              1      0.0s
      6.9.4                                                                              |          1              1      0.0s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants