-
Notifications
You must be signed in to change notification settings - Fork 79
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
Migrate from unmaintained xz2 to liblzma #288
base: main
Are you sure you want to change the base?
Conversation
Hmmm it seems that the fork is done about 10 months ago, I'm worried about if the maintainer is malicious just like the one in xz-utils. I suggest that to add it as a separate feature If eventually there's enough evidence that the new fork is trustworthy then we'd switch the existing feature to use the fork. |
Sounds good to me, I do recognize the irony in this being for xz specifically :) |
I prefer lower-kerbab-case, otherwise it looks good to me |
|
For modules, I think lower_case makes sense |
Hmmm, it looks like having them added concurrently won't work, even if neither are enabled, since they both link |
If both of them are enabled, then we can default to using the fork. The API should not be changed, as only the underlying bindings are swapped |
Yes, I was attempting to do that, but it seems cargo will refuse to have both of them as a dependency (even optional?) because of the
|
Ohh right I forgot that😅 That'd allow us to only enable one of the dependency, without introducing new features. |
Agreed, I'm apprehensive to swap it out completely, but a cfg-based approach to the fork would be acceptable. |
cc @xbjfk We discussed about this and we think using That'd allow us to only pull one version of it, and remove it in the future without breaking backwards compatibility. |
@NobodyXu thanks, I agree and think that is the best way forward. |
I think you can do
|
Thanks! Unfortunately, cargo seems to still complain about the linkage :( (see: rust-lang/cargo#5969 (comment)). I've just pushed my code with the cfg option. |
@xbjfk I think maybe we should open an issue in rust-lang/cargo? It seems that the linkage - the dependency resolution is done before cfg selection? It's originally intended for cfg target expression, so I kind of understand why it doesn't work, but I believe this can be supported in cargo. |
Yeah, I agree. |
Hello,
It seems xz2 is unmaintained and the maintainer has stepped down: alexcrichton/xz2-rs#128 (comment). https://github.com/Portable-Network-Archive/liblzma-rs seems to be the replacement, including a newer version of
xz
,wasm
support and test updates.I've kept the module called
xz2
for now. All tests still pass.