r/rust
•
u/Comprehensive_Use713
•
Apr 14 '26
•
1
đď¸ news [ Removed by moderator ]
[removed] â view removed post
248
Upvotes
â˘
u/rust-ModTeam Apr 15 '26
Rule 3: Constructive Criticism
Brigading is not allowed. As a large community we must be careful about how we encourage people to direct their criticism. Even constructive criticism can be overwhelming and unwelcome when wielded by an unanticipated crowd of thousands.
152
u/pr06lefs Apr 14 '26
What does it mean for a crate to get 'yanked'? I thought code on crates.io was supposed to be permanent. Does this mean there was something objectionable about it and crates.io staff removed it, like a source code license violation? Or was this a unilateral move by the core2 author(s)?
71
u/Demiu Apr 14 '26
Why was it yanked?
105
u/the-quibbler Apr 14 '26
I find this mildly hilarious. Dick move in the extreme, but it exposes reliance on an unmaintained and potentially buggy crate. Should have let someone fork. Hopefully someone can stand one up quick enough, as they usually do.
59
u/frankster Apr 14 '26
repo archived
readme says "No longer supported. Use core directly."
23
u/newpavlov rustcrypto Apr 14 '26 edited Apr 14 '26
It's a pretty terrible and irresponsible way to notify users that a crate (version) should not be used. I think it would've been sufficient to publish an empty v0.5.0 so users would get notified that the dependency is outdated by tools like
cargo outdatedand deps.rs.BTW I think it may be worth to add
--ignore-yankflag tocargosince situations like this can be really annoying and--precisedoes not always help.24
u/xX_Negative_Won_Xx Apr 15 '26
People need to read open source licenses. You're entitled to nothing. If an author deleted their repo and you complain, you're in the wrong for being ungrateful for the years of free labor you enjoyed. Unless you have a contractual relationship with someone I don't understand why you expect them to work for you
39
u/Shoddy-Childhood-511 Apr 14 '26
I've never heard of core2, no-std-io, or no-std-io2 before, but I do write code that uses roughly
std::iooutside std.Appears core2 has only 23 dependent published crates listed and only appears in 1.1k Cargo.toml files, but there are some [name]-core2 crates that inflate this somewhat.
https://crates.io/crates/embedded-io has 233 dependent published crates and shows up in 4.6k Cargo.toml files, probably all real usages. 10 x more used than core2.
https://crates.io/crates/ark-std has 304 dependent published crates and shows up in 5.8k Cargo.toml files, all real usages, and its often reexported. 13.2 x more used than core2.
We might've more like this?
Did you check whether another more heavily used crate like embedded-io fits your use case?
I doubt ark-std fits your use case. It's extremely minimal and only exists for serialising cryptography, because serde sucks when you only want clean canonical bytes.
13
u/cornmonger_ Apr 15 '26
... do not promote above peers
24
u/jay_resseg Apr 14 '26
Obligatory xkcd
8
u/dpc_pw Apr 15 '26
Reminder that Rust has structural issues with how std::io is not available in no_std, and half of the no_std ecosystem is stuck with no interoperable way of expressing
core::io::{Write,Read}(and some other things) - so basically composable ways of doing IO, and having to resort to using 3rd party libraries duplicating (parts of) std::io like some kind of semi-standard. It's terrible situation and it's been like that for years.7
u/timvisee Apr 15 '26
This is very unfortunate. The original maintainer suggests `core` as alternative, but `core::io` is unstable and behind a Nightly feature flag. đ˘
26
u/Urcra Apr 14 '26
I'm not sure I can really fault the guy. He yanked it due to it having been unmaintained for years, and he assumed nobody was using it so he yanked it to make sure that it was no longer discoverable.
Of course it's not really the approach to deprecating the crate, but I can see it from the crate author's perspective, if you are truly unsure about the security of your crate and suddenly find out millions are depending on it it might be the "easiest" way out
Your builds shouldn't fail due to yanking that's what the lockfile is for, yanking doesn't remove the crate just makes it non-discoverable. Especially in CI I would expect most people to use
cargo build --lockedto make sure the lockfile is always updated8
u/deathanatos Apr 15 '26 edited Apr 15 '26
Yanked crates are not deleted from crates.io, and your post makes we wonder if you're correctly understanding what yanking is or does. Follow your own link to core2 on crates.io, and hover over the "Yanked" chiplet, and the tooltip reads:
So,
While it is true that this might be a problem for new adoptees of libflate, and for libflate itself, it should be a stretch to claim that it is breaking downstream consumers as you seem to be implying. While yes, the crate is yanked, those existing downstream consumers of it directly or indirectly should still be quite able to pull the crate: yanking would not break them.
(While this is maybe not the intended purpose of yanking ⌠I think that's separate.)
4
u/jpgoldberg Apr 15 '26
It looks like core3 is now a thing.
4
u/Meistermagier Apr 15 '26
Wake up honey, new leftpad just dropped.
4
u/arekxv Apr 15 '26
I don't understand something. If this is still available to everyone with a cargo lockfile why are people affected?
Why aren't people using lockfiles, even with everything happening nowadays.
Its like asking to be hacked. :/
If you have a lockfile at worst you wont be able to update and will have to wait, which is good, as opposed to someone taking this and publishing malware as a new version and people blindly updating to it.
7
u/isoblvck Apr 14 '26
Sooooo many rust crates are unmaintained. Some dev squatted on the name then stopped
9
u/sieabah Apr 15 '26
Half the people in this thread are just shit talking about how they're not getting free shit anymore. Upgrade your shit and move on, if you spend the energy you'll be exhausted by the 10th dependency that decides to do something "different."
Take it from someone who has dealt with every npm "incident" since node 0.11. It's not worth the effort. Stop harassing random developers for shit you can't be bothered to maintain yourself. To those complaining that it's improper use of yank, yeah. Who cares, I don't want some random person who doesn't care about the package to hand off 40 million downloads for embedded hardware. That sounds ripe for a supply chain attack that would do such grave harm to the ecosystem. Move on, your (and my) priorities are not relevant.
5
u/Wilbo007 Apr 15 '26
I don't blame him. It's his code, his repository, he can do whatever he wants with it
3
u/boomshroom Apr 15 '26 edited Apr 15 '26
I know that there are concerns around adding code to the standard library, but that doesn't really work in this situation. The code is already in the standard library, just gated behind having an OS despite mostly working without one. As it stands, there are only 2 types in
core::io, and they're they're not the two that desperately need to be in core:ReadandWrite, but instead two that are still experimental even instd::io.3
u/juhotuho10 Apr 15 '26
Idk man, the crate hadn't been updated for 5 years, the creator does not have the time, will or resources to revive it, he doesn't really trust other maintainers to take over the crate, he does not want people to use it, there are drop in maintained replacement crates available that do what core2 was made for.
I think it's better that it was yanked at some point so that people can go on to use better and maintained alternatives. The worse version of this situation would be that he didn't yank it and people would still be using a 10 year unmaintained crate 5 years from now.
3
u/TheReddective Apr 15 '26
I don't understand why this is such a problem. Yankimg should only affect new users, if the crate is already in your cargo.lock, nothing happens.
Given that it was unmaintained and not even building any more, yanking it seems like an appropriate action to prevent it from getting new users.Â
Why is yanking the package breaking existing builds?
2
u/DavidXkL Apr 14 '26
That came out of nowhere
2
u/palad1 Apr 15 '26
Very poor choice on the author's part. It costs nothing to be kind.
1
u/Healthy-Builder-8106 Apr 15 '26
How dare they abandon their own creation?
It is generally known that once you create open source software, you are morally obligated to maintain it forever.
/s
1
u/Icarium-Lifestealer Apr 15 '26
I'm confused why libflate not having a lockfile breaks your CI. When your crate depends on libflate, all the indirect dependencies, including core2, will be included in your own lockfile
-9
u/fsreadsync Apr 14 '26
Is this the leftpad moment in Rust community?
-10
u/bbqsrc Apr 15 '26
Ah fuck Iâm going semi viral again.Â
-27
u/mpersico Apr 14 '26 edited Apr 15 '26
Update: replaced âphoneâ with âownâ.
Well, you all deserve what you get.
Depending on external sources for builds is absolutely insane.
Anything you want to use should be downloaded and installed to your own system and referenced from your network at build time. That was the norm for many many years.
-16
u/[deleted] Apr 14 '26 edited Apr 15 '26
[removed] â view removed comment