Need to handle mods with code compilations errors on build and load
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- build-system, cli
调研方向
使用 .commandcode/mods/erd.ts 第 115 行报告的格式错误的正则表达式重现该失败,然后跟踪 mod builder 和 cmd mods list 如何处理加载失败。当编译或加载错误能够清晰地显示,并且 mod 的不可用或已禁用状态可见,而不是将其列为可用时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Summary
I built a mod, but while the cmd mods list showed it as available in the project, the command it had did not appear.
Turns out there was a compilation issue, but I had no way of knowing:
in the @.commandcode/mods/erd.ts there should be comands but i have reloaded but i dont see them available. but i see it is available cmd mods list
Built-in mods (4)
provider-anthropic · builtin
provider-copilot · builtin
provider-openai · builtin
update-notice · builtin
Mods (1)
erd · project
✻ Thought for 1 second [ctrl+o to expand]
⠶ Let me look at your mod file and check the Command Code mod docs to figure out why the commands aren't appearing.
READ [.commandcode/mods/erd.ts] 1011 lines
✻ Thought for 6 seconds [ctrl+o to expand]
⠶ Let me check if there's a TypeScript compilation issue or missing dependency.
SHELL [ls ~/projects/dthyresson/erd-mod/node_modules/@commandcode/harness 2>&1 | head -5]
│ ls: /Users/dthyresson/projects/dthyresson/erd-mod/node_modules/@commandcode/harness: No such file...
└ ... [ctrl+o to expand]
SHELL [ls ~/projects/dthyresson/erd-mod/schema/ 2>&1]
└ schema.sql
SHELL [node -e "try { require('~/projects/dthyresson/erd-mod/.commandcode/mods/erd.ts'); } catch(e) { co...]
│ Invalid regular expression: /^\s*\S+\s+([A-Za-z_]+(?:\s*\([^)]*(?:\([^)]*\)[^)]*)*\))?(?:\s|$)/i:...
└ ... [ctrl+o to expand]
✻ Thought for 29 seconds [ctrl+o to expand]
⠶ Found the issue. The regex on line 115 has an unmatched parenthesis — the capture group ( is never closed, making the regex invalid. This causes the mod to fail
to load entirely, which is why /cmd mods list shows it but none of its commands appear.
Expected Behavior
- the mod builder should run some type or compile checks
- on load of the mod, warn that a mod failed to load so can correct (or status of disable due to error)
- something to know while mod isn't working/available
Actual Behavior
- mod listed but commands it implements not present
Steps to reproduce the issue
- use mod builder but introduce some type or build compilation error in it
Command Code Version
1.5.0
Operating System
macOS
Terminal/IDE
ghostty
Shell
zsh
Additional context
No response
- 主要语言
- 没有语言数据
- 星标
- 4k
- 派生
- 350
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CommandCodeAI/command-code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
CommandCodeAI/command-code#855 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
CommandCodeAI/command-code#841 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
CommandCodeAI/command-code#655 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
CommandCodeAI/command-code#608 ·
-
难度 3/5 1-2 天 新手友好度 70/100
CommandCodeAI/command-code#893 ·
查看 CommandCodeAI/command-code 的全部 Issue
相似的 Issue
-
kind/bug
难度 2/5 1-3 小时 新手友好度 88/100
kubernetes-sigs/prow#953 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
zephyrproject-rtos/zephyr#119726 ·
-
out-of-date
难度 1/5 1 小时以内 新手友好度 82/100
CachyOS/CachyOS-PKGBUILDS#1894 ·
-
comp/dashboard P3 type/bug
难度 2/5 1-3 小时 新手友好度 86/100
NousResearch/hermes-agent#117722 ·
-
bug
难度 1/5 1 小时以内 新手友好度 92/100
objectionary/jeo-maven-plugin#1760 ·