Repository navigation
Updates tab: no "No build for your system" on releases that have one - #260
Merged
Merged
Conversation
…your system" The Updates tab put "No build for your system" on releases that do have one (Mario Kart World v0.1.12, Hookshot v2.3.x, both with an x86_64 AppImage). Picking the file was fine; the label came from update info worked out from a different release list than the one on screen. - loadRels: a list that comes in clears S.updInfo, so the tab asks again. Before, the tab opened on the list on disk, update_info answered from that list, and the newer list fetched in the background then showed a release the answer didn't know. - askUpdInfo: an answer asked for before the list changed is dropped. - update_info: reads the releases of the project the catalog names (the ones the tab lists and installing uses), not the installed game's own repo, which still points at GitHub after a project moved (Hookshot to its own Forgejo server).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Updates tab no longer puts "No build for your system" on releases that have a build for this PC.
Seen on Linux x86_64 with two games whose releases ship an x86_64 AppImage:
adriadam10/mkw-recomp): v0.1.12 (mkw-recomp-0.1.12-x86_64.AppImage) was marked "No build for your system", with v0.1.11 installed.Hookshot-v2.3.x-x86_64.AppImage) was marked "No build for your system".Nothing here is Linux or AppImage specific. The same happens on Windows and Mac.
Why
Picking the file works.
assets::pickwith the catalog patterns finds the AppImage for every one of those releases. The label comes fromupdate_info'sbuilds, and those were worked out from a different release list than the one the tab shows. There are two ways that happens:1. The update info is older than the list (Mario Kart World). When the release list on disk is more than six hours old,
get_releasesreturns it straight away and fetches a newer one in the background. The tab draws the old list, andrelStatecallsupdate_info, which also reads the old list from disk. When the newer list arrives (releases-fresh),loadRelsdraws it, butS.updInfostill holds the answer from the old list. A release that only the new list has, the one the player most wants to see, gets "No build for your system". The same happens after Refresh (S.rels = {}).S.updInfowas only cleared bycheckUpdates.2. The update info comes from another project (Hookshot). Hookshot moved from GitHub (
NotRexed/Hookshot) to its own Forgejo server, and the catalog now namesforgejo:git.notrexed.dev/Hookshot/Hookshot. The tab lists the catalog project's releases (S.rels[a.repo]), and installing uses the catalog project too (do_install,versions). Butupdate_inforead the installed game's ownrepo, which still saysNotRexed/Hookshot. Its GitHub releases (nightly,rc,v2.1.0, ...) include none of the listed v2.3.x tags, so every listed release got the label.How
ui/app.js,loadRels: a release list that comes in clearsS.updInfo, so the Updates tab asksupdate_infoagain. That covers the background refresh and Refresh.ui/app.js, newaskUpdInfo(moved out ofrelState): an answer to a question asked before the reset is dropped. It was worked out from the old list, and storing it would bring the wrong label back.lib.rs, newlisted_repo, used byupdate_info: the catalog's project, or the game's own when the catalog doesn't list it. That's the same choiceversionsalready makes, and the same project the tab lists.Checked on the real data on disk (catalog prepared with
with_mine, cached release lists). Hookshot'sbuildsgo fromnightly, rc, v2.1.0, ...tov2.3.2, v2.3.1, v2.3.0, ..., and the update on offer from none to v2.3.2. Mario Kart World'sbuildsinclude v0.1.12 once they're asked for again with the new list.Not in this PR: the Library badge (
check_updates_for) andnewsstill read the installed game's own project. A game whose project moved doesn't get its update badge until it's installed from the new project once. That's a separate change.Tests
tests/updates-tab.test.cjs, with Mario Kart World's real tags. Both tests failed before this change withNo build for your system:lib.rs:the_updates_tab_reads_the_releases_of_the_project_the_catalog_lists: Hookshot's real projects. It failed before withleft: "NotRexed/Hookshot".the_updates_tab_reads_a_games_own_project_when_the_catalog_has_none.cargo test: 655 passed.node --test tests/*.test.cjs: 282 passed.