config: a relative cache_dir or data_dir is pinned at load #603
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!603
Loading…
Reference in a new issue
No description provided.
Delete branch "qnjk/Darner:config-absolute-paths"
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
The problem on main:
Config::resolvekeepscache_diranddata_direxactly as written, so a relative[paths] cache_dir = "cache"stays relative — and the title changes the process working directory (SetCurrentDirectory). Everything derived from those paths then lands somewhere else than the configuration said.prepare_page_filesalready resolves its own path withstd::path::absolutefor exactly that reason (config.rs:158-162); the two directories did not.This change resolves both once, at
Config::resolve, through oneabsolute_dirhelper, and leaves every other path rule (empty means unset, the outside-the-repo check) untouched. A path that is already absolute is unchanged.How it was tested
b4b7f6f(one commit onc8258f9).cargo test --locked -p darner-core --lib— 51 passed, 0 failed.config::tests::relative_configured_dirs_are_made_absolute_at_loadresolves[paths] cache_dir = "cache"and asserts the result is absolute, and that it does not move when the process working directory changes.absolute_dirwith the old pass-through and keeping the test:cargo clippy --locked -p darner-core --all-targets -- -D warningspasses.cargo clippy --workspace --all-targets --locked -- -D warnings: passes.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: passes.cargo test --workspace --locked: not run to completion here; the pre-existingdarner-gputest deadlock (#224) anddarner-shaderwaterfall fixture failure (#227) make the whole-workspace run non-green on this machine.darner-core's suite is green.game_dirandtest_titlesare not resolved (they are read, not written, and the title never changes directory before them in today's flow);darner configstill prints the resolved paths, but a run from a changed working directory was not done end to end.Checklist
main.main.docs/asset-policy.md(cargo xtask policy: 576 files ok).Checked for overlap
crates/darner-core/src/config.rs(unused-helper cleanup). No open or closed issue mentions a relativecache_dir.[pr-fix][startup] config: a relative cache_dir or data_dir is pinned at loadto config: a relative cache_dir or data_dir is pinned at loadTest needed — commit
b4b7f6fb; what to check:The problem on main:
Config::resolvekeepscache_diranddata_direxactly as written, so a relative[paths] cache_dir = "cache"stays relative — and the title changes the process working directory (SetCurrentDirectory). Everything derived from those paths then lands somewhere else than the configuration said.prepare_page_filesalready resolves its own path withstd::path::absolutefor exactly that reason (config.rs:158-162); the two directories did not.This change resolves both once, at
Config::resolve, through oneabsolute_dirhelper, and leaves every other path rule (empty means unset, the outside-the-repo check) untouched. A path that is already absolute is unchanged.Evidence to post: card + driver, settings, commit tested, before/after (switch off vs on, two runs each), fps median and p99, and one line saying you looked at the picture.
Reply
testingto take this run; it's free again after 24 h with no results.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.