WIP: feat(mods): say that a mod's code module is not loaded #940
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
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/Longshot!940
Loading…
Reference in a new issue
No description provided.
Delete branch "snaildev99/Longshot:mods/module-note"
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?
Type: feat · Risk: low · Tested on: Windows 11, RTX 3090 (in the game, and the game-free checks) · Needs: Linux, any GPU: one game-free test
Why
A mod made for the console or an emulator sometimes ships a compiled code module in its
exefsfolder(
subsdk9, or a wholemain). Longshot builds the game's code ahead of time and cannot run such a module, so thatpart of the mod does nothing. Until now the Mods tab listed the mod as if it worked and the module was left out
without a word, which reads as a broken mod. This was promised on #134 as its first follow-up. Depends on #134.
What changed
The Mods tab and the log now say when a mod has a code module and that it is not loaded.
exefs_module()inhost/mods.crecognises the console loader's module names (rtld,main,sdk,subsdk0..subsdk9, any case, no extension);exefs_status()logs one line per module;mod_text()names themin the detail line and explains in the note that they are not loaded, that the mod's patch files may do nothing
without them, and, for a mod with nothing else, that it does nothing here.
docs/mods.md.Measurements
Verdict: nothing to measure: a few lines of text at the start, read from a folder listing that was already made.
Flags and settings
None
Testing
Tested:
exefs/subsdk7(Ragdoll Button) beside a mod with a built patch. The log hasmods: ragdoll-button: ExeFS subsdk7: a code module: not loaded (...), and the Mods tab's note for it says its code module (subsdk7) is not loaded and that the mod does nothing here; the other mod's lines are as before.tests/test_mods_modules.py(new) buildshost/mods.cover made-up folders andchecks six mods' log lines and Mods tab lines (a module only; a module beside a built patch; two modules in mixed
case beside
main.npdm,subsdk10, a.stub, a folder and a text file that do not count; a patch-only and aRomFS-only mod unchanged; a mod switched off). It fails on the base and passes here.
tests/run_all.py: no newfailures against the base (the failures on both are this PC's, as on main).
Not tested: the test's Linux half (it uses host/posix as
tests/test_mods_size_table.pydoes).Must be tested:
python -I -B tests/test_mods_modules.py, expectingPASS: code modules: ...(Test Farm:@Beanstalk linux, run tests/test_mods_modules.py)
Risks
What could break: nothing that runs: only the Mods tab's text and the log.
Turning it off: revert the commit.
Compatibility: Nothing changes.
Checklist
Everyone
type(scope): description) of the status line's type.main. (on #134's head)python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.mainand passing here.🤖 Generated with Claude Code
Tested in game: Windows 11, RTX 3090 (driver 610.88), a build of #134's head
4f8b975dwith this branch merged in, the Mods tab: a mod that ships only exefs/subsdk7 is listed with the note that its code module (subsdk7) is not loaded and that the mod does nothing here, and the log has the 'a code module: not loaded' line; a mod with a built patch beside it reads as before. This branch is stacked on #134 (it depends on it), so the diff shows #134's commits too until that merges.a9642259a7607f272346607f272346e41066eb26Moved onto #134's new head
fafc7ab2(it was rebased onto main @343a1dfa): heade41066eb. No conflict. One line more in tests/test_mods_modules.py: main's host/mods.c asks texts.c for a path now (#604), so the test's fixture has a stand-in for hos_texts_romfs beside the one for the prompts. The test passes; not built or played at this head.Moved onto #134's new head
fb2a419c(rebased onto main @e4d035e9; the Mods tab's functions are API version 25 there, after main's audio outputs): head2fe70f7d. No conflict, no change in this branch's own files; its tests pass at this head. Not built or played at it.e41066eb262fe70f7df22fe70f7df2732f5fee6eMoved onto #134's new head
3fbc327a(the list of mods ismods.jsonthere now: #134 (comment)). Head732f5fee.No conflict; the commits are unchanged. One commit on top:
tests/test_mods_modules.pybuildshost/mods_list.cand has a stand-in forhos_options_file(and forSleepin the Linux fixture).tests/run_all.pyon Windows: nothing fails that #134's head passes. Not built or played at this head; the Linux halves of the changed fixtures were read, not run.732f5fee6eb370f83d1dMoved onto #134's new head
2b52cd1b(#134 was rebased onto main @8a4aa282: the Mods tab's functions are API version 26, and the patches' hash is named in the lift's key after main's #22: #134 (comment)). Headb370f83d.No conflict; the commits are unchanged.
tests/run_all.pyon Windows: nothing fails that #134's head passes. Not built or played at this head.b370f83d1d7a92274ca3Moved onto #134's new head
c5cead8d(#134 was rebased onto main @ac778751and brings main's new players' mods guide in line with it: #134 (comment)). Head7a92274c.No conflict; the commits are unchanged.
Nothing fails in
tests/run_all.pyon Windows that #134's head passes. Not built or played at this head.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.