octocrab icon indicating copy to clipboard operation
octocrab copied to clipboard

Upgrade to hyper/http 1.0

Open jonhoo opened this issue 1 year ago • 2 comments

Now that version 1.0 of the hyper and http* crates are out, octocrab should probably follow suit. Unfortunately, it's a decently heavy lift, especially due to Body changing from a concrete type to a trait (https://github.com/hyperium/hyper/issues/2345). I took a stab at it, but quickly got lost in a sea of <B: Body>s, and figured I'd leave it to those who know the library best.

A few bits I did pick up that may come in handy for someone wanting to take this on:

Also note that this will obviate:

  • https://github.com/XAMPPRocky/octocrab/pull/491
  • https://github.com/XAMPPRocky/octocrab/pull/489
  • https://github.com/XAMPPRocky/octocrab/pull/488
  • https://github.com/XAMPPRocky/octocrab/pull/487

which can probably all be closed in favor of this tracking issue.

jonhoo avatar Nov 25 '23 10:11 jonhoo

Thank you for your issue!

I took a stab at it, but quickly got lost in a sea of <B: Body>s

Yeah I tried upgrading other crates I maintain to 1.0.0 as a test, but this upgrade has been pretty painful in my experience, so I haven't made it a priority. I am able to help review the changes. I wonder if it's worth while to make a separate branch from it, so that we can continously make PRs for it, rather than require that someone migrate everything.

XAMPPRocky avatar Nov 25 '23 13:11 XAMPPRocky

Also worth linking this, which it took me a bit to find: https://hyper.rs/guides/1/upgrading/

jonhoo avatar Nov 26 '23 17:11 jonhoo