Pass stable data dir to FW Lite to survive extension version updates#2385
Pass stable data dir to FW Lite to survive extension version updates#2385imnasnainaec wants to merge 4 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
hahn-kev
left a comment
There was a problem hiding this comment.
this looks correct to me
Platform.Bible runs each extension version from a versioned cache directory, so FW Lite's default of storing projects and auth cache relative to its binary would orphan data on every update. Pass explicit paths rooted at ~/.platform.bible/extensions/lexicon/ to keep data stable across versions. Closes #2351 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Platform.Bible actively rejects require() calls for non-papi modules at runtime. Replace fs/os/path imports with process.env globals (which are Node.js globals, not requires) and remove the pre-launch mkdirSync (FW Lite creates its own data directories). Also reverts the incorrect webpack externals change that made the build succeed but not the runtime. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0fb240f to
db851ab
Compare
|
The change is right-headed: the extension install dir is version-fluid, so pinning FW Lite data to a stable per-user path fixes real data loss. I verified the config keys bind correctly ( 1. Nothing creates the new directory — fresh installs break (blocking)
The extension can't 2. The chosen dir is PAPI's own storage root for this extension When packaged, 3. "Mirrors Platform.Bible's own app:// convention" is only true when packaged
4. Existing data isn't migrated The old effective location was next to the exe: FwLiteWeb 5.
AI-assisted review (Claude Code) posted on behalf of @imnasnainaec. |
Platform.Bible runs each extension version from a versioned cache directory, so FW Lite's default of storing projects and auth cache relative to its binary would orphan data on every update. Pass explicit paths rooted at
~/.platform.bible/extensions/lexicon/to keep data stable across versions.Closes #2351
Devin: https://app.devin.ai/review/sillsdev/languageforge-lexbox/pull/2385