"Incremental build equals clean build" is claimed but never tested
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, node.js
- Lĩnh vực
- build-system, testing
Hướng nghiên cứu
Bắt đầu ở site/build.mjs, quanh writeOut và pruneDist, sau đó đọc site/lib/lib.test.mjs và lệnh chạy kiểm thử trong phần hướng dẫn bắt đầu. Thay đổi được đề xuất là chuyển các hàm sang site/lib/dist-writer.mjs, tham số hóa thư mục dist và kiểm thử chúng trong một thư mục tạm. Công việc được xem là hoàn tất khi các kiểm thử bao quát những phép so sánh byte, việc ghi lại, xóa tệp cũ và dọn dẹp thư mục đã liệt kê.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
build.mjs says the incremental result is byte-identical to a clean build, but writeOut, pruneDist and the produced-file set are not tested, and CI always builds from a fresh checkout, so the incremental path never runs there.
Where
site/build.mjs:272-275(claim)site/build.mjs:288-299(writeOut)site/build.mjs:323-335(pruneDist)site/build.mjs:526-531,:638,:745
Impact
A stale file left in local dist, or a needed file pruned, would only show locally.
Suggested fix
Move writeOut and pruneDist into site/lib/dist-writer.mjs with the dist directory as a parameter and test them in a temp directory.
Acceptance criteria
- Same bytes written twice: 0 writes the second time
- Same-size file with different bytes is rewritten
- Stale
old/x.htmlremoved and its empty directory pruned - Directory holding a produced file is kept
- Optional: hashes of
buildandbuild --cleanmatch in a temp copy
Getting started
- Relevant files:
site/build.mjs,site/lib/lib.test.mjs - Run the tests:
npm test; the full local gate isnpm run check(Node 22+, no install step) - Related docs:
CONTRIBUTING.md,site/README.md
Related: #85
Filed by repo-audit/full-audit at 4adb944. Severity: low. Effort: S. audit-key: testing|site/build.mjs|writeOut
- Ngôn ngữ chính
- JavaScript
- Star
- 58
- Fork
- 15
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 12
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 TMHSDigital/Free-Game-Dev-Assets
-
enhancement good first issue priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
TMHSDigital/Free-Game-Dev-Assets#272 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
TMHSDigital/Free-Game-Dev-Assets#270 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
TMHSDigital/Free-Game-Dev-Assets#269 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue priority: low tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
TMHSDigital/Free-Game-Dev-Assets#267 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue priority: low tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
TMHSDigital/Free-Game-Dev-Assets#266 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của TMHSDigital/Free-Game-Dev-Assets
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
microsoft/TypeScript#65370 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
metrics priority: medium
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
LearningCircuit/local-deep-research#8336 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ace bug yaml
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
svelte: whitespace-only edit leaves an empty todo, edits not trimmed, filter not restored on reloadĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
agentic-workflows
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
githubnext/gh-cao#20316 ·
Maintainer thường phản hồi trong vòng 1 ngày