build-train: fast-path hash checks with mtime/size stats
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- node.js, typescript
- Lĩnh vực
- build-system, performance
Hướng nghiên cứu
Start with workspace.ts:339 and trace memberInputHash, hashWorkspaceTree, and recordBuilt; first check how #480 narrows the input files, since this issue is blocked by it. Add tests for unchanged, touched, added, deleted, and manifest-free trees, and verify old cache entries invalidate; done means matching stats reuse the hash while mismatches trigger a full rehash.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What to build
Every staleness judgement re-reads and hashes every file in every member's tree (memberInputHash → hashWorkspaceTree, workspace.ts:339). Turbo's trick avoids this: persist a per-file mtime/size manifest alongside the hash; if no file's stats changed since the recorded hash, skip rehashing the tree entirely.
.bos/build-cache.json already persists per-member state — extend the cache entry with a stats manifest:
{
"every-plugin": {
"hash": "...",
"files": { "src/index.ts": [1700000000000, 4021], ... } // mtimeMs, size
}
}
Fast path: walk the tree collecting stats only (cheap), compare against the manifest — exact match → reuse the recorded input hash without reading file contents. Any mismatch (new/removed/changed file, or no manifest) → full rehash as today. A stats match with changed content and unchanged mtime+size is theoretically possible but the same residual risk Turbo accepts; mismatches always rehash, never false-fresh.
Cache versioning: bump the cache entry shape (or add a version field) so pre-change caches invalidate cleanly rather than half-matching.
Blocked by
#480 (the input manifest defines what files even get stat'd — build on the narrowed input set).
Status
- Stats-manifest persisted in the cache entry post-build (
recordBuilt) - Fast path skips content reads when stats match; falls back to full rehash otherwise
- Cache shape versioning handles pre-existing
.bos/build-cache.json - Unit tests: unchanged tree (skip), touched file (rehash), new/deleted file (rehash), missing manifest (rehash)
- Changeset added
- Ngôn ngữ chính
- TypeScript
- Star
- 5
- Fork
- 3
- Merge trung bình
- 11 giờ 8 phút
- Pull request đã merge (30 ngày)
- 90
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không 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 NEARBuilders/everything-dev
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NEARBuilders/everything-dev#400 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
NEARBuilders/everything-dev#507 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
NEARBuilders/everything-dev#496 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
NEARBuilders/everything-dev#493 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ready-for-human
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
NEARBuilders/everything-dev#491 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của NEARBuilders/everything-dev
Issue tương tự
-
frontend
Độ 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
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
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 75/100
ranxianglei/billion-context#4172 · 1 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 75/100
awslabs/threat-composer#362 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Area/Cloud Needs Triage Type/Bug
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
wso2/product-integrator#2847 ·
Maintainer thường phản hồi trong vòng 1 ngày