[PR #595] [MERGED] Replace version functions by constants #989

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

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/595
Author: @Johannesd3
Created: 2/9/2021
Status: Merged
Merged: 2/26/2021
Merged by: @ashthespy

Base: devHead: const_versions


📝 Commits (5)

  • 09e506e Replace version functions by constants
  • 85be0d0 Adjust documentation
  • bce4858 Add semver constant, rename "build id" env var
  • c8e45ab Modified startup message
  • 4beb3d5 Add version string CLI parameter, set name to optional parameter, default to 'librespot'

📊 Changes

6 files changed (+43 additions, -53 deletions)

View changed files

📝 connect/src/spirc.rs (+1 -1)
📝 core/build.rs (+2 -1)
📝 core/src/config.rs (+1 -1)
📝 core/src/connection/mod.rs (+3 -3)
📝 core/src/version.rs (+12 -39)
📝 src/main.rs (+24 -8)

📄 Description

Since a breaking change is coming anyway, we could also replace the fns in the version module by consts, which is closer to their actual purpose I think. I removed those strings that weren't used, but they could be added anytime. Removing them would be a breaking change.

Before merging it, the following questions should be answered.

  1. Are the names and the documentation ok?
  2. Is really every of the used constants necessary?
  3. Shouldn't the cargo package version be used somewhere?
  4. Is an own module for those five consts really necessary?
  5. Are there any dependent crates using one of the strings I removed?

🔄 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/595 **Author:** [@Johannesd3](https://github.com/Johannesd3) **Created:** 2/9/2021 **Status:** ✅ Merged **Merged:** 2/26/2021 **Merged by:** [@ashthespy](https://github.com/ashthespy) **Base:** `dev` ← **Head:** `const_versions` --- ### 📝 Commits (5) - [`09e506e`](https://github.com/librespot-org/librespot/commit/09e506ed668c582f4a9c6af928465d222c967392) Replace version functions by constants - [`85be0d0`](https://github.com/librespot-org/librespot/commit/85be0d075a93d167476b355c4a93602c808ba689) Adjust documentation - [`bce4858`](https://github.com/librespot-org/librespot/commit/bce4858b9e0bd5308376dcba90c17f14c74a969c) Add semver constant, rename "build id" env var - [`c8e45ab`](https://github.com/librespot-org/librespot/commit/c8e45ab6903d299d46acaee71d91ceec63a09457) Modified startup message - [`4beb3d5`](https://github.com/librespot-org/librespot/commit/4beb3d5e60dd4992691a6ac896aab4911a86cd2b) Add version string CLI parameter, set name to optional parameter, default to 'librespot' ### 📊 Changes **6 files changed** (+43 additions, -53 deletions) <details> <summary>View changed files</summary> 📝 `connect/src/spirc.rs` (+1 -1) 📝 `core/build.rs` (+2 -1) 📝 `core/src/config.rs` (+1 -1) 📝 `core/src/connection/mod.rs` (+3 -3) 📝 `core/src/version.rs` (+12 -39) 📝 `src/main.rs` (+24 -8) </details> ### 📄 Description Since a breaking change is coming anyway, we could also replace the `fn`s in the version module by `const`s, which is closer to their actual purpose I think. I removed those strings that weren't used, but they could be added anytime. Removing them would be a breaking change. Before merging it, the following questions should be answered. 1. Are the names and the documentation ok? 2. Is really every of the used constants necessary? 3. Shouldn't the cargo package version be used somewhere? 4. Is an own module for those five `const`s really necessary? 5. Are there any dependent crates using one of the strings I removed? --- <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:43 +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#989
No description provided.