Skip to content

Fix sfv breaking changes#569

Open
BSteffaniak wants to merge 5 commits intocloudflare:mainfrom
BSteffaniak:fix-sfv-breaking-changes
Open

Fix sfv breaking changes#569
BSteffaniak wants to merge 5 commits intocloudflare:mainfrom
BSteffaniak:fix-sfv-breaking-changes

Conversation

@BSteffaniak
Copy link
Copy Markdown

@BSteffaniak BSteffaniak commented Mar 26, 2025

This fixes the compilation errors introduced in sfv 0.11. (fixes #568)

Parser::{from_bytes, from_str} was merged into Parser::new: undef1nd/sfv#158

GenericBareItem::bare_item.as_token was updated to return &TokenRef, which needs to be converted to a &str explicitly: undef1nd/sfv#159

sfvs MSRV was set to 1.77 as well with their change: undef1nd/sfv#160.
There was already an implied 1.77 MSRV, even in 0.10.4. The update they made to 0.11.0 just made it explicit: undef1nd/sfv#142

This means that the pingora msrv would need to be bumped as well. Assuming that means that the changes in this PR would need to be a major change in pingora.

Let me know your thoughts. Thanks!

@BSteffaniak BSteffaniak force-pushed the fix-sfv-breaking-changes branch from fbb73bb to e16ab9f Compare March 26, 2025 02:12
@zonblade zonblade mentioned this pull request Mar 27, 2025
@ibatanov
Copy link
Copy Markdown

ibatanov commented Mar 27, 2025

Maybe it makes sense to fix the version to sfv = "0.11.0"?
https://github.com/cloudflare/pingora/blob/main/pingora-core/Cargo.toml#L60C1-L60C10

Today I was surprised to find that the assembly pipelines in my project had collapsed.

This would avoid unpredictable behavior.

@BSteffaniak
Copy link
Copy Markdown
Author

I believe you mean sfv = "0.10"?

I did mention that in the PR description. @zonblade has create a PR with the temporary fix here: #572, although I'm not sure if the full 'patch' pin is necessary.

This PR is primarily for fixing sfv for usage going forward with it. For a temporary fix, I see #572 as sufficient.

@rspendl
Copy link
Copy Markdown

rspendl commented Mar 27, 2025

I believe you mean sfv = "0.10"?

I did mention that in the PR description. @zonblade has create a PR with the temporary fix here: #572, although I'm not sure if the full 'patch' pin is necessary.

This PR is primarily for fixing sfv for usage going forward with it. For a temporary fix, I see #572 as sufficient.

Two days ago sfv 0.11.0 was published on crates.io (https://crates.io/crates/sfv) so @ibatanov was right, it's 11, not 10.

@BSteffaniak
Copy link
Copy Markdown
Author

I believe you mean sfv = "0.10"?
I did mention that in the PR description. @zonblade has create a PR with the temporary fix here: #572, although I'm not sure if the full 'patch' pin is necessary.
This PR is primarily for fixing sfv for usage going forward with it. For a temporary fix, I see #572 as sufficient.

Two days ago sfv 0.11.0 was published on crates.io (https://crates.io/crates/sfv) so @ibatanov was right, it's 11, not 10.

I understand that, but he is saying the fix is to pin the version to 0.11, which is the new version that breaks current pingora.

@rspendl
Copy link
Copy Markdown

rspendl commented Mar 27, 2025

I believe you mean sfv = "0.10"?
I did mention that in the PR description. @zonblade has create a PR with the temporary fix here: #572, although I'm not sure if the full 'patch' pin is necessary.
This PR is primarily for fixing sfv for usage going forward with it. For a temporary fix, I see #572 as sufficient.

Two days ago sfv 0.11.0 was published on crates.io (https://crates.io/crates/sfv) so @ibatanov was right, it's 11, not 10.

I understand that, but he is saying the fix is to pin the version to 0.11, which is the new version that breaks current pingora.

My bad, I thought this is a fix of Pingora so it can run with sfv 0.11.0.

@BSteffaniak
Copy link
Copy Markdown
Author

My bad, I thought this is a fix of Pingora so it can run with sfv 0.11.0.

I see. I understood his message as suggesting the temporary fix (as done in #572).

I think you are correct. Specifying the full version in this PR could be a good idea to make sure pingora is further protected against similar updates.

@ibatanov
Copy link
Copy Markdown

ibatanov commented Mar 28, 2025

I believe you mean sfv = "0.10"?

I did mention that in the PR description. @zonblade has create a PR with the temporary fix here: #572, although I'm not sure if the full 'patch' pin is necessary.

This PR is primarily for fixing sfv for usage going forward with it. For a temporary fix, I see #572 as sufficient.

Two days ago sfv 0.11.0 was published on crates.io (https://crates.io/crates/sfv) so @ibatanov was right, it's 11, not 10.

I understand that, but he is saying the fix is to pin the version to 0.11, which is the new version that breaks current pingora.

misunderstood me, the fix is what you wrote, plus I meant to fix the version ;)

@muse254
Copy link
Copy Markdown

muse254 commented Mar 30, 2025

This is out of scope for this fix but would it also make sense to pin this dependency and any similar pre-v1?
https://github.com/cloudflare/pingora/blob/main/pingora-core/Cargo.toml#L67 @BSteffaniak

@samanpa
Copy link
Copy Markdown

samanpa commented Apr 2, 2025

Can the fix above be merged? Without it, one cannot compile latest pingora-core?

@drcaramelsyrup drcaramelsyrup added the dependencies Pull requests that update a dependency file label Apr 4, 2025
@andrewhavck
Copy link
Copy Markdown
Collaborator

Sorry for the delay, we had an internal commit synced fixing the issue here.

cb35ff7

@andrewhavck
Copy link
Copy Markdown
Collaborator

Re-opening as I believe the intention here is to actually upgrade. Breaking build is fixed though as of cb35ff7.

@andrewhavck andrewhavck reopened this Apr 18, 2025
@zonblade
Copy link
Copy Markdown

Re-opening as I believe the intention here is to actually upgrade. Breaking build is fixed though as of cb35ff7.

oh, good good. 🤔

@BSteffaniak BSteffaniak force-pushed the fix-sfv-breaking-changes branch from c1d8a1a to 7d49613 Compare April 19, 2025 12:50
@BSteffaniak
Copy link
Copy Markdown
Author

@andrewhavck Do you want to bump the MSRV to 1.77.0 in this as well?

@BSteffaniak
Copy link
Copy Markdown
Author

BSteffaniak commented Apr 21, 2025

I went ahead and added a commit to bump the MSRV to 1.77.0. I can revert it if desired.

Just to make sure the context around this MSRV change is clear: I mentioned on the 'quick fix' PR (#572 (comment)) that sfv 0.10.4 already technically required rust 1.77.0 to build successfully:

For extra context, I think sfv technically might have already have an implied 1.77 msrv, even in 0.10.4. The update they made to 0.11.0 just made it explicit: undef1nd/sfv#142

@BSteffaniak BSteffaniak force-pushed the fix-sfv-breaking-changes branch from baf7c18 to 08109c8 Compare May 10, 2025 12:08
@BSteffaniak
Copy link
Copy Markdown
Author

I noticed there were some changes merged in around the MSRV. I removed the code around MSRV in this PR to limit the affected changes since the pipeline should pass with what is now on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sfv 0.11 breaks pingora cargo build

8 participants