fix(build): the plan's "N files, N jobs, <flags>" line names the game's flags again #2217
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!2217
Loading…
Reference in a new issue
No description provided.
Delete branch "dazemc/Longshot:fix/plan-line-flags"
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
A build's plan prints
N files, N jobs, <flags>just before it compiles, and that line has been printing the wrong flags: the last job's, not the game's. On Linux it says the posix object's-O2 -D_GNU_SOURCEwhere the game's lifted chunks are at-O1; in #1906's builder log it is the bare-O2that made the line look like the game had been built at the wrong level. Theobject keys:fingerprints printed above it are correct; this line is the one players paste when an update compiles everything.How to see it on main: build with
LONGSHOT_OBJ_STOREset (every player's build, and every build with a shared store). The line afterobject store …: N objects from itends in the last job's flags. Without a store the loop that does it never runs, so a plainmake_game.pybuild looks right.Why:
fl, the game's flags, is rebound bymain()'s object-store loop —for _, src, obj, fl, deps in jobs:atnx2/build.py:2215— because Python's loop variables outlive the loop.shownat:2294readsflafterwards and so reports whatever the smallest job carried. The loop's own keys are right: each object is keyed by its own job's flags, and this PR only renames the loop's variable (job_fl), leaving that behaviour and every object's key alone.What changes: one loop variable's name in
nx2/build.py, andtests/test_plan_line_flags.py(new, 3 checks: the loop does not rebindfl, it still keys each object by its job's flags, and the line still readsfl). Two of the three fail on main.Split out of #2199 (the object store's misses), where it was found while making those misses visible; review asked for it as its own change. No object key, build output or game behaviour changes.
Read first:
nx2/build.py'smain()around the object-store loop andshown, thentests/test_plan_line_flags.py.Testing
Tested: game-free only. In the game: N/A — build tooling only, no game code path changes; the evidence is the new check.
tests/test_plan_line_flags.py: 3 pass here; on main'sbuild.py2 fail (for _, src, obj, fl, deps in jobs:found in the loop,key_of(src, job_fl, deps)missing), which is the bug.7b9f70da, same command, environment and scope as the baseline: 912 passed, 23 failed, 18 skipped in 402 s (--jobs 5, 12 GiB), the same 23 names asa2dc5385's baseline (diff empty, no new name).tests/test_check_pr_description.py(26) passes.Still to test:
-O1 -DA64_POLLING -DA64_WRITE_TRACK -DA64_MARK_BITMAPon Linux) rather than the last job's (-O2 -D_GNU_SOURCE), by hand.Measurements
Nothing to measure: this changes which flags one log line prints; no object, object key, build time or game timing moves.
Risks
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named): 912 passed, 23 failed, 18 skipped on this head (7b9f70da,--jobs 5, 12 GiB, pinned headers); the 23 names are exactlya2dc5385's baseline set, no new name.main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.tests/that reads changed source is updated, not weakened. (The check that reads the changed loop istests/test_plan_line_flags.py, new here; nothing existing was weakened.)Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.Tested in game: N/A — build tooling only; no game code path changes. Evidence: the new check (two of its three fail on main) and the suite it was part of on its original branch.
Body: the 'check under tests/ that reads changed source' box added, with the truth that the check is new here (tests/test_plan_line_flags.py) and nothing existing was weakened — that is the hint pr status showed. No code change.
fix(build): the plan's "N files, N jobs, <flags>" line names the game's flags againto WIP: fix(build): the plan's "N files, N jobs, <flags>" line names the game's flags againWIP again until this head has its own full suite, as #2176/#2200 were. Untick: the suite that covered these two hunks ran on #2199's original branch (
613b775a); this branch is that change with the check in tests/test_plan_line_flags.py, and a full suite on7b9f70dais queued for after the compile arms (--jobs 5, 12 GiB, pinned headers). Targeted checks are not the suite. Expected: 23, the baseline's names.Suite on this head: 912 passed, 23 failed, 18 skipped in 402 s (--jobs 5, 12 GiB, pinned headers, worktree at
7b9f70da). The 23 names are exactly thea2dc5385baseline set, no new name. Box ticked.WIP: fix(build): the plan's "N files, N jobs, <flags>" line names the game's flags againto fix(build): the plan's "N files, N jobs, <flags>" line names the game's flags againView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.