using hyper::client::Builder w/out default runtime is confusing
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.3k
- Forks
- 1.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 14
Description
I recently completed an upgrade from 0.11 to 0.12 where I needed to manually construct a Reactor, Executor (ThreadPool), and HttpConnector, rather than use the rt::run module. Happy to provide more context on why, but I think it's somewhat orthogonal to the confusion detailed below.
It was surprising / confusing to me that failing to set client::Builder::executor explicitly when using a custom Reactor (via HttpConnector) fell back to using the "batteries included" executor; since that TL wasn't initialized I ended up with spawn failures. It seems to me that the builder API should either leverage the default runtime (which it already does well), or should require all of the runtime components to be explicitly specified. The half-default + half-explicit setup doesn't strike me as a real-world mode of operation, tho I'm sure y'all would have more insight into "hyper in practice".
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with hyper::client::Builder, HttpConnector, and the custom Reactor and ThreadPool setup described in the issue. Trace how executor selection behaves when Builder::executor is omitted and how spawn failures surface without the default runtime. Done means the runtime configuration behavior is made unambiguous and covered by an appropriate test or documented API contract.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100