feat(rolldown): add rule-based build scan with CI gating
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 32/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- build-system, developer-experience, testing-qa, tooling
Hướng nghiên cứu
Start in @vitejs/devtools-rolldown by tracing how recorded @rolldown/debug sessions reach the existing panels and diagnostics/messages surfaces, then map which proposed checks have sufficient data. Review the existing CLI entry points and the bundleAnalyzerPlugin report flow for reusable reporting patterns. Done means checks support severity, ignore patterns, and thresholds; findings appear in the UI and static report; and the CLI prints a summary and exits non-zero for error-level findings.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Clear and concise description of the problem
DevTools for Rolldown already surfaces the data needed to investigate a build: duplicate packages, plugin hook costs, module and chunk graphs, assets, and session comparison. What it does not have is a way to encode what is wrong and enforce it. Every review is manual — open the UI, check the Packages → Duplicated tab, scan plugin timings, compare sessions — and nothing can fail CI.
Rsdoctor has this as a dedicated layer over compiler data ("build scan"): rules with severity and ignore/threshold config, built-in checks (duplicate packages, cross-chunk packages, loader/plugin time thresholds, ECMA target, default imports, mixed initial/async modules, side-effects-only tree shaking, CJS require, ESM resolved to CJS), custom rules, and findings in both the CLI and the report: https://rsdoctor.rs/guide/rules/rules.md
Today the equivalent information exists in the DevTools panels, but it is only consumable by a human looking at it.
Suggested solution
Add a checks layer to @vitejs/devtools-rolldown, evaluated over the recorded @rolldown/debug session data:
- Built-in checks for the classes above where the data exists: duplicate package versions, cross-chunk duplicates, plugin hook time budgets, modules present in both initial and async chunks, etc.
- A
checksconfig withoff | warn | error, ignore patterns and thresholds, in the shape users already know from linter configs. - Findings in the DevTools UI and the static report, reusing the existing diagnostics/messages surfaces.
vite-devtools check(or a flag onvite-devtools build) that prints a summary and exits non-zero when error-level findings exist, so CI can gate on it.
The session data is already recorded for the existing panels, so the checks can be pure functions over a session. bundleAnalyzerPlugin's JSON could feed the same checks for non-Vite users later.
Alternative
Expose a stable read API for recorded build sessions and let a community plugin implement the rules. A rule engine outside core would still need a CLI entry point to be usable in CI.
Additional context
- Rsdoctor built-in rules: https://rsdoctor.rs/guide/rules/rules.md
- Related: #601 / #615 add module-level session compare, #611 adds agent access. Once the agent surface lands, the same findings could be exposed through it.
- For reference,
bundleAnalyzerPluginalready emits an LLM-oriented Markdown report (https://github.com/rolldown/rolldown/blob/main/docs/builtin-plugins/bundle-analyzer.md), but it reports facts, not pass/fail checks.
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
- Ngôn ngữ chính
- TypeScript
- Star
- 1.2k
- Fork
- 97
- Merge trung bình
- 2 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 14
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của vitejs/devtools
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
vitejs/devtools#261 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
pending triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 2 ngày
-
feat(oxc): add rule timing stats to the lint inspectorCó thể làm lại được @yuyinws đã nhận 69 ngày trước và không có pull request nào đang mở. Đang mởenhancement
vitejs/devtools#584 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Static build: frame/panel URLs are still absolute when output is hosted at a subpathCó thể đã có người làm @0froq đã nhận 11 ngày trước. Đang mởpending triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
vitejs/devtools#583 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của vitejs/devtools
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
knaw-huc/textannoviz#742 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
cloudflare/realtimekit-ui#219 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
tui: Mermaid renderer displays <b>/<strong> tags literally and ignores \n line breaksCó thể đã có người làm @argszero đã nhận hôm nay. Đang mởarea/tui platform/wsl status/repro-simulated type/bug version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
anomalyco/opencode#66773 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
mermaid-js/mermaid-v13#1370 ·
Maintainer thường phản hồi trong vòng 1 ngày