chore: remove the parts lists and LONGSHOT_LAUNCHER_PARTS, which no release or install uses #22

Merged
HumanBean merged 1 commit from HumanBean/LongshotLauncher:chore/remove-old-build-leftovers into main 2026-11-13 09:34:39 +00:00
Owner

Why

The launcher still reads Hookshot's old "parts list" format and offers LONGSHOT_LAUNCHER_PARTS to build from a list on the PC. No release has shipped such a list, and no real install reads one: releases install through tools.lock. This removes the dead format so the code says how a version really gets installed.

Companion of MagicBeanDev/Longshot#171, which removes scripts/linux/make_parts.py (the only thing that wrote such lists), the Python builder and the MSI.

What changed

Callers checked with grep over Core/, App/, tests/, docs/, scripts/ and Longshot's builder/, nx2/, scripts/, tests/, docs/, .forgejo/ and website/. What really installs a version, and stays as it is:

  • Windows: Releases.ToolsListAsync builds a PartsList from the release's builder zip and ToolsLock.Parse of its tools.lock.
  • Linux: Toolchains.InstallAppImageAsync unpacks the AppImage and installs the tools of the tools.lock inside it.

Neither ever read a parts list.

  • Core/PartsManifest.cs, deleted (136 lines): ParseSetup (the longshot-setup.txt grammar), ParseLinux (longshot-linux.txt, with its tree/file lines and file:// links) and Parse. Their only caller was ToolsSource.ReadLocal, for LONGSHOT_LAUNCHER_PARTS.
    • What the real installs use moved to Core/ToolsLock.cs, unchanged: the Part, PartsList and ListKind records, and the name checks, now ToolsLock.NameOk/SafeName.
    • ListKind's values stay Setup/Linux, so installed toolchain.json files read as before.
  • Part.Files, removed, with the "a zip holds a file its list does not name" refusal in Toolchains.Unpack and RecordPart.Files. Only ParseLinux's file lines ever set it; tools.lock parts and the release zip always had null. An older toolchain.json's "Files": null is ignored when read.
    • The zip-slip, absolute-link, size and checksum refusals all stay.
  • LONGSHOT_LAUNCHER_PARTS, removed: ToolsSource.LocalList, ReadLocal, EnsureAsync's localList parameter, LocalFileFetcher (it read file:// links, which only a local list had), and LauncherService.LocalList with its "every channel offers the list's tag" shortcut.
    • The fetchers are now CdnFetcher(HttpFetcher) as before, minus the file:// wrapper.
    • Platforms.PartsListName (longshot-setup.txt/longshot-linux.txt) had no caller and goes too.
  • Docs: README's Core/ row and its LONGSHOT_LAUNCHER_PARTS row, CONTRIBUTING's "try a build without any release" paragraph, and docs/releases.md's LONGSHOT_LAUNCHER_PARTS line.
    • docs/releases.md is byte-identical with Longshot's, which has the same edit in #171 (cmp checked). scripts/release.py, tests/test_release.py and RELEASING.md are unchanged and still identical.
  • Tests (tests/launcher_core):
    • ManifestChecks deleted: the two list grammars.
    • ToolchainChecks builds its lists as PartsList/Part records instead of parsing text. It keeps every install check: reuse between versions, sysroot link rebasing, modes, wrong checksum, too large, ../ names, outward and absolute links, cancel, the Windows layout and prune. It drops the "file its list does not name" check.
    • ScreenChecks loses the local list and LocalFileFetcher block.

Flags and settings

Flag What it does Default now Recommendation Helps on Doesn't help on Untested on
None added. Removed: LONGSHOT_LAUNCHER_PARTS (build from a parts list on this PC, development) - - - - - -

Measurements

main: 2e708923 (2026-11-13)
this PR: chore/remove-old-build-leftovers @ b57ce8f1
Hardware: Ryzen desktop, CachyOS Linux (game-free checks only)
Scene: none, no game run
Method: python -I tests/test_launcher_core.py --strict --longshot <Longshot checkout> (main with Longshot's main, this PR with Longshot #171's branch) and python -I tests/test_release.py, under nice -n 19 ionice -c3, once on each side (the PC was in use, so one run each). Line counts from jj diff --stat. Nothing here is a performance change.
How to reproduce: the same commands in a checkout of each commit

main @ 2e708923 this PR @ b57ce8f1
launcher core checks 609 checks passed 579 checks passed
tests/test_release.py OK OK
lines, whole diff (14 files) +88 / -342
main @ 2e708923:     launcher core: 609 checks passed
this PR @ b57ce8f1:  launcher core: 579 checks passed
30 fewer: ManifestChecks (the two list grammars), the "file its list does not name" check, and the local list checks

Testing

Tested:

  • The core checks and test_release.py, once on main and once on this PR (above), on Linux.
  • The launcher app built in Release with warnings as errors (dotnet build App -c Release -p:TreatWarningsAsErrors=true): 0 warnings, 0 errors.
  • Longshot #171's whole game-free suite passes against this pair.

Not tested:

  • The launcher's window, and a real install from a release on Windows or Linux. The install path (ToolsListAsync, InstallAsync, InstallAppImageAsync) only lost Part.Files, which a release never set, and the core checks run it on authored releases for both systems.

Needs other testers:

  • Windows and Linux: build a version from the launcher built from this commit, expecting the builder and its tools to install as before, and a second version to reuse the unchanged tools (request to open)

Screenshots

Nothing on screen.

Risk and rollback

An install that still relied on Part.Files or a local list would change. Only LONGSHOT_LAUNCHER_PARTS lists did, and that was for development; releases never did.

Reverting the commit restores everything. Installed toolchains are read as before.

Checklist

For everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description).
  • Rebased on current main.
  • python -I -B tests/run_all.py run and passing (any failure that also fails on main is named above).
  • Tested in the game, or what wasn't is named under Testing.
  • Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests).
  • Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. (Here one run each, as asked while the PC was in use: see Method.)
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

