Skip to content

Conversation

@benalleng
Copy link
Collaborator

@benalleng benalleng commented Aug 15, 2025

I took the liberty to update the versions on many of the dependencies that don't necessarily need to be updated based solely on our new msrv.

Every existing dep should now be on an msrv of 1.85.0. Our ohttp-relay is now using the new v0.0.11 release with these changes as well.

There were a few api changes that were made in the source but most of those changes are minor and can be seen in separate commits

@benalleng benalleng force-pushed the msrv-pinned-deps branch 2 times, most recently from d6e2242 to 0ac5e73 Compare August 15, 2025 21:54
@coveralls
Copy link
Collaborator

coveralls commented Aug 15, 2025

Pull Request Test Coverage Report for Build 17276399990

Details

  • 17 of 17 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.007%) to 85.724%

Totals Coverage Status
Change from base Build 17275991760: 0.007%
Covered Lines: 7974
Relevant Lines: 9302

💛 - Coveralls

@spacebear21
Copy link
Collaborator

We will also want to update the README to remove the pinned deps instructions.

@benalleng benalleng force-pushed the msrv-pinned-deps branch 2 times, most recently from 09c02d2 to 60d96d8 Compare August 18, 2025 17:18
@DanGould
Copy link
Contributor

Check out Cargo's version requirement syntax.

X.Y.Z specified in Cargo.toml only holds X.Y true and the lock only locks X.Y.Z. This Is why for most dependencies I think we want to specify X.Y.Z in Cargo.toml and perhaps X.Y. if we absolutely must. This is what inspired my comment above to prefer complete specification if possible. That lets dependencies that combine choose a higher but compatible version.

@benalleng benalleng force-pushed the msrv-pinned-deps branch 3 times, most recently from 0cb6dc8 to 386a205 Compare August 19, 2025 17:43
@benalleng
Copy link
Collaborator Author

I have currently pointed ohttp-relay to my own draft branch https://github.com/benalleng/rust-payjoin/blob/386a20591209d1d67f57da2981d01baa80cd287c/payjoin-test-utils/Cargo.toml#L18 but hopefully we can get this PR merged and then continue to move everything forward

Comment on lines 30 to 33
- name: "Install Rust 1.85.0"
uses: actions-rs/toolchain@v1
with:
toolchain: 1.78.0
toolchain: 1.85.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

I realized from working on #876 that this action is obsolete and doesn't have the desired effect of using the specified toolchain (logs indicate it's always using nightly). We should use:

      - name: "Install Rust 1.85.0"
        uses: dtolnay/[email protected]

Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually #986 was the issue. But I still prefer using the actively maintained rust action.

@benalleng benalleng force-pushed the msrv-pinned-deps branch 3 times, most recently from 75a9b28 to 6e49fdb Compare August 21, 2025 20:55
@benalleng
Copy link
Collaborator Author

@DanGould would you like this PR to similarly split into seperate commits like in the ohttp relay payjoin/ohttp-relay#66?

@DanGould
Copy link
Contributor

It doesn't need to be incredibly granular but it would be nice if the source code changes could be associated with specific commits for just the relevant dependency upgrades

@benalleng benalleng force-pushed the msrv-pinned-deps branch 2 times, most recently from 36339d2 to 07d9799 Compare August 26, 2025 16:10
@benalleng benalleng changed the title [WIP] update msrv deps Update msrv deps Aug 26, 2025
@benalleng benalleng marked this pull request as ready for review August 26, 2025 16:11
@benalleng benalleng removed the blocked label Aug 26, 2025
@benalleng
Copy link
Collaborator Author

Note that we are now pointing directly to the main branch on ohttp-relay instead of a release candidate

@DanGould
Copy link
Contributor

I can cut an ohttp-relay release

@benalleng benalleng force-pushed the msrv-pinned-deps branch 3 times, most recently from 657190b to f5dfe48 Compare August 26, 2025 18:05
This updates the dependencies of payjoin-cli to match the msrv of
payjoin bumped to 1.85.0.

This commit does not update any dependencies that create any notable new
features or api changes that require changes in the source code.
Copy link
Contributor

@DanGould DanGould left a comment

Choose a reason for hiding this comment

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

I'll approve this because it's not a regression, but one status code handler was changed from a wrong implementation to another wrong implementation that I'd like to see addressed in an immediate follow up. I noticed that the defined anyhow version also varied. Seems OK to me.

