`init` says "Already initialized" after a first index that didn't finish
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 70/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- cli
调研方向
从 src/bin/codegraph.ts 中的 runInit(约第 757-765 行)开始,那里已初始化分支会打印普通消息。阅读 codegraph status 如何结合 isRebuildInProgress 使用 getIndexState()(src/index.ts:2174,status 位于 src/bin/codegraph.ts:1313-1320)。完成的标准是:在没有重建运行时,状态为 indexing、failed 或 partial 时,init 打印对应的索引未完成警告;状态为 complete 时仍打印普通消息。
由索引模型根据 Issue 内容生成。
描述
Follow-up to the last point in #3223.
What happens
If the first index stops partway (in #3223 it threw at "Resolving refs"), running codegraph init again prints:
Already initialized in <project-root>
Use "codegraph index" to re-index or "codegraph sync" to update
Nothing says the index is incomplete, so it reads like a working setup that just needs updating.
Where (main f72c9d2e)
runInit(src/bin/codegraph.ts:757-765) only checksisInitialized(projectPath)before printing that message.- The project already records whether the last run finished.
getIndexState()(src/index.ts:2174) returnsindexing(marked before any writes atsrc/index.ts:703, so a run that dies midway leaves it behind),failed,partialorcomplete. codegraph statusalready uses it (src/bin/codegraph.ts:1313-1320), withisRebuildInProgressto tell a run in another process from one that never finished.
Suggestion
In the already-initialized branch of runInit, read the index state the same way status does. When it is indexing with no rebuild running, failed, or partial, print the matching status warning ("The last index run never finished … Re-run codegraph index.") instead of the plain "Already initialized".
I worked this out by reading main. I haven't reproduced a failed first index locally.
- 主要语言
- C
- 星标
- 73.2k
- 派生
- 4.7k
- 平均合并
- 3 小时 57 分钟
- 30 天内合并 PR
- 485
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
colbymchenry/codegraph 的其他 Issue
-
Separate Installation Commands into Individual Code Blocks可能已有人在做 @andrySD 于 1 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
colbymchenry/codegraph#3241 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
colbymchenry/codegraph#3223 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
A `../` entry in package.json `workspaces` makes a folder outside the project count as a workspace package, and a call gets linked to the wrong function可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
colbymchenry/codegraph#3093 ·
维护者通常 1 天内回复
-
Windows: npm-shim spawnSync missing windowsHide flashes a console window on every MCP server launch未关闭
难度 2/5 1-3 小时 新手友好度 86/100
colbymchenry/codegraph#3054 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
colbymchenry/codegraph#2974 ·
维护者通常 1 天内回复
查看 colbymchenry/codegraph 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 4 天内回复
-
area/docs
难度 1/5 1 小时以内 新手友好度 83/100
Clodmony/starship-coop#72 ·
维护者通常 1 天内回复
-
ospf6d: heap-use-after-free in seqnumber_mismatch()/bad_lsreq() when a neighbor is deleted with events pending可能已有人在做 @lichenlang89 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 61/100
维护者通常 2 天内回复
-
5700模组网络优先级问题未关闭
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复