If applicable

  • Flags noted, and the switch reference updated (docs/development.md, the README).
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Docs updated.
## Why The launcher still reads Hookshot's old "parts list" format and offers `LONGSHOT_LAUNCHER_PARTS` to build from a list on the PC. No release has shipped such a list, and no real install reads one: releases install through `tools.lock`. This removes the dead format so the code says how a version really gets installed. Companion of MagicBeanDev/Longshot#171, which removes `scripts/linux/make_parts.py` (the only thing that wrote such lists), the Python builder and the MSI. ## What changed Callers checked with grep over `Core/`, `App/`, `tests/`, `docs/`, `scripts/` and Longshot's `builder/`, `nx2/`, `scripts/`, `tests/`, `docs/`, `.forgejo/` and `website/`. What really installs a version, and stays as it is: - **Windows:** `Releases.ToolsListAsync` builds a `PartsList` from the release's builder zip and `ToolsLock.Parse` of its `tools.lock`. - **Linux:** `Toolchains.InstallAppImageAsync` unpacks the AppImage and installs the tools of the `tools.lock` inside it. Neither ever read a parts list. - **`Core/PartsManifest.cs`, deleted** (136 lines): `ParseSetup` (the `longshot-setup.txt` grammar), `ParseLinux` (`longshot-linux.txt`, with its `tree`/`file` lines and `file://` links) and `Parse`. Their only caller was `ToolsSource.ReadLocal`, for `LONGSHOT_LAUNCHER_PARTS`. - What the real installs use moved to `Core/ToolsLock.cs`, unchanged: the `Part`, `PartsList` and `ListKind` records, and the name checks, now `ToolsLock.NameOk`/`SafeName`. - `ListKind`'s values stay `Setup`/`Linux`, so installed `toolchain.json` files read as before. - **`Part.Files`, removed**, with the "a zip holds a file its list does not name" refusal in `Toolchains.Unpack` and `RecordPart.Files`. Only `ParseLinux`'s `file` lines ever set it; tools.lock parts and the release zip always had `null`. An older `toolchain.json`'s `"Files": null` is ignored when read. - The zip-slip, absolute-link, size and checksum refusals all stay. - **`LONGSHOT_LAUNCHER_PARTS`, removed**: `ToolsSource.LocalList`, `ReadLocal`, `EnsureAsync`'s `localList` parameter, `LocalFileFetcher` (it read `file://` links, which only a local list had), and `LauncherService.LocalList` with its "every channel offers the list's tag" shortcut. - The fetchers are now `CdnFetcher(HttpFetcher)` as before, minus the `file://` wrapper. - `Platforms.PartsListName` (`longshot-setup.txt`/`longshot-linux.txt`) had no caller and goes too. - **Docs**: README's `Core/` row and its `LONGSHOT_LAUNCHER_PARTS` row, CONTRIBUTING's "try a build without any release" paragraph, and `docs/releases.md`'s `LONGSHOT_LAUNCHER_PARTS` line. - `docs/releases.md` is byte-identical with Longshot's, which has the same edit in #171 (`cmp` checked). `scripts/release.py`, `tests/test_release.py` and `RELEASING.md` are unchanged and still identical. - **Tests** (`tests/launcher_core`): - `ManifestChecks` deleted: the two list grammars. - `ToolchainChecks` builds its lists as `PartsList`/`Part` records instead of parsing text. It keeps every install check: reuse between versions, sysroot link rebasing, modes, wrong checksum, too large, `../` names, outward and absolute links, cancel, the Windows layout and prune. It drops the "file its list does not name" check. - `ScreenChecks` loses the local list and `LocalFileFetcher` block. ## Flags and settings | Flag | What it does | Default now | Recommendation | Helps on | Doesn't help on | Untested on | |---|---|---|---|---|---|---| | None added. Removed: `LONGSHOT_LAUNCHER_PARTS` (build from a parts list on this PC, development) | - | - | - | - | - | - | ## Measurements main: 2e708923 (2026-11-13) this PR: chore/remove-old-build-leftovers @ b57ce8f1 Hardware: Ryzen desktop, CachyOS Linux (game-free checks only) Scene: none, no game run Method: `python -I tests/test_launcher_core.py --strict --longshot <Longshot checkout>` (main with Longshot's main, this PR with Longshot #171's branch) and `python -I tests/test_release.py`, under `nice -n 19 ionice -c3`, **once on each side** (the PC was in use, so one run each). Line counts from `jj diff --stat`. Nothing here is a performance change. How to reproduce: the same commands in a checkout of each commit | | main @ 2e708923 | this PR @ b57ce8f1 | |---|---|---| | launcher core checks | 609 checks passed | 579 checks passed | | tests/test_release.py | OK | OK | | lines, whole diff (14 files) | | +88 / -342 | ``` main @ 2e708923: launcher core: 609 checks passed this PR @ b57ce8f1: launcher core: 579 checks passed 30 fewer: ManifestChecks (the two list grammars), the "file its list does not name" check, and the local list checks ``` ## Testing **Tested:** - The core checks and `test_release.py`, once on main and once on this PR (above), on Linux. - The launcher app built in Release with warnings as errors (`dotnet build App -c Release -p:TreatWarningsAsErrors=true`): 0 warnings, 0 errors. - Longshot #171's whole game-free suite passes against this pair. **Not tested:** - The launcher's window, and a real install from a release on Windows or Linux. The install path (`ToolsListAsync`, `InstallAsync`, `InstallAppImageAsync`) only lost `Part.Files`, which a release never set, and the core checks run it on authored releases for both systems. **Needs other testers:** - Windows and Linux: build a version from the launcher built from this commit, expecting the builder and its tools to install as before, and a second version to reuse the unchanged tools (request to open) ## Screenshots Nothing on screen. ## Risk and rollback An install that still relied on `Part.Files` or a local list would change. Only `LONGSHOT_LAUNCHER_PARTS` lists did, and that was for development; releases never did. Reverting the commit restores everything. Installed toolchains are read as before. ## Checklist ### For everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`). - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` run and passing (any failure that also fails on `main` is named above). - [x] Tested in the game, or what wasn't is named under Testing. - [x] Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests). - [x] Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. (Here one run each, as asked while the PC was in use: see Method.) - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### If applicable - [x] Flags noted, and the switch reference updated (docs/development.md, the README). - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [x] Docs updated.
chore: remove the parts lists and LONGSHOT_LAUNCHER_PARTS, which no release or install uses
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
b57ce8f1f5
Releases install through tools.lock (Windows: the builder zip and its tools; Linux: the AppImage and the tools.lock in it).
The parts list grammar (Core/PartsManifest.cs), the local list (LONGSHOT_LAUNCHER_PARTS, LocalFileFetcher) and
Platforms.PartsListName are gone; Part, PartsList and the name checks the installs use move to Core/ToolsLock.cs.
HumanBean deleted branch chore/remove-old-build-leftovers 2026-11-13 09:34:40 +00:00
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!22
No description provided.