WIP: build: add just command recipes #810
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!810
Loading…
Reference in a new issue
No description provided.
Delete branch "Marcuss2/Longshot:builder/just-command-recipes"
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: build · Risk: low · Tested on: Linux, game-free checks and a full local build; no GPU run · Needs: Windows command-line smoke test, no GPU
Why
The repository's build, test, team and packaging commands were spread across scripts and guides, and a just
wrapper split an escaped .nup filename at every space. Contributors need one readable command index whose recipes
preserve the documented commands and arguments. No existing issue covers this command-index work.
What changed
Add a root justfile with 29 thin recipes, a listing-only default, full-test and CI-safe lint commands, and argument-safe
buildforwarding using just 1.59.0's opt-in list support. Keep direct commands documented, modernize contributor andagent guides without changing clone instructions, and pin just plus actionlint in the workflow-lint CI job. Windows uses
an explicit
cmd.exe /cshell so barejustdoes not requiresh.justfile: command groups for checks, repository rules, team commands, the game and Linux packaging; barejustlists recipes,
just testruns the game-free suite, andjust lint --checkfails on formatting or workflow-lint errors.justfile:builddouble-quotes each forwarded argument separately, preserving whitespace and brackets. Other scriptbodies remain in their scripts rather than being inlined.
tests/test_justfile.py: 14 checks for the documented copy, 29-recipe manifest, one-line bodies, documented-commandparity, listing-only default behavior and the escaped .nup path regression.
CONTRIBUTING.md,AGENTS.md,docs/development.md,docs/justfile.md: just-first commands and agent discovery,with canonical direct commands and clone steps retained.
.forgejo/workflows/ci.yml: the workflow-lint job downloads pinned just 1.59.0 and actionlint 1.7.12, verifies bothSHA-256 hashes, and runs
just lint --check. Other CI jobs keep direct commands and do not download just.Measurements
N/A — no fps, VRAM, load-time or AppImage-size claim; command wrappers, documentation, checks and CI setup only.
Flags and settings
None — no game flags or settings changed. The justfile explicitly enables just 1.59.0's
unstableandlistssettings sobuildcan quote each argument separately; CI pins that just version.Testing
Tested: on Linux, with no dump needed except for the explicitly requested local build:
just lint --checkwith just 1.59.0 and CI-pinned actionlint 1.7.12: passed; the archive's SHA-256 was verified.python -I -B tests/run_all.py justfile: 1 passed. Directpython -I -B tests/test_justfile.py: 14 checks passed.just test: 517 passed, 13 failed, 64 skipped. Basemain @ aa95d35f(python -I -B tests/run_all.py): 516 passed,13 failed, 64 skipped, with the exact same failure set. The only delta is the new passing
tests/test_justfile.py.The pre-existing failures are
test_lift_cleanup_error.py,test_make_game_cache.py,test_crash_dialog.py,test_cpm_discovery.py,test_env_on.py,test_appimage_player_build.py,test_options_budget_once.py,test_linux_preflight.py,test_pipeline_tour.py,test_mods_size_table.py,test_readback_late.py,test_vk_pgo.pyandtest_walk_key.py.just buildwith an escaped .nup path containing spaces and brackets: full Linux build completedwith exit code 0 and
@@done /mnt/sdd1/games/Longshot/build. Before the fix it failed during argument parsing.63e949db:just --list, 14 justfile tests, formatting and spaced/bracketed syntheticpath quoting passed; bare
justexposed just 1.59.0's defaultshdependency.b8602afdpins the tester's confirmedcmd.exe /coverride; Linux justfile manifest checks and barejustpass on that head. Windows retest is below.just --fmt --check --unstable,just,just --list,git diff --check, and documented build/check-dump/test/lintdry runs: passed. No .nup file is staged or tracked.
Not tested: Windows
cmdonb8602afd(the previous head exposed the bare-justshell failure), the WindowsPowerShell
just runrecipe, or an in-game GPU run. No game code changed; the corrected Windows shell needs a retest.Must be tested:
b8602afdwith just 1.59.0 and noshin PATH, run barejust, expecting the complete recipe list without a shell override; repeat the spaced/bracketed syntheticjust builddry-run, expecting one intact quoted path, and run the 14 justfile tests, expecting all to pass. No game dump is needed; report the commands and output on this PR.Risks
Low: contributor command wrappers and one CI setup step. A just older than 1.59.0 does not provide the list support used
by
build; direct commands remain documented and no game source changes. Generic passthroughs other thanbuildretainthe documented shell-quoting limitation. No server protocol or behavior changes.
Compatibility
MkwVkHost/MkwVkRendererABI: unchanged,MKWVK_API_VERSIONnot bumped.nx2/make_game.pyarguments reach the builder; only their shell quoting is fixed.Checklist
Everyone
type(scope): description) of the status line's type.main. The branch is based onaa95d35f, which still matchesorigin/main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named). The exact same 13 base failures are named above; this PR adds one passing check.third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
tests/that reads changed source updated in this PR, not weakened.tests/test_justfile.pycovers the new justfile and its documented commands.Added the applicable source-check and documentation checklist boxes identified by pr status; no code changed.
Aligned the Docs updated checklist entry with the exact template wording; no code changed.
Windows smoke test on PR head
63e949dbe1a67697434b86b8197b39f409bbd03f(Windows 11, PowerShell and cmd, officialjust 1.59.0):just --list: PASS; the 29 recipes are listed.just: FAIL in both PowerShell and cmd:recipe default could not be run because just could not find the shell sh: program not found.just --shell cmd.exe --shell-arg /candjust --shell powershell.exe --shell-arg -Command: PASS; the default recipe lists the recipes with either override.just --dry-run build --nup 'C:\Fake Folder\Game [v131072].nup' --out 'C:\Fake Folder\Longshot [test]': PASS; each synthetic path appears intact and double-quoted in the generated Python command. No build or game file was used.python -I -B tests/test_justfile.py: PASS (14 tests).just --fmt --check --unstable: PASS.The justfile leaves
shellandwindows_shellunset.just1.59.0 defaults toshon Windows even when launched from PowerShell/cmd, so the documented barejustentry point does not work on a Windows setup withoutshin PATH. A Windows shell setting or a platform-specific default-list approach should fix this; a runtime test of barejustwould catch it.@Rogasse Thanks for catching this.
b8602afdnow sets windows-shell to the cmd.exe /c configuration you confirmed, so bare just no longer depends on sh on Windows. Linux bare just and all 14 justfile tests still pass. Please retest that head without an override, including the synthetic spaced/bracketed build path. The PR description records your original results and the remaining retest.Review of
b8602afd38: changes requested for argument forwarding.The Windows shell correction works. With the checksum-verified official just 1.59.0 Windows binary and a PATH containing no sh, bare just lists the recipes, just --fmt --check --unstable passes, and all 14 tests/test_justfile.py checks pass. The current description checker also reports no errors.
Two runtime reproductions remain: non-build recipes split argument values containing spaces, and build corrupts a Windows output directory ending in a backslash. Inline comments give the cases. I used synthetic paths and replaced the Python command with a local argv recorder; no game dump, game build, or Forgejo write was involved in those reproductions. Please test the invoked process's argv rather than only the dry-run command text.
I did not run the full suite or a game build. This review covers the command wrappers at the named head; it is not an approval of the WIP PR.
@ -0,0 +88,4 @@# forge.py pr <create|update|status|view|ready|wip|comment|checkout|edit> ...@pr *args:{{ py }} -I scripts/forge.py pr {{ args }}[P2] Preserve argument boundaries in the non-build wrappers. In a Windows runtime test, just pr update 1 --comment "what changed and why" reached the local argv recorder as four separate words after --comment. Similarly, just check-dump with one synthetic argument C:\Fake Folder\Game [v131072].nup reached it as three path fragments (line 109). No remote command or game build was executed: PYTHON pointed to a local argv recorder. The documentation acknowledges this limitation, but AGENTS.md and CONTRIBUTING.md now replace working direct commands with these wrappers, including multiword --comment examples. Please preserve individual arguments in these recipes and add actual argv regression checks; dry-run output alone cannot verify the shell boundary.
@ -0,0 +102,4 @@# A game folder from a dump: just build --nup /path/game.nup --out /games/Longshot@build *args:{{ py }} -I nx2/make_game.py {{ prepend('"', append('"', args)) }}[P2] Escape trailing Windows backslashes when quoting build arguments. On Windows with just 1.59.0 and this cmd.exe /c setting, passing one --out argument consisting of C:\Fake Folder\ caused the invoked argv recorder to receive C:\Fake Folder" instead: the final backslash escapes the closing quote under Windows argument parsing. A space/bracket path without a trailing backslash passes, so the existing regression does not catch it. Please use Windows-aware argument escaping or a forwarding mechanism that avoids reconstructing the command line, with a runtime test for a directory ending in a backslash. This was reproduced with synthetic paths and a local argv recorder, without running make_game.py.
Closing this now that upstream has adopted mise (mise run lint / mise run test), which covers the same command entry-point need and makes this justfile approach redundant. Thanks @Rogasse and @futondestroyer for the Windows testing and detailed argv reviews; they were valuable even though this PR will not proceed.
Pull request closed