[pr-fix][startup] DARNER_UPDATE_CHECK=0 in darner-settings.txt or --set turns the update check off #278
Loading…
Reference in a new issue
No description provided.
Delete branch "mdrzn/Darner:update-check-settings"
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?
Contributor role (optional)
What it changes
DARNER_UPDATE_CHECK=0indarner-settings.txt, the start still printed "A newer Darner is out: v2026.12.03.02 (this is v2026.12.01.01)".check_for_update()runs inplay::preparebeforedarner-settings.txtis read, and looks only at the process environment.playpasses the settings file's switches to the title's process, not to itself, soDARNER_UPDATE_CHECK=0written in the file (or given with--set) never reached the check, and the request went out anyway.The check now runs right after the settings file is read. It is off when
--set, the settings file or the environment saysDARNER_UPDATE_CHECK=0, in that order. Nothing else moves: the check still starts before the title, in its own thread.How it was tested
3146141(onmainf3840d7).the_update_check_follows_the_settings_file_and_set: settings file only,--setonly,--setover the file, the file's last line wins.the_update_check_names_only_a_newer_releasestill passes.v2026.12.01.01(DARNER_BUILD_NAME), each started withdarner playandDARNER_UPDATE_CHECK=0indarner-settings.txt. Without this change the start printed "A newer Darner is out: v2026.12.03.02 (this is v2026.12.01.01)". With it, nothing was printed.3146141: gate 1 and gate 2 pass. Gate 3: everything passes exceptemit::waterfall_tests::sampled_marks_restore_early_depth_only_when_safe_in_pixel_shadersindarner-shader("Not all elements of output SV_Depth were written"). It fails the same way onmainf3840d7without this change.Checklist
main.docs/asset-policy.md.Independent Windows build, gate, and code-read review of
3146141af(based onmainf3840d73d). Not run in-game.Environment
x86_64-pc-windows-msvc), MSVC 19.44.35230.Measured results
cargo clippy --workspace --all-targets --locked -- -D warnings): PASScargo clippy --workspace --all-targets --all-features --locked -- -D warnings): PASScargo xtask policy: PASS (asset policy: 555 files ok)cargo test --locked -p darner play::tests -- --nocapture: PASS (58 passed; 0 failedin 0.04 s, includingthe_update_check_follows_the_settings_file_and_set)Findings
DARNER_UPDATE_CHECKis missing fromplayers_own::NAMES(apps/darner/src/play.rs:1042-1089), somigrate_settings()offers to delete it right beforeupdate_check_off()reads it:prepare()(play.rs:2412-2435),migrate_settings(&menu_file)runs beforeparse_menuandcheck_for_update(update_check_off(&menu, &o.more)).migrated()(play.rs:1094-1119), anydarner-settings.txtwithoutDARNER_MENU_SETTINGS_VERSION=2(for example, created by hand withDARNER_UPDATE_CHECK=0, upgraded from v1, or on a future version bump) flags everyk.starts_with("DARNER_") && !players_own(&k)as an obsolete engine switch and offers to strip it from the file—immediately re-enabling the update check."DARNER_UPDATE_CHECK"toplayers_own::NAMES(play.rs:1052-1088) and verify it is kept inan_older_settings_file_loses_its_engine_switches_once(play.rs:2876).DARNER_UPDATE_CHECK=indarner-settings.txtshadowsDARNER_UPDATE_CHECK=0in the environment (play.rs:1625-1627):play.rs(settings()at:1371-1375,:1416), an emptyKEY=indarner-settings.txtmeans unset. Inupdate_check_off,savedproducesSome(""), stoppingset.or(saved).or_else(|| std::env::var(NAME).ok())before checking the environment. Adding.filter(|v| !v.is_empty())onsavedmatchessettings().--set>darner-settings.txt> env), Safe Start interaction, anddarner_core::renamed::new_namesalias handling all match the rest ofplay.rs. Splitting out a small helper takingenv: Option<&str>would also let the test cover the env fallback andVICTORY_UPDATE_CHECKalias deterministically without depending on live process env.Verdict: Changes requested (add
"DARNER_UPDATE_CHECK"toplayers_own::NAMESand ignore emptysavedvalues).AI-assisted: yes (Gemini 4 Neon).
0450b2c addresses both findings in the review. Settings migration now keeps
DARNER_UPDATE_CHECK. A blank saved value falls through to the environment while an explicit--setstill takes precedence.I ran the same seven cases against
3146141and the follow-up using the production migration and option functions. The migration and both blank-value cases now preserve the opt-out, and all four control cases behaved the same. Both updated in-tree tests passed in the isolated Rust harness. The focusedcargo check --locked --offline -p darner --bin darner --tests, asset policy and diff check passed.If you cherry-pick or rebase this commit, please keep the Git author. If you fold it into your own commit, please add this trailer.
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>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.