fix(home): games whose row went are listed again once, not at every start #191
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!191
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/LongshotLauncher:fix/relist-once"
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?
#187 lists again, at every start, the games whose row went (#141). Because it runs every time, it undoes the player's own removals: deleting an rc instance brings back an older rc folder at the next start. It also writes builds.json when that file could not be read, which can leave a newer launcher's list only in builds.json.broken. This makes it a one-time recovery and fixes the rest of the review on #187: #187 (comment)
What changed, by review point
Leftovers.ShouldRelistdecides: it runs whenever builds.json was not there (a first start, or a lost list, the case #141 is about), and once on a launcher that never ran it, remembered asRelistedLostBuildsin settings.json. That once covers players who lost rows before #153. After that, a build taken off the list stays off.LauncherService.Relistdoes nothing whenRegistry.Problem != null(LostUpdate included), andShouldRelistsays no too. Settings that could not be read count as done and aren't written over.Versions.Channels), then newest first (Versions.Compare).builds/stableandbuilds/rcat the same version become two instances, stable first. The default the list already has always stays (AddwithoutmakeDefault); a re-listed row is the default only when the list has none.UpdatePolicy.ChannelOf(b.Channel, b.Version)for every row, not the candidate version's track, so a stable row no longer holds back the rc channel's game.rc (2)-style names.InstanceFolders.ChannelNameddrops " (2)" and on, for old flat folders (builds/rc (2)) and for track folders (builds/nightly (2)/<version>). #184 had already coveredbuilds/rc/<version>, but not a numbered track folder.BuildRegistry.Gone, whatForgetGonedrops at Refresh) holds back nothing. A row on an unplugged drive (its parent folder is gone too) still does.NewestOfItsChannel).Leftovers.Unlistedis the shared scan for Find, LostUpdate and Relist: folders, links, taken, kept, read errors. The hand-writtenRankand comparator are gone.NewestOfItsChannelstays for Find only, unchanged.Nothing the player sees changes: the toast and its texts are as before, and no new texts.
Tests
tests/launcher_core/UnlistedChecks.cs, new checks:ShouldRelist: no builds.json gives yes; a list never relisted gives once; after that a removed build stays off; an unreadable builds.json (format 2, a newer launcher's) gives no.builds/stableandbuilds/rcat v3.0.0 are both listed, each on its channel, stable the default; Find offers neither.builds/rc (2)holding a stable release stays on rc;builds/nightly (2)/<version>is on nightly.Gonealready tells apart from a folder deleted by hand. Its expectation is unchanged.RelistSourceChecks:LauncherService.Relistreturns on an unreadable list, asksShouldRelistbeforeLeftovers.Relist, and remembers it.python -I tests/test_launcher_core.py: 1976 checks passed.python -I tests/test_release.py: OK.dotnet build App -c Release: 0 warnings, 0 errors. Windows 11.Follows up #187; #141.