chore: remove the builders' leftovers of the old self-update #161
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!161
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:chore/builder-update-cleanup"
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?
Why
Since #13 the Longshot Launcher installs and updates each version's builder, but the builders still carry Hookshot's self-update: about 800 lines of release lookup, update tracks, parts download and install code that nothing reaches, plus tests and docs that describe it as if it ran. This removes what is dead so the builders say what they really do.
What changed
Removed, with the callers checked (grep over
builder/,nx2/,scripts/,tests/,docs/,.forgejo/, the WPF builder, and LongshotLauncher'sCore/andApp/):builder/linux/linux_update.py(581 to 103 lines). Kept whatlongshot_builder.pycalls:data_root(the old NGX SDK folder),release_key,older_version,tools_tag,running_root,game_version,game_exe, andchoose_mode, now withoutlatest/switch. Removed:Part,Manifest,parse_list,read_manifest,install,installed_apprun,fetch_manifest,startup_manifest,fetch_bytesand the download, unzip and symlink helpers,Cancelled): only reachable frombegin_updatewhen the running tools were not the target, which needsLONGSHOT_LATEST_TAGor--tagfrom the old self-restart; withoutLONGSHOT_LINUX_LISTit could only raise "The builder does not download versions".TRACKS,track_of,update_target,newest_release): the Track menu is gone from the window already; the savedtracksetting could still flipswitching()on.Core/Toolchains.csInstallAppImageAsync), installstools.locktools itself, and runsnx2/make_game.pydirectly (Core/MakeGameCommand.cs); it never starts the builder with--update,--tagor--fetched.builder/linux/linux_tools.pyonly nameslinux_updatein a docstring.builder/linux/longshot_builder.py: removedlookup_latest(LONGSHOT_LATEST_TAG),self.latest, the update track (TRACK_NAMES,track_id,switching,on_track_changed), the "Update builder" mode, the download thread and its Cancel (stop_update, thelatest/note/do-build/update-errorqueue messages), and the--tag,--fetched,--allow-downgrade-fromhandoff of the old self-restart.begin_updatenow asks before building a newer game back (as before) and startsmake_game.py --updateat once. The buttons are unchanged for a player: with no newest version known (always, since the builder asks no server) the old code already reduced to Build / Update (an older game, built again with this version) / Play.builder/linux/longshot-folder: removed the fallback to$XDG_DATA_HOME/longshot/builder/currentandversions/<tag>/AppRun. Onlylinux_update.installwrote those, so no Longshot install has them; when the recordedbuilder=is gone, the game starts, as it already did.builder/linux/AppRunand the module docstrings:--update <dir>builds that folder again with this version;--launchoffers Update when the builder is newer than the game.builder/py/longshot_builder/updater.py(81 to 25 lines): removedlatest_tag(LONGSHOT_LATEST_TAG),Install,run_latest_setupand the--tag/--fetchedrestart.update_folder(ui, folder)builds the folder again with these tools, as the WPFUpdater.csdoes.window.py: no "Update builder" mode, no release thread on the first page or the launcher page, no deaddownload/note/download_progress;longshot_builder_start.pytakes no--tag/--fetched.restartstays (Repair).Updater.cskeeps--update <folder>(MainWindow's launcher page and Update useUpdateFolder) and the launcher link, nowLauncherDownload= https://longshot.magicbean.dev/download.MainWindow.xaml.cs: removed the deaddownloadtoken source,DownloadToken,DownloadProgressandNote(no caller since the self-update went).Updater.cs,builder/setup/setup.c(LAUNCHER_DOWNLOAD),builder/py/longshot_builder/__init__.py(LAUNCHER_DOWNLOAD, used bysetup_parts.py).docs/linux-update-sysroot.md,docs/linux-builder-version-selection.mdand its screenshot (nothing linked them; they describe the updater, tracks and installed-builder fallback). What still holds (the sysroot copies host aliases by value; the folder launcher starts the recorded builder, else the game; Update and the downgrade question) is now a paragraph indocs/development.md. Fixed self-update wording indocs/windows-portable-builder.md, code comments (Finder.cs,BuilderSettings.cs,MainWindow.xaml.cs,core.py,setup.c,make_game.py),README.md's AppImage--updateline under Build from source,CONTRIBUTING.md's "no releases of its own yet / use the newest Hookshot release", and the issue forms' "Update track" field (now "Channel", the launcher's).CHANGELOG.mddeleted (Hookshot's, up to 2.2.0-rc.1; nothing writes it). Hookshot's history stays in NotRexed/Hookshot'sCHANGELOG.md; Longshot's release notes are on each release page, written by git-cliff (cliff.toml,release.py notes).docs/versioning.mdsays so now. Veto here if it should stay.scripts/linux/make_parts.pykept (the launcher'sLONGSHOT_LAUNCHER_PARTSreads such a list for trying a version out), its docstring corrected: there is norelease.py upload-parts, and a release ships the AppImage, notlongshot-linux.txt.builder/linux/part_links.pystays with it.tests/test_linux_update_cancel.py(the cancel of a download and install that no longer exist) andtests/test_update_tracks.py(tracks,newest_release,fetch_manifest), replaced bytests/test_no_release_lookup.py(version order, the buttons, and no builder, setup or game naming a release lookup,LONGSHOT_LATEST_TAG,LONGSHOT_LINUX_LIST,--fetchedor the removed functions).tests/test_linux_update.pykeeps its checks of what stays (the buttons,running_root/tools_tag, the packaged folder, the folder launcher,make_partspackaging) and drops the 21 install, download, unzip and installed-builder checks.tests/test_linux_downgrade.pychecks the slimmed handlers (decline, accept, DLSS, launcher,--update) instead of the handoff and the parts-list mismatch.test_builder_update_back.pyandtest_make_game_ngx.pylose their stubs oflatest_tag/switching.Unsure, kept:
builder/py,scripts/make_py_builder.py) is built by no workflow and released nowhere; its first start installs tools throughsetup_parts.py, which only works withLONGSHOT_SETUP_LIST. Its update hook is trimmed here; whether the whole builder goes is a separate call.setup.c'sLONGSHOT_SETUP_LISTinstall path (development lists) is untouched.Left for LongshotLauncher (not this repo): its
Core/PartsManifest.cscomments point atlinux_update.py parse_listand_safe_name, which are gone.docs/releases.md(byte-identical in both repos, so not changed here) still says "Hookshot'sCHANGELOG.mdin Longshot is history".Flags and settings
LONGSHOT_LATEST_TAG(both builders) andLONGSHOT_LINUX_LIST(Linux builder), development hooks of the old self-updateMeasurements
main:
1be180bb(2026-11-13)this PR: chore/builder-update-cleanup @
bcca9b1dHardware: Ryzen desktop, CachyOS Linux (game-free checks only)
Scene: none, no game run
Method:
LONGSHOT_VULKAN_HEADERS=/usr/include python -I -B tests/run_all.py, main and this PR interleaved, 2 runs each; line counts fromjj diff --statHow to reproduce: the same command in a checkout of each commit
1be180bbbcca9b1dbuilder/,nx2/,scripts/tests/Testing
Tested: the whole game-free suite on Linux (above), main and this PR interleaved twice: the same two failures on both (
test_bake_portability.py, nozstandard;test_builder_log_read_only.py, no Tk), nothing else; the changed checks alone (test_linux_update.py,test_linux_downgrade.py,test_no_release_lookup.py,test_builder_update_back.py,test_make_game_ngx.py,test_linux_builder_stop_reason.py). The WPF builder built withdotnet build builder/LongshotBuilder.sln -p:EnableWindowsTargeting=true(0 warnings, 0 errors);setup.ccompiled with tools.lock's llvm-mingw (scripts/builder_package.py llvm-mingw --host linux, the CI command line,-Wall, no warnings), and the new link is in the exe's strings. pyflakes on the changed Python files: nothing new against main.Not tested: the Linux builder window (this PC's Python has no Tk; the AppImage brings its own), the Python builder's window (no PySide6 here), the WPF builder on Windows, and a real game Update. No game run: nothing here touches the game, the renderer or
make_game.py's build.Needs other testers:
longshotlauncher page, expecting the same buttons as before, no "Update builder", and Update going straight to "Compiling what changed" (T-HHWZ)Screenshots
Nothing on screen beyond wording: the Linux builder's status line for an older or newer game, and the launcher page's line, which no longer starts as "Checking for updates...".
Risk and rollback
A player-facing path that still used the removed code would break: the Linux builder's Update, its launcher page, or
--update <folder>. The game-free checks run the real handlers for those; the launcher never called the removed paths. Reverting the commit restores everything; nothing is migrated or deleted on players' PCs.Reviewer notes
Start with
builder/linux/longshot_builder.py(apply_mode,apply_launch,begin_update) andbuilder/linux/linux_update.py. The Python builder and the CHANGELOG deletion are the two calls to make.Issues
See #13
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
tests/that reads changed source updated in this PR, not weakened.WIP: chore: remove the builders' leftovers of the old self-updateto chore: remove the builders' leftovers of the old self-update