A second build in the same root fails because build.log is locked by the first
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
Hướng nghiên cứu
Bắt đầu với src/Fallout.Build/Logging.cs, đặc biệt là Logging.Configure, DeleteOldLogFiles và ConfigureFiles. Tái hiện xung đột bằng cách chạy một lượt build dài rồi chạy ./build.cmd --help từ cùng thư mục gốc. Triển khai hành vi được đề xuất là bỏ qua việc cắt ngắn build.log dùng chung và sink khi tệp bị khóa; hoàn tất khi lượt build thứ hai bắt đầu và ghi vào tệp log có dấu thời gian của nó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version: Fallout.Common 10.4.0, Windows 11, .NET SDK 10.0.112
What happens: while one build runs (for example a long-running target), starting a second build in the same root directory fails at startup with:
The process cannot access the file '<root>\.fallout\temp\build.log' because it is being used by another process.
Why: Logging.Configure calls DeleteOldLogFiles, which truncates build.log with File.OpenWrite, and ConfigureFiles opens build.log through a non-shared Serilog file sink. The first build holds that file for its whole run, so both steps fail in the second (Logging.cs). NUKE behaves the same.
Repro: start ./build.cmd SomeLongTarget, then run ./build.cmd --help in the same directory while the first is still running.
Expected: the second build runs. Each run already writes its own build.<timestamp>.log, so only the shared build.log stands in the way.
Possible fixes:
- When
build.logis in use, skip truncating it and skip thebuild.logsink, so that run logs only to its timestamped file. This is the smallest change, andbuild.logkeeps meaning "the log of the run that owns it". - Open
build.logwithshared: true, and truncate it only when nothing else holds it. Runs then interleave in one file.
Either way, the timestamped name has one-second resolution, so two runs started in the same second also collide. Adding milliseconds or the process ID would avoid that.
We would like to contribute option 1 if it's acceptable.
Current develop still contains the shared build.log truncation and non-shared sink as inspected on 12 October 2026. We found no matching existing report in the issue search. This report concerns logging; our separate bootstrap copies the build executable per invocation to avoid output-binary locks.
- Ngôn ngữ chính
- C#
- Star
- 177
- Fork
- 24
- Merge trung bình
- 4 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 17
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 Fallout-build/Fallout
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Fallout-build/Fallout#729 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
.\build.ps1 in its current state isn't capable for :add-package commandCó thể đã có người làm @ITaluone đã nhận 53 ngày trước. Đang mởbug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Fallout-build/Fallout#670 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
CD enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Fallout-build/Fallout#649 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Fallout-build/Fallout#630 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement target/backlog
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
Fallout-build/Fallout#609 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của Fallout-build/Fallout
Issue tương tự
-
effort:S P3 refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nightscout/nocturne#3243 ·
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
dasher-project/Dasher-Windows#84 ·
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 70/100
libnativeapi/nativeapi#21 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 3 ngày
-
enhancement P3 performance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
thomhurst/TUnit#7380 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày