WIP: chore(lint): the workspace passes clippy for Windows' target, as mise.toml says the builder is checked for Windows #2830
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!2830
Loading…
Reference in a new issue
No description provided.
Delete branch "llun/Longshot:fix/mod-api-win-clippy"
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
For #2822 (into
mod-api).mise.tomlsays the Windows target is there to check the builder for Windows (cargo clippy --target x86_64-pc-windows-gnullvm). Onmod-api, that check (-D warnings, as CI runs clippy on Linux) fails on three things only a Windows build sees:builder/crates/build-core/src/control.rs:into_game, which is#[cfg(windows)], comes after the test modules (items_after_test_module). Moved above them, unchanged.builder/crates/build-core/src/channel.rs: on WindowsPassedholdspidalone, so its hand-writtenDefaultis one a derive would make (derivable_impls). Linux'sout_fdstarts at -1, which a derive would not do, so the hand-written one stays, with the lint allowed off Unix.builder/crates/build-compile/src/rust.rs: the tests'builds()is used by#[cfg(unix)]tests only (dead_code). It gets#[cfg(unix)], likefake_cargobeside it.Each change sits behind its
cfg: Linux's build and its clippy see the same code as before.Testing
Tested: Windows 11, RTX 5080, NVIDIA 621.40.
cargo clippy --keep-going --workspace --exclude modtool --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warningsand the same for-p modtool, as CI's two clippy runs split them, with llvm-mingw as the C compiler. Onmod-api@eaf4a48bthey fail with the three errors above (build-corefirst, which stops its dependents). Here both pass.cargo test -p build-core -p build-compile --target x86_64-pc-windows-gnullvmpasses, except three tests that fail the same way onmod-apion Windows:files_windows::tests::the_cache_takes_files_folders_renames_and_removes,driver_caches::tests::the_caches_are_longshots_own_unless_one_is_namedandtoolchain::tests::the_builder_s_llvm_comes_before_emsdk_and_the_path.longshot-builder gamewith a profile:sandbox: in the AppContainer, the builder reached …,mods: the builder's channel is open, the mods started, and the game played until the run's time limit. (The builder had #2726's broker change applied locally beneath it: on plainmod-apia confined start with a profile stops at the save folder.)cargo fmt --checkon both crates andmise run lintpass.Still to test: None.
Measurements
Nothing to measure: lint attributes, a
cfgon a test helper, and a function moved within its file. The program built is the same on Linux, and on Windows only the order of items changes.Risks
The sandbox: not touched. These are lint attributes, a test helper's
cfg, and a function moved within its file.Passed's default (the channel's fd and pid) is the same value on both systems.None for players. A revert is enough.
Checklist
Ready for review
mod-api(#2822's head); the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (The checks this change reaches pass, apart from the three named above, which fail the same way onmod-api.mod-api's whole suite has failures on Windows that this PR doesn't change.)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
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
Tested in the game: Windows 11, RTX 5080, NVIDIA 621.40: a builder built from this branch (with #2726's broker change applied locally beneath it) started the game confined through
longshot-builder gamewith a profile:sandbox: in the AppContainer, the builder reached ...,mods: the builder's channel is open (31 ops), Skip title screen and the profile's mods started, and it played until the run's time limit.Risks now says how this change stands with the sandbox (what it touches, and why the confined game reaches nothing more).
4a960e04e612a347da9cRebased onto mod-api's newest (
4cc50ca1: main's newest merged in), with no conflict; this PR's own checks were run again on the rebased head and pass as before. The merge touched none of this PR's files (#2827: only a comment in host/hos_main.c, far from its change), so the measurements and runs above hold; the After commit is the rebased head.12a347da9c712ffe86b3Rebased onto
mod-api@816d2354(#2837, headless shots of the mods' UI), now712ffe86. No conflict, and the diff is the same as before (samegit patch-id). #2837 touches none of this PR's files.712ffe86b3f6f37da0d6f6f37da0d6d9c6e4a67eRebased onto
mod-api@c5e5b676: it was re-squashed onto main @46291934(#2833) twice today (cdbb8551, thenc5e5b676), which made this PR show main's and the whole mod API's diff. Nowd9c6e4a6, the same diff as before (samegit patch-id), no conflict. The new base brings main's newest code, so I ran it again on the rebased head:cargo clippy --workspace --all-targets(and-p modtool) forx86_64-pc-windows-gnullvmwith-D warningspasses.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.