mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #129] Use protobuf-macros from crates.io, or remove it #101
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#101
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 @plietar on GitHub (Feb 8, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/129
Originally assigned to: @plietar on GitHub.
We currently use protobuf-macros (my crate), which is not on crates.io. This blocks publishing
librespot-coreto crates.ioPotential solutions are:
I'd be curious to see the impact of 3. It's probably small enough to make it the best solution.
@sashahilton00 commented on GitHub (Feb 8, 2018):
I haven't really looked at the protobuf side of things to have a view on this. It's up to you what we do. With regards to the message building code being more verbose, does this make it easier to pinpoint where the error is when spotify decides to update their protobuf spec, or were they just convenient when you were reverse engineering? My only view is that we should avoid option 2 if possible, since we have enough to do without having to think about rewriting bits of the code in an undetemined number of months time.
@plietar commented on GitHub (Feb 8, 2018):
No, it makes pretty much no difference.
Take for example
github.com/librespot-org/librespot@7ead896ae7/core/src/connection/handshake.rs (L84-L99)protobuf-macros is essentially just sugar that rewrites it with:
So a little less readable but not a huge deal.
Option 3 involves rewriting all uses of protobuf_init into the explicit version, and is probably the best course of action.
@sashahilton00 commented on GitHub (Feb 8, 2018):
Thanks for clarifying. If it's just syntactic sugar, then I think we can probably lose it if it's just hindering progress otherwise.
@awiouy commented on GitHub (Feb 11, 2018):
@plietar How can I get the output of
protobuf_init!to the screen or to a file?@plietar commented on GitHub (Feb 11, 2018):
@awiouy You should be able to find the expanded version in
target/debug/build/librespot-core-HASH/out/lib.rs