[PR #665] [MERGED] Tokio migration #1006

Closed
opened 2026-02-27 20:00:47 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/665
Author: @Johannesd3
Created: 3/8/2021
Status: Merged
Merged: 4/13/2021
Merged by: @sashahilton00

Base: devHead: tokio_migration


📝 Commits (10+)

  • 6f5607d [Core] Bump hyper to ~0.12
  • 931c820 [Connect] Migrate to hyper ~v12
  • 962d7af Clean up hyper from binary
  • 9bbf8c3 WIP tokio-core -> tokio migration
  • 53b4ab0 Migrate to tokio 0.1
  • c69ccf7 [Connect] Migrate to tokio 0.1
  • 47a1575 WIP Futures
  • 94fc0a1 [Core/connection] Refactor to async/await
  • c273d51 [AudioKeyManager] Convert to async
  • 20dd94f Fix tokio dependency in main

📊 Changes

67 files changed (+3378 additions, -4421 deletions)

View changed files

📝 .github/workflows/test.yml (+105 -33)
📝 COMPILING.md (+1 -1)
📝 Cargo.lock (+415 -978)
📝 Cargo.toml (+14 -14)
📝 audio/Cargo.toml (+6 -7)
📝 audio/src/convert.rs (+14 -17)
audio/src/fetch.rs (+0 -1099)
audio/src/fetch/mod.rs (+509 -0)
audio/src/fetch/receive.rs (+455 -0)
📝 audio/src/lewton_decoder.rs (+7 -9)
📝 audio/src/lib.rs (+19 -27)
📝 audio/src/libvorbis_decoder.rs (+1 -3)
📝 audio/src/passthrough_decoder.rs (+7 -7)
📝 audio/src/range_set.rs (+19 -26)
📝 connect/Cargo.toml (+23 -20)
📝 connect/src/context.rs (+2 -2)
📝 connect/src/discovery.rs (+78 -108)
📝 connect/src/lib.rs (+3 -28)
📝 connect/src/spirc.rs (+173 -204)
📝 core/Cargo.toml (+27 -18)

...and 47 more files

📄 Description

We're very close to finishing the migration to Tokio 1.0, and I think the result is worth seeing. Not only tokio but almost every other dependency was bumped to its latest version. In many places the code became simpler by using the async/await notation, and there were some general efforts of refactoring the code on this occasion.

Issues:

  • The examples do not compile (#656)
  • Proxy support is still a bit unclear (#653)

Pull requests:

  • clean up imports & clippy lints (#652)
  • Refactor AudioFileFetch (#658)
  • Update examples (#663)
  • Fix remaining clippy warnings (#667)
  • Add back hyper-proxy (#674)
  • Further progress on tokio migration (#687)

Things that were removed and might or might not be added back:

  • Default impl of SessionConfig (was added again in #663)
  • LinearMap dependency in librespot-metadata (replaced by HashMap in a6ed685)
  • fn get_credentials (removed in 9253be7, see #596)

and

  • Think about feature flags (see #648, #652) (restored old behaviour and postponed)
  • Solve merge conflicts (#683)

Fixes #677, fixes #596, fixes #368


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/librespot-org/librespot/pull/665 **Author:** [@Johannesd3](https://github.com/Johannesd3) **Created:** 3/8/2021 **Status:** ✅ Merged **Merged:** 4/13/2021 **Merged by:** [@sashahilton00](https://github.com/sashahilton00) **Base:** `dev` ← **Head:** `tokio_migration` --- ### 📝 Commits (10+) - [`6f5607d`](https://github.com/librespot-org/librespot/commit/6f5607d9abd3880842f5abc935239c0e357e7d67) [Core] Bump hyper to ~0.12 - [`931c820`](https://github.com/librespot-org/librespot/commit/931c8207fc29e28728a8f034a7b540724a12733a) [Connect] Migrate to hyper ~v12 - [`962d7af`](https://github.com/librespot-org/librespot/commit/962d7af24df7bc2df24bacc7bd1068e402d9e0d2) Clean up hyper from binary - [`9bbf8c3`](https://github.com/librespot-org/librespot/commit/9bbf8c3b26cef284eea5e193ce5755c4897b9d73) WIP tokio-core -> tokio migration - [`53b4ab0`](https://github.com/librespot-org/librespot/commit/53b4ab05ba9f1627d568c0193cc246fb9cae3fca) Migrate to `tokio` 0.1 - [`c69ccf7`](https://github.com/librespot-org/librespot/commit/c69ccf77e99c6d19ca10818d4841de12e6329c33) [Connect] Migrate to `tokio` 0.1 - [`47a1575`](https://github.com/librespot-org/librespot/commit/47a1575c00ee1b0abee98599e3e2d478638e18ca) WIP Futures - [`94fc0a1`](https://github.com/librespot-org/librespot/commit/94fc0a12da8c9bdc9358a7c255e138a7aebb734b) [Core/connection] Refactor to async/await - [`c273d51`](https://github.com/librespot-org/librespot/commit/c273d51a1df00d73935538c3952ef016216fc131) [AudioKeyManager] Convert to async - [`20dd94f`](https://github.com/librespot-org/librespot/commit/20dd94fe2079e998480a72e04acd50ab46a2393b) Fix tokio dependency in main ### 📊 Changes **67 files changed** (+3378 additions, -4421 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/test.yml` (+105 -33) 📝 `COMPILING.md` (+1 -1) 📝 `Cargo.lock` (+415 -978) 📝 `Cargo.toml` (+14 -14) 📝 `audio/Cargo.toml` (+6 -7) 📝 `audio/src/convert.rs` (+14 -17) ➖ `audio/src/fetch.rs` (+0 -1099) ➕ `audio/src/fetch/mod.rs` (+509 -0) ➕ `audio/src/fetch/receive.rs` (+455 -0) 📝 `audio/src/lewton_decoder.rs` (+7 -9) 📝 `audio/src/lib.rs` (+19 -27) 📝 `audio/src/libvorbis_decoder.rs` (+1 -3) 📝 `audio/src/passthrough_decoder.rs` (+7 -7) 📝 `audio/src/range_set.rs` (+19 -26) 📝 `connect/Cargo.toml` (+23 -20) 📝 `connect/src/context.rs` (+2 -2) 📝 `connect/src/discovery.rs` (+78 -108) 📝 `connect/src/lib.rs` (+3 -28) 📝 `connect/src/spirc.rs` (+173 -204) 📝 `core/Cargo.toml` (+27 -18) _...and 47 more files_ </details> ### 📄 Description We're very close to finishing the migration to Tokio 1.0, and I think the result is worth seeing. Not only tokio but almost every other dependency was bumped to its latest version. In many places the code became simpler by using the async/await notation, and there were some general efforts of refactoring the code on this occasion. __Issues:__ - [x] The examples do not compile (#656) - [x] Proxy support is still a bit unclear (#653) __Pull requests:__ - [x] clean up imports & clippy lints (#652) - [x] Refactor AudioFileFetch (#658) - [x] Update examples (#663) - [x] Fix remaining clippy warnings (#667) - [x] Add back hyper-proxy (#674) - [x] Further progress on tokio migration (#687) __Things that were removed and might or might not be added back:__ - [x] `Default` impl of `SessionConfig` (was added again in #663) - [ ] `LinearMap` dependency in `librespot-metadata` (replaced by `HashMap` in a6ed685) - [ ] `fn get_credentials` (removed in 9253be7, see #596) __and__ - [ ] ~Think about feature flags (see #648, #652)~ (restored old behaviour and postponed) - [x] Solve merge conflicts (#683) Fixes #677, fixes #596, fixes #368 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:00:47 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#1006
No description provided.