fix: 修复 mac 打包应用在已有 prod 数据库时卡住启动页#190
Open
Spin-Particle wants to merge 2 commits intoScience-Discovery:devfrom
Open
fix: 修复 mac 打包应用在已有 prod 数据库时卡住启动页#190Spin-Particle wants to merge 2 commits intoScience-Discovery:devfrom
Spin-Particle wants to merge 2 commits intoScience-Discovery:devfrom
Conversation
Collaborator
|
暂时不考虑发布electron版本。待确定后维护。 |
Collaborator
Author
|
旧 db 缺少新版需要的认证信息 |
Collaborator
Author
|
需要每次都删除db文件,才能正常打开桌面端app |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #189
Type of change
What does this PR do?
这个 PR 修复了 mac 打包桌面应用在本机已经存在 prod 数据库时卡在
Just a moment...启动页的问题。问题的根因是 Electron 启动阶段检查了错误的数据库文件名和路径。打包脚本以
prod渠道构建应用后,sidecar 实际使用的是aether-prod.db,但桌面端之前检查的是aether.db,而且在 macOS 上还可能去查错误的 XDG 路径。这样会让启动逻辑误以为还需要执行数据库迁移,并一直等待不会再发出的 sqlite 迁移完成事件。这个修复做了两件事:
另外,这个 PR 还顺带修正了
packages/opencode/test/storage/db.test.ts中对Database.knownPaths()的断言,使测试能够兼容目录中存在其他aether*.db文件的情况,避免 CI 误报。How did you verify your code works?
packages/desktop-electron下执行"$HOME/.bun/bin/bun" typecheckpackages/desktop-electron下执行PATH="$HOME/.bun/bin:$PATH" "$HOME/.bun/bin/bun" run buildpackages/opencode下执行PATH="$HOME/.bun/bin:$PATH" "$HOME/.bun/bin/bun" test ./test/storage/db.test.tsprod数据库时不会再无限等待 sqlite 迁移完成事件Screenshots / recordings
未附带。本次修改位于 Electron 启动流程,界面表现主要是修复启动页卡死。
Checklist