fix(scripts): dev_packs builds a pack for a profile switch, and a renderer pack with the profile its base had #602
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
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
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!602
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/dev-packs-profile"
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?
Why
Since the renderer's profile was committed (#569), every renderer-only pack of a base of main is built without the profile its base has, so renderer A/Bs made with
scripts/dev_packs.pycompare the change plus the profile's 3-5 %. AndRX_VK_PGO=gen dev_packs.py pack, the documented way to make a counting renderer for recording a profile, builds nothing when no file changed, so a recording with it writes nothing (hit on the lab while recording #599).How to reproduce
Before, on main:
python -I scripts/dev_packs.py base <dir> ...of main: its log saysthe Vulkan back end: built with the profile .../work/longshot_vk.shipped.profdata.python -I scripts/dev_packs.py pack <dir> fix --tree <checkout>: its renderer is built with noRX_VK_PGO(no "built with the profile" line), so it differs from the base by the profile too.RX_VK_PGO=gen python -I scripts/dev_packs.py pack <dir> vk-countwith the base's tree:0 files changed since the base: nothing to build,pack vk-count: no module differs from the base's.After: step 2's pack is built with the base's
longshot_vk.shipped.profdata, and step 3 builds the renderer (the Vulkan back end: counting its branches for a profile).What changed
renderer_profile()inscripts/dev_packs.pytakes<base work>/longshot_vk.profdatawhen the base's checkout had its own profile, elselongshot_vk.shipped.profdata, the committed onemake_game.pyunpacked and built the base with.pack_route():cmd_packbuilds the renderer whenRX_VK_PGOis set and no file changed, and the game whenRX_PGOis set; otherwise the route is the changed files' as before.docs/development.md, "The renderer's play profile":packbuilds forRX_VK_PGOeven when no file changed.tests/test_vk_pgo.py'scheck_dev_packs: the committed profile's name, the checkout's own first, a counting pack, andpack_route's table;cmd_packroutes through it.Measurements
Nothing to measure: a development script; it changes which profile a pack is built with and whether a pack builds, not the game. Checked by its game-free checks.
Flags and settings
None (
RX_VK_PGOandRX_PGOare existing switches;packnow acts on them).Testing
Tested: the bug, on the lab (i7-9700K, Linux):
RX_VK_PGO=gen dev_packs.py packof an unchanged tree printed0 files changed since the base: nothing to build, and the runtime'slongshot_vk.soheld noRX_VK_PGO_FILE(not a counting build). The fix itself is not run: no checks run on the author's PC (tests/run_all.pyleft to CI or a tester).Not tested: a pack built with the fix.
Must be tested:
RX_VK_PGO=gen python -I scripts/dev_packs.py pack <base of main> vk-count, expectingthe renderer aloneandcounting its branches for a profilein its output, andstrings <pack>/longshot_vk.so | grep -c RX_VK_PGO_FILEat 1.built with the profile .../longshot_vk.shipped.profdatain its build output.Risks
A renderer pack now differs from what it was (built with the base's profile, as intended): A/B numbers taken with packs since #569 merged included the profile's effect on the pack side's absence and should be taken again. A developer with
RX_PGOin their shell gets a game pack where they got none. Reverting the commit restores the old behaviour.Issues
See #505
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named). (not run here: left to CI or a tester)third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
WIP: fix(scripts): dev_packs builds a pack for a profile switch, and a renderer pack with the profile its base hadto fix(scripts): dev_packs builds a pack for a profile switch, and a renderer pack with the profile its base had