bootstrap-monorepo
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBootstrap Polyglot Monorepo
初始化多语言单体仓库
This skill redirects to the canonical reference in mise-tasks.
→ See: mise-tasks/references/bootstrap-monorepo.md
该技能会重定向至mise-tasks中的标准参考文档。
→ 查看: mise-tasks/references/bootstrap-monorepo.md
When to Use This Skill
何时使用该技能
Use this skill when:
- Starting a new polyglot monorepo from scratch
- Setting up Python + Rust + Bun/TypeScript project structure
- Need autonomous 9-phase bootstrap workflow (includes release setup)
- Want Pants + mise integration for affected detection
在以下场景中使用该技能:
- 从零开始新建多语言单体仓库
- 搭建Python + Rust + Bun/TypeScript项目结构
- 需要自主式9阶段初始化工作流(包含发布配置)
- 希望集成Pants + mise以实现变更影响检测
Stack
技术栈
| Tool | Responsibility |
|---|---|
| mise | Runtime versions (Python, Node, Rust) + environment variables |
| Pants | Build orchestration + native affected detection + dependency inference |
| 工具 | 职责说明 |
|---|---|
| mise | 运行时版本管理(Python、Node、Rust)+ 环境变量配置 |
| Pants | 构建编排 + 原生变更影响检测 + 依赖自动推导 |
Quick Commands
快速命令
bash
undefinedbash
undefinedAfter bootstrap, use these Pants commands:
After bootstrap, use these Pants commands:
pants --changed-since=origin/main test # Test affected
pants --changed-since=origin/main lint # Lint affected
pants tailor # Generate BUILD files
pants list :: # List all targets
undefinedpants --changed-since=origin/main test # Test affected
pants --changed-since=origin/main lint # Lint affected
pants tailor # Generate BUILD files
pants list :: # List all targets
undefinedRelated Skills
相关技能
- - Task orchestration and affected detection (Level 11)
itp:mise-tasks - - Environment and tool version management
itp:mise-configuration - - Release automation (Phase 8 reference)
itp:semantic-release
- - 任务编排与变更影响检测(Level 11)
itp:mise-tasks - - 环境与工具版本管理
itp:mise-configuration - - 发布自动化(参考第8阶段)
itp:semantic-release
Troubleshooting
故障排查
| Issue | Cause | Solution |
|---|---|---|
| Pants not found | Not installed | Install via |
| mise not loading | Shell hook not configured | Configure mise shell hook in ~/.zshrc |
| BUILD files not generated | Missing | Run |
| Affected detection empty | No base branch set | Ensure |
| Python version mismatch | mise vs Pants conflict | Align Python version in mise.toml and pants.toml |
| Rust targets not found | Pants Rust backend missing | Enable Rust backend in pants.toml |
| Node/Bun not detected | Not in mise tools | Add to mise.toml: |
| Dependency inference fails | Missing imports in source | Ensure explicit imports, run |
| 问题 | 原因 | 解决方案 |
|---|---|---|
| 未找到Pants | 未安装 | 通过 |
| mise 无法加载 | 未配置Shell钩子 | 在 ~/.zshrc 中配置mise Shell钩子 |
| 未生成BUILD文件 | 未执行 | 运行 |
| 变更影响检测结果为空 | 未设置基准分支 | 确保 |
| Python版本不匹配 | mise与Pants版本冲突 | 对齐mise.toml与pants.toml中的Python版本 |
| 未找到Rust目标 | 缺少Pants Rust后端 | 在pants.toml中启用Rust后端 |
| 未检测到Node/Bun | 未添加至mise工具列表 | 在mise.toml中添加: |
| 依赖自动推导失败 | 源码中缺少显式导入 | 确保存在显式导入,重新运行 |