fix(host): mod run starts the game: --mod-dev and --mod-tests are not its image #3200
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
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!3200
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/mod-run-image-arg"
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?
Summary
longshot-builder mod runended at once withcannot open --mod-devand never started the game.The game's argument loop (
host/hos_main.c) takes the first argument it does not know as its image file.mod runpasses--mod-devand no image, so the flag was taken for it.--mod-tests <folder>had the same fault. The builder's sandbox already read both as flags; the game's loop now skips them too (hos_mod_arg,host/prepare_args.h).To see the bug on
main: build a game, thenlongshot-builder --profile <profile> mod run <a mod folder>.Testing
Tested: Linux, NVIDIA RTX 3090, headless. A game built into a scratch folder from
12bcb2d06072(before a rebase onto newermain), thenmod runon a copy ofdocs/modding/examples/first-mod: the game started, loggeddev mode on, reached the intro and rendered until a 150 s timeout stopped it. The mod itself waited for its permissions to be granted, as a new mod does. On a game built frommainplus #3193, the same command ended withcannot open --mod-dev.tests/test_game_image_arg.pyruns the argument loop ofhos_main.cover command lines: it fails onmainand passes here, with g++ and clang++. The othertests/checks that read the changed files pass, excepttest_utf8_paths, not run (it needs--cargo).hos_main.cpasses a syntax check with llvm-mingw.Still to test:
mod runon a mod folder, expecting the game to start in dev mode (by hand).Measurements
Nothing to measure: no change aims at speed.
Risks
--mod-devor--mod-testswould no longer be taken as one.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (Not run.)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.mod runas starting the game.)Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
https://claude.ai/code/session_017vw8e1rSeTzGtqzZNG1YZH
Tested in game: Linux, NVIDIA RTX 3090, headless: a scratch game built from
12bcb2d06072,mod runon the first-mod example: the game started in dev mode, reached the intro and ran until a 150 s timeout.🤖 Generated with Claude Code
https://claude.ai/code/session_017vw8e1rSeTzGtqzZNG1YZH
WIP: fix(host): mod run starts the game: --mod-dev and --mod-tests are not its imageto fix(host): mod run starts the game: --mod-dev and --mod-tests are not its image