feat: incremental rebuild in serve
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
- 35/100
Hướng nghiên cứu
Start with Fanstatic/Commands/Serve/ServeCommand.cs:351 and SiteHelper.Init at :254 to trace the current rebuild flow; then inspect the rendering and test fixtures in Fanstatic.Test/ and .TestSites/. Run ./build.sh test and review dependencies #16 and #18 before tackling the dependency tracking and invalidation tasks. Done means each change type has integration coverage, incremental output matches a clean build, and editing one post on the 4000-post site refreshes the browser in under 100 ms.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Part of the Phase 1 epic (#13).
Current State
serve rebuilds the whole site on every file change: ServeCommand.OnSourceFileChanged
(Fanstatic/Commands/Serve/ServeCommand.cs:351) ends in SiteHelper.Init (:254), which re-parses every file
and re-renders on request.
Tasks:
- Track dependencies while rendering: page → templates/partials used, page → data files, list → children
- Content edit: re-parse that file only and invalidate the pages that depend on it (parent lists, terms, home)
- Template edit: recompile that template, invalidate pages that used it
- Config edit: full rebuild (as today)
- Integration tests for each change type
Tests live in Fanstatic.Test/ (xUnit + NSubstitute); fixture sites in .TestSites/. Run ./build.sh test; new/changed methods need CRAP ≤ 15 and ≥ 75 % line coverage.
Acceptance Criteria:
- Editing one post on the 4000-post site refreshes the browser in < 100 ms.
- Output after incremental rebuilds equals a clean build.
Related:
- #13 (Phase 1 epic, parent)
- Depends on #16
- Depends on #18
- Ngôn ngữ chính
- C#
- Star
- 1
- Fork
- 0
- Merge trung bình
- 10 giờ 23 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay 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 MASS4ORG/Fanstatic
-
c:templates p:low size:S t:task
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
-
c:content good first issue p:low size:S t:feature
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
-
c:templates p:medium size:M t:feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
c:content p:medium size:L t:feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
c:templates p:medium size:S t:feature
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
Tất cả issue của MASS4ORG/Fanstatic
Issue tương tự
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
7.0
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
unoplatform/uno.extensions#3253 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Sector-Vestige/Sector-Vestige#476 ·
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
PowerShell/platyPS#868 ·
-
S: Untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Trauma-Station/Trauma-Station#5058 ·
Maintainer thường phản hồi trong vòng 1 ngày