-
-
Notifications
You must be signed in to change notification settings - Fork 743
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
Unwind the __fixed_rust business #1946
base: master
Are you sure you want to change the base?
Conversation
We'll probably be bumping the openssl crate soon, but openssl-sys may be staying as-is unfortunately. Cargo prevents multiple semver-incompatible copies of -sys crates from existing in a dependency tree, so going from openssl-sys 0.9 to 0.10 is hugely disruptive to the ecosystem :( It has been a while since I've checked in on the state of things though, so there may be ways of cleaning this up anyway. |
@sfackler I thought we wanted to do it for foreign-type, is that only in openssl? |
The motivation here was that #1945 left out doing anything about https://github.com/sfackler/rust-openssl/blob/master/openssl/src/ssl/bio.rs#L193. Making The problem is we'd otherwise have to add this Particularly for a low-level crate like |
Not just low-level, but also an FFI. Rust has numerous deficiencies around FFI, so it's very likely the correct ways to do things will shift over time. (E.g. there's an issue where Rust and C's incompatible empty slice representations mean basically every FFI crate is unsound, including this one. I still need to write that up.) |
(Looks like I got some business wrong around |
Yep, foreign_types is only used in the openssl crate. One option we could take is to just make the change on 0.9. It'll break people that use an old openssl-sys against a new openssl, but that's probably preferrable to the major bump mess? |
Is there anything we can do quantify this -- e.g., scan the top N crates on
crates.io that depend directly on openssl-sys and see if any of them have
an older -sys but a new openssl?
…On Sat, Jun 3, 2023 at 3:00 PM Steven Fackler ***@***.***> wrote:
Yep, foreign_types is only used in the openssl crate.
One option we *could* take is to just make the change on 0.9. It'll break
people that use an old openssl-sys against a new openssl, but that's
probably preferrable to the major bump mess?
—
Reply to this email directly, view it on GitHub
<#1946 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBFN4URDZ4WWON3NPJDXJOCTRANCNFSM6AAAAAAYZMOJKA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
All that is necessary for evil to succeed is for good people to do nothing.
|
Resolved. |
This gives the unsuffixed names the correct signatures, and deprecates the suffixed names in favor of the now fixed unsuffixed ones. The suffixed names now forward to the unsuffixed ones.
So, I've attempted to build a bunch of ecosystem crates with rust-lang/git2-rs#960 and alexcrichton/curl-rust#503 are examples of PRs fixing this. I want to try to make the compatibility matrix explicit here:
So all of this really hinges on: What version of Did I get my analysis right? Does anyone know what version that was? I can go look at the mininums for widely used crates + download data from there. |
I believe 1ce53a6 is the commit that introduced the distinction, meaning https://github.com/sfackler/rust-openssl/releases/tag/openssl-v0.10.39 is the first release to contain it. |
Ok, I spent some time with the crates.io, it looks like for all of 2023, 92% of downloads of MethodologyIf you're curious how I did this:
|
I've now got myself a little data pipeline for computing these stats on demand. Here's the percent of
|
We're now up to 97.59% of downloads of |
This gives the unsuffixed names the correct signatures, and deprecates the suffixed names in favor of the now fixed unsuffixed ones. The suffixed names now forward to the unsuffixed ones.
(This isn't a semver-compatible change. But @alex tells me you all might be bumping that soon, so I'm uploading this to add to the queue. Also uploading to run it through CI because I'm sure I've gotten one of the myriad of configurations wrong. 😄)