ACK 083620d

[dependencies]
anyhow = "1.0.71"
bitcoin = { version = "0.32.4", features = ["base64", "rand-std"] }
anyhow = "1.0.89"
Copy link
Contributor

@DanGould DanGould Aug 27, 2025

Choose a reason for hiding this comment

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

payjoin-cli was updated to anyhow 1.0.99. In general I usually update workspace dependencies in tandem (rather than by crate) so that they don't get out of sync and require multiple versions in Cargo.lock.

Copy link
Collaborator Author

@benalleng benalleng Aug 27, 2025

Choose a reason for hiding this comment

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

This is a mistake in that commit! i will change it


async fn push(&self, mailbox_id: &ShortId, channel_type: &str, data: Vec<u8>) -> Result<()> {
let mut conn = self.client.get_async_connection().await?;
let mut conn = self.client.get_multiplexed_async_connection().await?;
Copy link
Contributor

Choose a reason for hiding this comment

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

Where'd you find this equivalence? https://docs.rs/redis/latest/redis/#connection-pooling?

Would be nice to have this kind of change documented in the commit log.

Comment on lines 139 to 146
.status(
m.control()
.status()
.map(|code| {
http::StatusCode::from_u16(code.code()).map_err(|_| bhttp::Error::InvalidStatus)
})
.unwrap_or(Ok(http::StatusCode::INTERNAL_SERVER_ERROR))?,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

I fear the original code is kind of jank, AND the updated code is jank.

The original is jank because it defaults to INTERNAL_SERVER_ERROR instead of throwing an error in this function when things go wrong. The updated code is jank because it keeps this but also maps to an error variant (InvalidStatus) that is never propagated. I think something like the following is more appropriate, where any problems become an InvalidStatus that actually gets returned as a Result.

Suggested change
.status(
m.control()
.status()
.map(|code| {
http::StatusCode::from_u16(code.code()).map_err(|_| bhttp::Error::InvalidStatus)
})
.unwrap_or(Ok(http::StatusCode::INTERNAL_SERVER_ERROR))?,
)
.status({
let code = m.control().status().ok_or(bhttp::Error::InvalidStatus)?;
http::StatusCode::from_u16(code.code()).map_err(|_| bhttp::Error::InvalidStatus)?
})

This commit updates the payjoin directory deps that do not imact any
source code changes or significant feature changes.
The bhttp dependency now no longer needs to be pinned to o.5.1 as we are
bumping our msrv to 1.85.0.
@benalleng benalleng force-pushed the msrv-pinned-deps branch 2 times, most recently from 794dff7 to 9ef3280 Compare August 27, 2025 18:54
this update bumps the redis dependency to 1.85.0 and changes some db
source with the updated api changes.

The `get_async_connection()` method for redis Client was deprecated in
v0.25.2 and removed in v0.30.0 the method
`get_multiplexed_async_connetion()` is the suggested replacement.
This bumps the dependencies in payjoin ffi to match the overall payjoin
msrv of 1.85.0
This commit updates the dependencies in payjoin-test-utils to match the
msrv of 1.85.0 that does not change any features or any significant api
changes.
this commit updates the dependencies in payjoin to match the new 1.85.0
msrv that don't make any significant api changes or feature changes.
With the new msrv of 1.85.0 we no longer need to lock the version of
bhttp and can now use standard semver for this dependency.

We do need some minor modifications in the source as the api has
changed.
This commit updates the tls related dependencies to mathc the new
payjoin msrv to 1.85.0>

All these crates have these changes together as the crates are all
interdependent on each other.

As well there are some significant api changes that come with these new
dep bumps.

payjoin-cli and payjoin-directory both use tokio-rustls which has an
internal rustls module accesible so I removed their direct rustls deps
in hopes that it could prevent some divergent changes in the future.
@benalleng
Copy link
Collaborator Author

Ok, the anyhow error was a mistake I made when splitting these commits up but is now fixed, as well I added a description for the deprecation of get_async_connection for redis::Client in 5c44c02

@benalleng benalleng requested a review from DanGould August 27, 2025 19:16
Copy link
Contributor

@DanGould DanGould left a comment

Choose a reason for hiding this comment

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

Legend

ACK 7eaa50e

@DanGould DanGould merged commit f8fd372 into payjoin:master Aug 28, 2025
14 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.

4 participants