-
Notifications
You must be signed in to change notification settings - Fork 221
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
Replace data-encoding with base64 #375
base: master
Are you sure you want to change the base?
Conversation
data-encoding 2.5.0 raises their MSRV to 1.70, meanwhile base64 has 0.21.3 reduced MSRV to 1.57 in order to be compatible with Debian Bullseye
I was just about to make the same pull request. The reqwest crate has the dependency for base64. And two base64 crates in dependency tree is look as overkill. |
Maybe you're right. Maybe we should give it a try, in the worst case (if there are strong reasons not to use it), we can always get back to the |
Personally I'm not going to touch anything related to the If the only problem is the MSRV then I would get in touch with the maintainer first, but also managing a low MSRV is practically impossible nowadays with the lack of support for it in cargo so... 🤷♂️ That That reqwest is using base64 would also make it a solution to switch reqwest over to data-encoding if that's the only concern. |
I've added a comment about that to the |
Also, of course, in extension, This is not even a problem in the initially mentioned case because Debian bullseye will not ship the latest |
This is optional dependency. So if some users prefer to use |
features are additive since different dependencies could enable both features, if both are enabled one should be preferred over the other |
That also shows how you can actually test in the CI that your crate still compiles with that Rust version and a manually maintained edit: note that |
The reqwest is only example. The whole rust http stack should be switch to data-encoding: |
Related to the cargo issue about not considering MSRV there's a pre-RFC now for implementing that: https://internals.rust-lang.org/t/pre-rfc-msrv-aware-resolver/19871/1 |
Nice! @sdroege, thanks for elaborated answers and kicking off the whole "revert MSRV change" in So just to summarize things: folks that are not happy with the current dependency on |
@daniel-abramov , yes the main concern is one more useless dependency. A useless dependency, not in a bad way, but because exactly the same functionality is already among of the dependencies. One more dependency is may be looks like is not big deal, but with big enough dependency graph, So I think it is time to reconsider #330 , it is not true that "base64 requires quite a bit more code", as demonstrated this PR, |
Not sure what is going on. But if run Not to mention that other web related crates depend on base64: cookie, tower-http, axum, reqwest, ureq, jsonwebtoken and so on. May be the problem is just in "This branch has conflicts that must be resolved", and after conflicts were resolved the branch would be merged? |
@davemilter it isn't a technical issue, not using base64 is rooted in disagreeing with maintainer's rude handling of a request to maintain simple api: marshallpierce/rust-base64#213 Maybe an effort can be made to get consensus in ecosystem to use data-encoding, or create a hyperium/base64 fork optimized for base64 specifically as seen on web @seanmonstar does this seem practical to you? I can create necessary PRs. But would want to know which direction you think is best, even if that direction should be maintaining this split |
data-encoding 2.5.0 raises their MSRV to 1.70,
meanwhile base64 has 0.21.3 reduced MSRV to 1.48 in order to be compatible with Debian Bullseye
ia0/data-encoding#77
marshallpierce/rust-base64#239
marshallpierce/rust-base64#246
This also attempts to reduce dependencies for crates depending on both hyper & tungstenite-rs where headers/postgres-protocol/rustls-pemfile use base64 0.21