Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: handle deprecations in winterfell 0.8.3 release #290

Merged
merged 1 commit into from
Mar 17, 2024
Merged

chore: handle deprecations in winterfell 0.8.3 release #290

merged 1 commit into from
Mar 17, 2024

Conversation

bitwalker
Copy link
Contributor

This PR handles the deprecations in the winterfell 0.8.3 release, and makes the same kind of changes made in facebook/winterfell#262 and in the corresponding commits of 0xPolygonMiden/miden-vm#1277 related to the upgrade.

I'm opening this against main and not next since I believe we'll want to do a patch release for this, but I can also open this against next, I have both staged locally, just let me know.

NOTE: I couldn't create a branch in this repo, so had to open the PR from a fork, may want to add me as a contributor, but I don't know how often I'll be pushing code here, so I'm fine working off a fork.

@bitwalker
Copy link
Contributor Author

/cc @bobbinth

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Thank you! Looks great! I left one question inline and depending on the answer we can either merge as is, or merge after a small change.

NOTE: I couldn't create a branch in this repo, so had to open the PR from a fork, may want to add me as a contributor, but I don't know how often I'll be pushing code here, so I'm fine working off a fork.

Added you to the repo!

src/utils/mod.rs Outdated
Comment on lines 12 to 15
pub use winter_utils::{
boxed, string, uninit_vector, Box, ByteReader, ByteWriter, Deserializable,
DeserializationError, Serializable, SliceReader,
uninit_vector, Box, ByteReader, ByteWriter, Deserializable, DeserializationError, Serializable,
SliceReader,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we are removing utils::boxed, utils::string, and a few other items from the public interface, would this not be a breaking change?

If so, I think this PR should probably go against next. Or if we keep the re-exports and add deprecation warnings, then this could go against main.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, good point, I'll add those back with deprecation warnings (I actually can't recall if the deprecation warnings from winter-utils propagate or not, I think they do, but I'll try to confirm quick).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added those back, and it looks like by re-exporting them compiling miden-crypto will produce compilation warnings for referencing those modules, which is fine. I did look to see if I could silence them when building miden-crypto, but produce new deprecation warnings if the re-exported modules are referenced, but unfortunately that doesn't appear to be possible (or at least my little test couldn't trigger the deprecation warning in that configuration).

Anyway, should be good to go now, but just wanted to note that one detail.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you! Yes, this should work fine - but I'm not seeing any new commits on this branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I force pushed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, looks like I accidentally pushed to origin rather than my fork, but it obviously succeeded since you added me as a contributor 😅. I pushed to the right origin this time, should be good to go now.

@bitwalker bitwalker enabled auto-merge (rebase) March 17, 2024 02:44
Copy link

sonarcloud bot commented Mar 17, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@bitwalker
Copy link
Contributor Author

@bobbinth I don't think there is anyway to both keep those modules in, and preserve the deprecation warnings, since it causes clippy to complain (hence the failing status check). Probably the thing to do here is to temporarily allow the clippy checks to fail until the follow up release from next that removes them from the public API.

Alternatively, you can disable the deprecation warnings for those modules, but I don't think downstream users of miden-crypto will then get any warnings that those modules are deprecated and going away. Basically a toss up on how to proceed here, since there are downsides either way, but clippy being broken temporarily is the least bad I think.

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

All looks good! Thank you again for fixing these up!

Probably the thing to do here is to temporarily allow the clippy checks to fail until the follow up release from next that removes them from the public API.

Yes - I think this is the right thing to do. I'll merge as is and then we can address it more properly in the next minor release (which I want to make as soon as we finish #285.

@bitwalker bitwalker merged commit 999a64f into 0xPolygonMiden:main Mar 17, 2024
9 of 10 checks passed
@bobbinth
Copy link
Contributor

miden-crypto v0.8.2 is now on crates.io.

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