WIP: fix(versions): a tag that is already installed is not installed a second time #351

Closed
HumanBean wants to merge 1 commit from HumanBean/LongshotLauncher:fix/no-duplicate-version into main
Owner

Versions could list the same release twice (two nightly-900 rows), because nothing stopped a second install or an update from reaching a tag another version already is. Refs #350.

What changed

  • versions::installed_copy: the listed version that already is a tag, other than the one a build replaces.
  • wizard::build checks it before a New install or an Update starts. A fresh install of an installed tag selects the existing version and says so; an update to a tag another version already is stops and says to select it or remove the older one. A Rebuild is unaffected.
  • A unit test of the rule.

Not in this PR

The versions-dir-only registry and in-place updates are not done: they touch folders.rs, home.rs, storage.rs, storage/shaders.rs, recovery.rs, live.rs, steam/ and prune.rs, which all read versions.json, and cannot be verified without running the launcher. Existing duplicate rows are not merged; Remove works on them.

Checks

cargo check --locked --tests, cargo clippy --locked -- -D warnings and cargo fmt --check pass on Linux. Not run on this PC: tests/test_launcher_core.py, Tooling's test_release.py, the unit tests, and the launcher itself.

🤖 Generated with Claude Code

Versions could list the same release twice (two `nightly-900` rows), because nothing stopped a second install or an update from reaching a tag another version already is. Refs [#350](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/issues/350). ## What changed - `versions::installed_copy`: the listed version that already is a tag, other than the one a build replaces. - `wizard::build` checks it before a New install or an Update starts. A fresh install of an installed tag selects the existing version and says so; an update to a tag another version already is stops and says to select it or remove the older one. A Rebuild is unaffected. - A unit test of the rule. ## Not in this PR The versions-dir-only registry and in-place updates are not done: they touch `folders.rs`, `home.rs`, `storage.rs`, `storage/shaders.rs`, `recovery.rs`, `live.rs`, `steam/` and `prune.rs`, which all read `versions.json`, and cannot be verified without running the launcher. Existing duplicate rows are not merged; Remove works on them. ## Checks `cargo check --locked --tests`, `cargo clippy --locked -- -D warnings` and `cargo fmt --check` pass on Linux. Not run on this PC: `tests/test_launcher_core.py`, Tooling's `test_release.py`, the unit tests, and the launcher itself. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(versions): a tag that is already installed is not installed a second time
Some checks failed
CI / What the change needs (pull_request) Successful in 7s
PR title / Conventional Commit title (pull_request) Successful in 7s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 11s
CI / Release packages and stable upgrades (pull_request) Failing after 2m13s
CI / Rust formatting, lint and tests (pull_request) Successful in 10m19s
dbf231060d
Installing a version whose tag another listed version already is, or updating a version to such a tag, listed the same
release twice (two nightly-900 rows). The build now stops before it starts and says which version has it; a fresh install
selects the existing one.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Author
Owner

Closing: this is the wrong fix. Having several instances of the same version is fine. What we want is for the launcher to read its versions from the version folders on disk (no versions.json), and to update a version in place. That work replaces this PR.

Closing: this is the wrong fix. Having several instances of the same version is fine. What we want is for the launcher to read its versions from the version folders on disk (no versions.json), and to update a version in place. That work replaces this PR.
Author
Owner

Closed, see the comment above: replaced by the read-versions-from-disk and in-place-update work.

Closed, see the comment above: replaced by the read-versions-from-disk and in-place-update work.
HumanBean closed this pull request 2026-11-28 20:14:47 +00:00
Some checks failed
CI / What the change needs (pull_request) Successful in 7s
PR title / Conventional Commit title (pull_request) Successful in 7s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 11s
CI / Release packages and stable upgrades (pull_request) Failing after 2m13s
CI / Rust formatting, lint and tests (pull_request) Successful in 10m19s

Pull request closed

Sign in to join this conversation.
No reviewers
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
MagicBeanDev/LongshotLauncher!351
No description provided.