Skip to content

Bump httr2 version - #68

Merged
nealrichardson merged 15 commits into
nealrichardson:mainfrom
jonthegeek:httr2-version
Jun 25, 2026
Merged

nealrichardson merged 15 commits into
nealrichardson:mainfrom
jonthegeek:httr2-version

Conversation

@jonthegeek

Copy link
Copy Markdown
Contributor

Minimum version is 1.0.0 for tests to pass. I tweaked the test-mock-api.R tests that used httr2::resp_req() to instead grab the req directly, so we don't need to require 1.1.0 just for those tests.

Tested with pak::pak("httr2@1.0.0") (plus various other versions to see if things worked earlier).

I'm also committing a 204.204 file that's generated during testing. It's empty and doesn't seem to really do anything, but I keep deleting it rather than just checking it in. I saw more of these files with 1.0.0, but I didn't commit those since they seem extra wasteful.

I suspect git/github might actually ignore the file since it's empty, which might be why it keeps reappearing. We'll see!

Minimum version is 1.0.0 for tests to pass. I tweaked the `test-mock-api.R` tests that used `httr2::resp_req()` to instead grab the req directly, so we don't need to require 1.1.0 just for those tests.

Tested with `pak::pak("httr2@1.0.0")` (plus various other versions to see if things worked earlier).

I'm also committing a `204.204` file that's generated during testing. It's empty and doesn't seem to really *do* anything, but I keep deleting it rather than just checking it in. I saw more of these files with 1.0.0, but I didn't commit those since they seem extra wasteful.

I suspect git/github might actually ignore the file since it's empty, which might be why it keeps reappearing. We'll see!
@nealrichardson

Copy link
Copy Markdown
Owner

Thanks. Does the package itself not work or just the tests don't pass on versions older than 1.0.0?

I'm good with bumping the minimum version supported, but if we're going to do it, let's see if there are other things we can do to clean up affordances for older versions. https://github.com/search?q=repo%3Anealrichardson%2Fhttptest2%20httr2_1.0.0&type=code is one thing that jumps out to me but there might be others--look for commits/PRs, esp. from Hadley, about support for dev versions of httr2, these were generally PRs that landed so that we could release httptest2 before httr2 was submitted to CRAN, so as to avoid revdep failures for httr2. That httr2_1.0.0 might be the only one for 1.0.0 though.

@jonthegeek

Copy link
Copy Markdown
Contributor Author

Thanks. Does the package itself not work or just the tests don't pass on versions older than 1.0.0?

There were things in the code that didn't exist before 1.0.0. I suspect some of them could PROBABLY be handled with specific checks (similar to that httr2_1.0.0 thing) if you'd prefer. I think at least one was a "is this a real response (or maybe request?)" check, which could either be skipped or only enforced when that variable is set.

I could make arguments either way. I can take a stab at making things work with 0.2.3 if you'd like, and let you know if I run into anything that REALLY can't work... or I can clear out the special handling via httr2_1.0.0 and be done with it. Up to you! Either way it'll have to wait 'til tomorrow morning!

@nealrichardson

nealrichardson commented Jun 24, 2026 •

Copy link
Copy Markdown
Owner

Let's just remove httr2_1.0.0 and its usage and keep this dependency bump, 1.0.0 was in 2023.

@jonthegeek

Copy link
Copy Markdown
Contributor Author

@nealrichardson That should do it! Sorry for the action spam. I added a workflow that will let you know if anything doesn't work with httr2 1.0.0, but it took me a minute to sort out workflow naming rules well enough to make it identifiable in the list of action runs. I always forget that filename matters for that!

@nealrichardson nealrichardson left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for following through with this! Really appreciate it. Just a few cleanup notes here.

Comment thread .github/workflows/httr2-1-check.yaml Outdated
Comment thread .github/workflows/httr2-1-check.yaml Outdated
Comment thread .github/workflows/httr2-1-check.yaml Outdated
Comment thread .github/workflows/httr2-1-check.yaml Outdated
Comment thread .github/workflows/httr2-1-check.yaml Outdated
Comment thread .github/workflows/httr2-1-check.yaml Outdated
Comment thread R/expect-request-header.R Outdated
Comment thread tests/testthat/127.0.0.1-49314/code/204.204 Outdated
I'm going to add the `.gitignore` update in a separate commit to make sure it picks up the deletion of 204.204 first.

@nealrichardson nealrichardson left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@nealrichardson
nealrichardson merged commit 37efe13 into nealrichardson:main Jun 25, 2026
12 checks passed
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