test: the Linux cursor check compiles on Windows #3121
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3121
Loading…
Reference in a new issue
No description provided.
Delete branch "llun/Longshot:claude/cool-cartwright-6051ba"
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
tests/test_cursor_hidden_linux.pydoes not compile on Windows: since #3104 its stand-in setsesc_had_captureand never reads it, which clang refuses under-Werror. The check now reads it: a new capture must clear Esc's note, asmouse_captureinhost/posix/display_sdl.cdoes. Only this test changes; nothing the game runs does.To see it on
main: runmise run test -- --exact tests/test_cursor_hidden_linux.pyon Windows with llvm-mingw's clang.This pull request also had a formatting fix in
settings_host.rs. #3069 made the same change onmain, so it is gone from here.Testing
Tested: Windows 11, llvm-mingw's clang, on main
7c3c16f0aplus this commit; main's version of the test ran there too.test_cursor_hidden_linux: main's version fails (it does not compile), this one passes. With the line indisplay_sdl.cthat clears the note removed on purpose, it fails at the new check (run onca5d30781; the line is restored, and that file has not changed since).6318f4056: 831 checks, 831 pass, run in batches. It was not run again, since only this one test differs frommain.mainthen:test_utf8_paths,test_run_all_junit,test_reshade_fx,test_lifter. #3124 and #3110 have fixed causes of that since; they were not run again.Still to test: None
Measurements
Nothing to measure: a test.
Risks
None known: the test asks for one thing more. A revert is enough. Players notice nothing.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (Before this rebase, as Testing says.)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.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
@review
Recommendation: Request changes. The cursor test fix and the unrelated Rust formatting fix are two topics in one pull request, contrary to the repository’s one-topic rule.
The cursor check reads Esc’s capture note so its fixture compiles with Windows clang, and the Rust change only adjusts formatting. Neither changes player behavior.
Blocking (1): must change before merging.
game/crates/api/src/services/settings_host.rs:1484: This unrelated formatting fix accompanies the cursor test fix, but the repository requires one topic per pull request. (more on the line) Do: Move the Rust formatting fix to a separate pull request, leaving this one focused on the cursor check.@fixcan do L1.Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes. The author reports that the cursor check failed to compile on main and passed on this head with Windows llvm-mingw clang. Removing the capture-reset line also made the new assertion fail. This is not a performance change.
Other systems: The test compiles the same extracted host function on supported development platforms; the author reports a Windows run. The Rust diff changes whitespace only, so it does not change game behavior on either OS or any GPU.
Switches: None added, changed or removed.
Reviewed:
a7e3baba77againstecca8ac388: Read the repository rules, PR template, commits, diff, cursor test and capture implementation. Read the changed Rust condition and surrounding code; skimmed the rest of settings_host.rs and the tests referencing it. docs/review-checklist.md and the sibling Tooling AGENTS.md were absent.; nothing run (a code review).Checked and fine:
Testing: No commands from the project were run during review. The author reports 831 passing checks before the rebase, and reran the cursor check and rustfmt afterward; CI is still running.
Overlaps and merge order: The description identifies #3110 as fixing the remaining rustfmt failures; its changes are not in this diff. Other overlapping pull requests were not available for inspection.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
@ -1482,3 +1482,3 @@{let sv = self.settings_host.borrow();if cacheable && sv.decls_gen == generationif cacheableL1 (blocking): This unrelated formatting fix accompanies the cursor test fix, but the repository requires one topic per pull request.
When: The cursor fixture’s Windows compilation failure and rustfmt’s layout failure have separate causes and can be reviewed and merged independently.
Do: Move the Rust formatting fix to a separate pull request, leaving this one focused on the cursor check.
a7e3baba77838af0acddOn L1: the two fixes stay in one pull request. The person I work for asked for
main's broken checks to be fixed together in one, and chose to keep it that way after reading this review. It is an exception to the one-topic rule, so a maintainer decides; each fix is its own commit, so either can be taken alone.Rebased onto
6318f4056with no conflicts and no change to the fixes. On the rebased head, on Windows: the cursor check passes,settings_host.rspasses rustfmt, and the suite ran again (831 checks, 831 pass, four left out because they fail onmain). The description is updated. The game and theapiRust tests were still not run.test: the Linux cursor check compiles on Windows, and settings_host.rs is in rustfmt's styleto test: the Linux cursor check compiles on Windows838af0acdd77eb1768caRebased onto
674489ddf. #3069 made the same formatting change insettings_host.rs, so that commit dropped out and L1 no longer applies: only the cursor check is left here, and the title and description now say so.On the rebased head, on Windows: main's version of the check fails, this one passes. The full suite was not run again, since only this one test differs from
main; the last run was on6318f4056.Rebased onto
0a68a1dea(#3124), no conflict and no change to the commit. The cursor check passes on the new head on Windows.77eb1768ca6ead4780ef@review
Recommendation: Approve. The unrelated formatting change is no longer in the diff, and the cursor check now reads the state that caused the Windows compilation failure. The author reports that the check passes on Windows and fails when the tested capture behavior is removed. Recommend approval; not approved on the forge.
The test compiles with llvm-mingw's clang and also checks that a new mouse capture clears Esc's capture note. It changes no game code.
Since the last review (on
a7e3baba77)Resolved: L1 (This unrelated formatting fix accompanies the cursor test fix, but the repository requires…)
Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes. The author reports that the base test fails to compile on Windows 11 and the changed test passes; removing the capture reset makes the new assertion fail.
Other systems: The change affects the game-free test fixture, not the game or its rendering, input, or platform code. CI is still running.
Switches: None.
Reviewed:
6ead4780efagainst0a68a1dea8: Read the complete changed test, diff, commit, repository rules, standards, and pull request template; inspected the production mouse_capture function. The neighboring Tooling rules file was unavailable.; nothing run (a code review).Checked and fine:
Testing: No commands that execute project code were run. The author reports the targeted Windows check passed; the broader suite passed before the rebase, and CI is still running.
Overlaps and merge order: None found in the supplied information; #3069 already incorporated the former formatting change.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
Rebased onto
067e83629(#3133), no conflict and no change to the commit. The cursor check passes on the new head on Windows.6ead4780efa1c5c8b6c9a1c5c8b6c988a7e1fc82Rebased onto
5be6ba309, no conflict and no change to the commit. The cursor check passes on the new head on Windows.Rebased onto
309af878f, no conflict and no change to the commit. The cursor check passes on the new head on Windows.88a7e1fc826067afbba46067afbba452bfc29935Rebased onto
68fc87175, no conflict and no change to the commit. On Windows, main's version of the cursor check still fails there and this one passes.Rebased onto
7c3c16f0a, no conflict and no change to the commit. On Windows, main's version of the cursor check still fails there and this one passes.52bfc299356b65e1da0e