本技能介绍如何使用命令行`gh`只读查看GitHub issue正文和评论,支持通过编号或URL定位,也可指定其他仓库,并说明如何提取大量评论。
- 查看issue正文和评论
- 通过URL读取issue
- 查看其他仓库的issue
了解如何在 Carbon 项目中通过 Bazelisk 构建、测试和运行程序,包括指定目标、启用 ASan,以及系统依赖变更后重建缓存。
Instructions that **MUST** be followed when using Bazel or Bazelisk to build, test, and debug in the Carbon repository.
实测评分 未实测
查看安装方法本技能介绍如何在 Carbon 项目中使用 Bazel 构建、测试和运行程序。为统一版本,项目使用 bazelisk,因此应通过它执行命令,而不是直接调用 bazel。文中给出了构建或测试整个项目,以及针对工具链、示例等目标执行操作的命令。还介绍了如何用 bazelisk run 启动构建出的程序、在测试中启用地址消毒器(ASan),以及系统依赖发生变化后重新构建缓存状态。
修改 Carbon 代码后,需要通过构建或测试进行验证时,可以使用本技能。不确定该用哪条命令,或更改系统依赖后需要重新构建时也适用。
在 Carbon 项目中应使用 bazelisk。如果尚未安装,可以使用 ./scripts/run_bazelisk.py。资料未说明针对 Jujutsu 的特殊操作步骤。
本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。
AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。
不计入评分。 由 AI(OpenAI Codex)于 2026年10月26日 评估。仅供参考,安装前请同时查看原文。
安装前可以查看交给 AI 代理的指令内容。
This skill documents how best to use Bazel when building, testing, or manipulating the Carbon repository's Bazel in any way.
Carbon uses Bazel for its build system. To ensure consistent versions, the project uses Bazelisk.
[!IMPORTANT] Always use
bazeliskwhenever you want to run Bazel. Never runbazeldirectly in the Carbon project. Anything you want to do withbazelcan be done with thebazeliskcommand instead.
bazelisk in your existing $PATH if available.
run_bazelisk.py: If bazelisk isn't available, use
./scripts/run_bazelisk.py to run bazelisk without it being installed.bazelisk build //...bazelisk build //toolchain/...bazelisk build //toolchain:carbonbazelisk test //...:allbazelisk test //toolchain/...bazelisk test //examples/...[!TIP] Running all of the tests can be slow, so try to narrowly test the immediately relevant parts of the project first, and only expand coverage as necessary to be confident in the changes.
[!TIP] For specialized instructions on testing and developing the Carbon toolchain, consult these skills:
- Toolchain tests: For authoring, structuring, and running
file_testtests.- Toolchain development: For architecture, essential commands, and debugging the toolchain.
[!IMPORTANT] Always manually run binaries built by Bazel using the
bazelisk runcommand. Never run the binary directly frombazel-bin/.
You can run the Carbon driver or command line directly via Bazel:
bazelisk run //toolchain -- compile --phase=parse toolchain/parse/testdata/basics/empty.carbonTo enable ASan for local testing:
--config=asan: bazelisk test --config=asan //...bazel cleanChanges to packages installed on your system (like changing LLVM versions or
installing libc++) may not be noticed by Bazel.
bazelisk clean to force cached state to be rebuilt when environment
changes occur.还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
本技能介绍如何使用命令行`gh`只读查看GitHub issue正文和评论,支持通过编号或URL定位,也可指定其他仓库,并说明如何提取大量评论。
本技能为在 Carbon 代码库中工作的 AI 助手规定文件查看、搜索和编辑工具,并说明临时文件的存放与清理规则,以及何时可以编写和运行自定义程序。
本技能介绍如何为Carbon编译器添加内置函数,包括类型注册、签名验证、常量求值、运行时LLVM IR生成、Prelude绑定,以及使用最小Prelude编写针对性测试。
了解 Carbon 工具链对 Bazel、C++、Carbon、Markdown 和 Python 文件的格式规范,并查看注释、文档、命名、设计及提交说明的写作要求。
本技能介绍如何在Carbon工具链中添加或修改错误和警告,包括注册诊断类型、用带类型的参数构造消息、为源码位置添加标签和上下文,以及检查措辞规范和测试覆盖。
使用 `gh` 只读搜索和查看 GitHub 的议题、拉取请求、仓库与代码,并了解如何查询 REST 和 GraphQL API、翻页获取结果及筛选或整理输出。