Config: recreate xcl.toml only on NotFound and resolve memory mode case-insensitively (#106) #237
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!237
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/237/head"
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?
@slopgobblercobbler on GitHub · 2026-11-23 21:45 UTC · original
slopgobblercobbler:fix/config-load-resolve→main· +57 −6 · 1 files · 1 commits · closed without mergingAddresses #106 (Config robustness & resolution):
Config::load_or_create, only recreatexcl.tomlwhenerr.kind() == ErrorKind::NotFound. On read, permission, or syntax errors, the user's existing file is preserved rather than overwritten with default settings.Config::resolve, match memory mode values"auto"and"advanced"case-insensitively with whitespace trimmed.What is in it
crates/xcl/src/config.rs:load_or_createerror branching check.resolvestring normalization (trim().to_ascii_lowercase()).load_or_create_only_creates_on_not_found_and_preserves_on_errorsandtitle_memory_is_read_in_any_case.Tested
cargo test -p xcl -- config(16 passed, 0 failed).cargo test --workspace(603 passed, 0 failed).Not tested
AI use
author-config,verify-config). Verified and reviewed independently.@MesshM on GitHub · 2026-11-24 04:33 UTC · original
Test run of
6ad1cea4c1fce69ad41c4532f48c77691230fb5aon AMD RDNA4. I merged it onto currentmain64b3f35locally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 702 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 661 passed, 0 failed, 21 ignoredSKIPPED;load_or_create_only_creates_on_not_found_and_preserves_on_errorsandtitle_memory_is_read_in_any_casepass.Review: Only
NotFoundrecreatesxcl.toml; a read or syntax error now returns an error and leaves the user's file alone, and the memory mode is trimmed and lower-cased before it is matched. I found nothing to change.Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@ivall on GitHub · 2026-11-24 11:17 UTC · original
Closing because the two changes are already on main:
ea4bd62preserves the config on read errors and6cb71dbhandles title_memory case-insensitively. Thank you for the contribution.Pull request closed