mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 00:05:55 +03:00
[GH-ISSUE #1005] 0.4.0 uses outdated dependencies #479
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#479
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gdesmott on GitHub (May 23, 2022).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1005
Originally assigned to: @roderickvd on GitHub.
Looks like the latest release uses outdated deps. It would be nice to update those so projects using librespot don't end up with duplicates of those crates.
@sdroege commented on GitHub (May 23, 2022):
If you run it for the whole workspace you'll get even more
@roderickvd commented on GitHub (May 23, 2022):
Thanks for putting this in. To give some direction to this discussion, I would like to split two things:
w.r.t. no. 1 I could really use the help to find out why the current librespot 0.4.0 crate pulls in
cpal-0.12and thereby causes the build to fail. Please see the Gitter chat for some initial findings. I would like to sort this out as soon as possible. It looks like we have to yank 0.4.0 and release a 0.4.1 to fix this.w.r.t. no. 2, yes it would be nice if we were on the latest patch releases. The list above may be misleading because it also presents the delta to the latest major releases. Many major releases are API-incompatible or even require a higher MSRV. So for
librespot0.4.x we should be on the latest0.1.xversions of dependencies and not always on the latest0.x.y.In
new-apiwe are on a higher MSRV and have already upgraded a lot of dependencies. This branch represents new developments If you want to take inventory of legacy dependencies, then please use that branch as reference and submit PRs to upgrade any if so necessary.For now please focus on issue no. 1: why is the crate build failing because of pulling in
cpal0.12?@akoww commented on GitHub (May 23, 2022):
Hi. Today I had the same problem building the current version 0.4 of librespot.
I'm not really deep into this topic but the following thing I could find out:
librespot-playback has some dependencies and cpal is one of them.
This line forced cargo to use the 0.12 version of cpal within the playback-project which lead to multiple versions within the whole project.
I don't know if it helps anyone, but using version = "0.13.4" helped me compiling project in the current state
@JasonLG1979 commented on GitHub (May 23, 2022):
protobuf,hmac,aes-ctr, andvergenare the major ones I found so far as far as API-incompatibles. Pretty much everything else can be solved by bumping the MSRV to the latest Rust stable version. We already know each other's opinion on bumping the MSRV...@roderickvd commented on GitHub (May 23, 2022):
Those four have already been solved in
new-apiso no problems there.@roderickvd commented on GitHub (May 23, 2022):
Can anyone confirm this? This might just be the solution if I misunderstood the Cargo dependency resolver.
@JasonLG1979 commented on GitHub (May 23, 2022):
That MSRV is really holding us back?
@JasonLG1979 commented on GitHub (May 23, 2022):
No go if the MSRV stays at 1.53. = "0.13.4" pulls in alsa 0.6 which requires =< 1.56.
@JasonLG1979 commented on GitHub (May 23, 2022):
Bumping gstreamer is also a no go as it depends on 2021. We're stuck on 1.53 in our CI.
@JasonLG1979 commented on GitHub (May 23, 2022):
A lot of the others were pretty simple.
@JasonLG1979 commented on GitHub (May 23, 2022):
https://github.com/librespot-org/librespot/pull/1006
@sdroege commented on GitHub (May 23, 2022):
OOC, why didn't you update the MSRV to 1.60 or something else more recent with the 0.4 release? Without any ecosystem-wide agreement about MSRVs you're just making your life more difficult.
@JasonLG1979 commented on GitHub (May 23, 2022):
I'm right there with you. IMHO everything should be updated to the most current stable releases if possible baring any major refactoring due to API changes.
@roderickvd commented on GitHub (May 23, 2022):
Oh but there is. Keeping an as low as feasibly possible MSRV provides the greatest backward compatibility. Looking at the top 10 downloaded crates on crates.io,
randis on 1.36,syn,quoteandproc-macro2on 1.31,libcandverdeon 1.13,unicode-xidon 1.17 andautocfgon 1.0.I repeatedly feel like I have to "defend" this position when I'm just trying to be a good Rustacean here. On the contrary I have always shown to be open to good arguments, but I don't consider upgrading because we can to be one. This is exactly what
alsadid and see where that got us: this dependency hell! We should not infect other projects with constraints that could be avoided entirely.I find these discussions discouraging and hope we can all focus on fixing the issue at hand.
Closing off I also repeat that I'm open to changing the MSRV policy with and only with majority support from contributors and maintainers alike. I'm trying to run a democratic community here on the basis of good engineering arguments, not anyone's personal beliefs including my own. Going round in circles costs all of us time we can much better spend on other things.
@JasonLG1979 commented on GitHub (May 23, 2022):
How many regular contributors are there really? It's basically just you and me on the regular and others drop in from time to time?
@JasonLG1979 commented on GitHub (May 23, 2022):
Those crates are also MUCH lower level than librespot.
@JasonLG1979 commented on GitHub (May 23, 2022):
I understand your desire to be conservative but tech marches on. There are older versions of librespot people can use if they don't want the "latest and greatest". New stable releases should themselves depend of the most current stable deps at the time of there release. That's just how that goes. That's how you minimize dup deps and dep Hell situations.
@roderickvd commented on GitHub (May 23, 2022):
I highly value the opinion of @sashahilton00 (the owner of this repo really) and @kingosticks.
It takes nothing away from the point that breaking compatibility while gaining nothing in the way of functionality or security is a stupid thing to do. A low as feasible MSRV is a desirable trait, bumping when something more desirable functionality comes on our way.
I like to lead by example. MSRV upgrades should be treated as a SemVer breaking change. Projects can choose to follow a certain major branch and all would be good.
@JasonLG1979 commented on GitHub (May 23, 2022):
Leading by example also means staying the most up to date so that it forces other projects to do the same so that things don't stagnate.
@sdroege commented on GitHub (May 23, 2022):
Yeah I fully agree with that, but then 0.4 was a breaking version update from 0.3. In any case, your call and I understand your desire to be as conservative as possible. Personally I gave up on staying far behind whenever I do a breaking version update, mostly because a) very few crates in the ecosystem seem to care so you always have to stay behind with dependencies too (and miss out on improvements) and be very careful with updating and still things will regularly break, b) there are useful new features in newer Rust versions that make my life as a maintainer easier, c) updating the Rust toolchain is trivial thanks to really great release management (almost no regressions ever) and rustup. It seems mostly problematic for Linux distros in my experience (Debian maintainer here), but IMHO the version of the toolchain they ship is for building the software they ship and not for development purposes on that distro.
Anyway, your call! Sorry for bringing this up, it seems to be a sensitive topic here :)
My main reason for reporting the outdated versions is that a project I'm maintaining is pulling in multiple versions of various crates because of this and that's not a great situation either.
@JasonLG1979 commented on GitHub (May 23, 2022):
@sdroege
How does this look?:
That's after https://github.com/librespot-org/librespot/pull/1007
@roderickvd commented on GitHub (May 23, 2022):
👍 and all those have been updated in
new-apialready. They might lag a patch release or two behind there but the major upgrades have been done.@JasonLG1979 commented on GitHub (May 23, 2022):
For a 0.4.2 I can backport everything else at some point (after 0.4.1 gets a little mileage) if you like since we're no longer held back by the MSRV?
@roderickvd commented on GitHub (May 23, 2022):
Honestly I would much rather promote
new-apitodev, wrinkle out a few bugs with the HTTP backend and release 0.5. We've got something pretty good and usable in there already! Then target the major effort fordealerweb socket stuff for 0.6.@JasonLG1979 commented on GitHub (May 23, 2022):
Fair enough.
@sashahilton00 commented on GitHub (May 24, 2022):
I haven't had much time recently to look at what's happened in the new api branch or indeed to give it a test, but given that it is the future of where this repo is going I'd echo Roderick's view of moving to it sooner rather than later, and thus concentrating developments efforts there - there's already several commits that are going to have to be reviewed and merged in from dev, it would be good to minimise divergence.
Additionally, we should probably expend some effort on documenting the protocol so that others can implement a client in their language of choice - as demonstrated by the recent activity around libspotify, there are still people looking for a solution to that use case, and interest in having a librespot-esque client in whatever language they're using - it doesn't look like Spotify is planning on releasing an alternative official solution anytime soon.
@sdroege commented on GitHub (May 24, 2022):
That leaves
block-buffer/digest/sha-1at version 0.9 (0.10 is latest)All other duplicates for my case are gone now.
@JasonLG1979 commented on GitHub (May 24, 2022):
Most of the divergence issues were caused because changes from dev were merged into the new branch instead of the new branch being rebased on dev to get the changes. That's what caused what we have here where a branch appears to be several commits behind and ahead of dev. Not only that but it makes a mess of the commit history.
@JasonLG1979 commented on GitHub (May 24, 2022):
IMHO that should be cleaned up before it's merged into dev and from now on we should never do that again. We should always rebase.
@JasonLG1979 commented on GitHub (May 24, 2022):
There was one place that the latest version of sha1 was a drop in replacement and another where it would have required refactoring so I just left it so at least librespot as a whole would not have a dup.
@roderickvd commented on GitHub (May 26, 2022):
This is fixed with #1004 for 0.4.0. Like I said before, those remaining few crates have been updated in
new-api.