[PR #253] [CLOSED] Fix feature conflicts v2 #348

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

📋 Pull Request Information

Original PR: https://github.com/ramsayleung/rspotify/pull/253
Author: @marioortizmanero
Created: 9/19/2021
Status: Closed

Base: masterHead: fix-conflicts-2


📝 Commits (10+)

📊 Changes

36 files changed (+327 additions, -303 deletions)

View changed files

📝 .github/workflows/ci.yml (+9 -5)
📝 Cargo.toml (+28 -54)
📝 examples/auth_code.rs (+3 -2)
📝 examples/auth_code_pkce.rs (+4 -2)
📝 examples/client_creds.rs (+4 -2)
📝 examples/oauth_tokens.rs (+4 -2)
📝 examples/pagination_async.rs (+4 -2)
📝 examples/pagination_manual.rs (+4 -2)
📝 examples/with_refresh_token.rs (+5 -3)
rspotify-http/Cargo.toml (+0 -49)
rspotify-http/src/lib.rs (+0 -43)
📝 rspotify-macros/Cargo.toml (+1 -1)
📝 rspotify-model/Cargo.toml (+1 -1)
rspotify-sync/.env (+1 -0)
rspotify-sync/Cargo.toml (+84 -0)
📝 rspotify-sync/examples/device.rs (+2 -2)
📝 rspotify-sync/examples/me.rs (+2 -2)
📝 rspotify-sync/examples/pagination_sync.rs (+2 -2)
📝 rspotify-sync/examples/search.rs (+3 -2)
📝 rspotify-sync/examples/seek_track.rs (+2 -2)

...and 16 more files

📄 Description

Description

This supersedes #222, which is now kinda outdated.

In this attempt I'm trying to follow what the https://github.com/bodil/im-rs crate did. We can just have two crates; the main one for async, and a separate one for sync. We can keep using maybe_async in theory. This is unfortunately a bit confusing but it's the only way to do it. I'm working on a blog post with research about the whole async & sync stuff and I'll post it before this PR is merged to give more context and a full explanation of how it works.

Motivation and Context

This closes #221

Dependencies

None

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

An empty project with this Cargo.toml will fail:

[package]
name = "conflict"
version = "0.1.0"
edition = "2018"

[dependencies]
# Method number one
rspotify = { git = "https://github.com/ramsayleung/rspotify.git", branch = "master", features = ["client-reqwest", "client-ureq"]}

# Method number two
# rspotify-sync = { git = "https://github.com/ramsayleung/rspotify.git", branch = "fix-conflicts", features = ["client-reqwest", "client-ureq"] }
# rspotify-async = { git = "https://github.com/ramsayleung/rspotify.git", branch = "fix-conflicts", features = ["client-reqwest", "client-ureq"] }

But with this it will work:

[package]
name = "conflict"
version = "0.1.0"
edition = "2018"

[dependencies]
# Method number one
# rspotify = { git = "https://github.com/ramsayleung/rspotify.git", branch = "master", features = ["client-reqwest", "client-ureq"]}

# Method number two
rspotify-sync = { git = "https://github.com/ramsayleung/rspotify.git", branch = "fix-conflicts-2", features = ["client-ureq"] }
rspotify-async = { git = "https://github.com/ramsayleung/rspotify.git", branch = "fix-conflicts-2", features = ["client-reqwest"] }


🔄 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/ramsayleung/rspotify/pull/253 **Author:** [@marioortizmanero](https://github.com/marioortizmanero) **Created:** 9/19/2021 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix-conflicts-2` --- ### 📝 Commits (10+) - [`518e622`](https://github.com/ramsayleung/rspotify/commit/518e622ae06c5e4e5be0cf0cddfdb0bbff08063d) Attempt two at conflict fixing - [`b3536c6`](https://github.com/ramsayleung/rspotify/commit/b3536c6c498d02dcc631ed5109405d5d8b7b41a6) Merge branch 'fix-token-read' into fix-conflicts-2 - [`52ee125`](https://github.com/ramsayleung/rspotify/commit/52ee12505ae2c6ecaf84202404b67e32168d550a) More or less fix tests - [`6b0c8cb`](https://github.com/ramsayleung/rspotify/commit/6b0c8cb7baa8f19f0529a4b4cc994a9acde057d3) Generic client - [`9861d55`](https://github.com/ramsayleung/rspotify/commit/9861d5590d3b8ef60da15934823fcbabddd7f8e2) Fix examples and tests - [`c35ab7e`](https://github.com/ramsayleung/rspotify/commit/c35ab7e3e8e7e118cc1f1b8e82eddf510404b7aa) More or less fix tests and formatting - [`f151a09`](https://github.com/ramsayleung/rspotify/commit/f151a096c9ee67173b2ce7bdde929eae2ca23a64) Fix CI - [`f6efc0f`](https://github.com/ramsayleung/rspotify/commit/f6efc0fbf53c1eeb5d6a8c3fa0e287422868012b) Fix warnings - [`eb75b6c`](https://github.com/ramsayleung/rspotify/commit/eb75b6c7fe328d466c10c4bfe05aa6092c8738b8) Move rspotify-http into mod to fix last warnings - [`90a6d9e`](https://github.com/ramsayleung/rspotify/commit/90a6d9e9b8f37fc2983ef328ccb0bfe55b5bf189) Bump versions ### 📊 Changes **36 files changed** (+327 additions, -303 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+9 -5) 📝 `Cargo.toml` (+28 -54) 📝 `examples/auth_code.rs` (+3 -2) 📝 `examples/auth_code_pkce.rs` (+4 -2) 📝 `examples/client_creds.rs` (+4 -2) 📝 `examples/oauth_tokens.rs` (+4 -2) 📝 `examples/pagination_async.rs` (+4 -2) 📝 `examples/pagination_manual.rs` (+4 -2) 📝 `examples/with_refresh_token.rs` (+5 -3) ➖ `rspotify-http/Cargo.toml` (+0 -49) ➖ `rspotify-http/src/lib.rs` (+0 -43) 📝 `rspotify-macros/Cargo.toml` (+1 -1) 📝 `rspotify-model/Cargo.toml` (+1 -1) ➕ `rspotify-sync/.env` (+1 -0) ➕ `rspotify-sync/Cargo.toml` (+84 -0) 📝 `rspotify-sync/examples/device.rs` (+2 -2) 📝 `rspotify-sync/examples/me.rs` (+2 -2) 📝 `rspotify-sync/examples/pagination_sync.rs` (+2 -2) 📝 `rspotify-sync/examples/search.rs` (+3 -2) 📝 `rspotify-sync/examples/seek_track.rs` (+2 -2) _...and 16 more files_ </details> ### 📄 Description ## Description This supersedes #222, which is now kinda outdated. In this attempt I'm trying to follow what the https://github.com/bodil/im-rs crate did. We can just have two crates; the main one for async, and a separate one for sync. We can keep using `maybe_async` in theory. This is unfortunately a bit confusing but it's the only way to do it. I'm working on a blog post with research about the whole async & sync stuff and I'll post it before this PR is merged to give more context and a full explanation of how it works. ## Motivation and Context This closes #221 ## Dependencies None ## Type of change Please delete options that are not relevant. - [x] Bug fix (non-breaking change which fixes an issue) - [x] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] This change requires a documentation update ## How Has This Been Tested? An empty project with this `Cargo.toml` will fail: ```toml [package] name = "conflict" version = "0.1.0" edition = "2018" [dependencies] # Method number one rspotify = { git = "https://github.com/ramsayleung/rspotify.git", branch = "master", features = ["client-reqwest", "client-ureq"]} # Method number two # rspotify-sync = { git = "https://github.com/ramsayleung/rspotify.git", branch = "fix-conflicts", features = ["client-reqwest", "client-ureq"] } # rspotify-async = { git = "https://github.com/ramsayleung/rspotify.git", branch = "fix-conflicts", features = ["client-reqwest", "client-ureq"] } ``` But with this it will work: ```toml [package] name = "conflict" version = "0.1.0" edition = "2018" [dependencies] # Method number one # rspotify = { git = "https://github.com/ramsayleung/rspotify.git", branch = "master", features = ["client-reqwest", "client-ureq"]} # Method number two rspotify-sync = { git = "https://github.com/ramsayleung/rspotify.git", branch = "fix-conflicts-2", features = ["client-ureq"] } rspotify-async = { git = "https://github.com/ramsayleung/rspotify.git", branch = "fix-conflicts-2", features = ["client-reqwest"] } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:24:21 +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/rspotify#348
No description provided.