Rebuilding wipes the user config (dist/ is both install dir and config dir) #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
On
dev/jappel,versapad_data.app_dir()returns the install directory when frozen:and
build_and_deploy.ps1deploys to$projectDir\dist\VersaPadViewer, clearing it first:So the config file lives in the exact directory the build script deletes on every run.
Each rebuild silently discards
versapad_config_all.json.What makes it hard to notice:
load_or_fetch()no longer errors on a missing file, itrecreates one — from the board if reachable, otherwise
default_combined(). The boardhas no storage for the local-only fields, so the regenerated config looks completely
normal (bindings, LEDs, macros all correct) while
profile_names— and any otherlocal-only data — are silently gone. If no board is attached you get an empty config
instead. Nothing in the UI indicates that anything was lost.
I hit this downstream after cherry-picking the commit: I rebuilt ~8 times during a UI
session and kept losing local-only data I had just entered, re-entering it each time
without realising the next build would drop it again.
Fix I went with, in case it's useful: keep program and user data apart — config in
%APPDATA%\<App>(roaming), install dir untouched by it — plus a defensive step in thebuild script that rescues any
versapad_config*.jsonfound in the target across thedeploy, so existing installs survive the change.
Two smaller things worth considering alongside:
app_dir()branching onsys.frozenmakes the built exe and a source/MCP run readdifferent files; mine drifted apart until I noticed the exe showing a different
profile than the MCP server reported.
be worth logging or surfacing when it kicks in.