Switch to ureq for our simple sync HTTP get request#1167
Merged
DavisVaughan merged 3 commits intomainfrom Apr 23, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turns out that you aren't allowed to call
reqwest::blocking::get()from insidetokio::block_on()reqwest uses tokio internally, which means that
reqwest::blocking::get()tries to use tokio blocking APIs, but when you're already inside a tokio runtime (which we are due to our top leveltokio::block_on()) you can't use any additional tokio blocking APIs. It results in a full panic and a confusing message.You can supposedly do stuff like this to push the blocking work onto an actual blocking thread used by tokio
but thats so awkward to think about, especially considering that we want the cache to be "warm" most of the time, not requiring tokio at all.
Instead, I think we should switch to ureq, which is one of the other popular but more minimal HTTP clients and is always blocking, which is fine for us right now.
This still requires the tweaks to the Windows github action. ureq uses ring under the hood (at least for now, see algesten/ureq#1141). On ARM Windows where we have an MSVC target of
aarch64-pc-windows-msvc, ureq needs to compile in a lot of C code with clang, but ends up finding the Rtools MinGW tooling that is put on the PATH, and that causes it to fail with an<assert.h>missing header error.