The pre-push hook builds the same packages twice at once
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- github, node.js, typescript
- Lĩnh vực
- build-system, ci-cd, tooling
Hướng nghiên cứu
Open lefthook.yml from the reproduction link and inspect the parallel pre-push commands. The issue identifies the fix direction: invoke Nx once for both build and test targets so shared build tasks are planned once. Confirm the hook uses that single invocation; the reported task graph has 21 builds and 10 test runs.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
The pre-push hook runs pnpm nx affected -t test and pnpm nx affected -t build as two commands with parallel: true. test depends on ^build, so both plan the builds of the affected packages' dependencies: on a branch that changes packages/bundler-metro, the two task graphs share 13 build tasks, @react-native-harness/bundler-metro:build among them. When those builds are not in the Nx cache, two tsc --build processes write the same dist at once. On Windows that failed my push:
error TS5033: Could not write file '…/packages/bundler-metro/dist/__tests__/resolver.test.d.ts.map': EBUSY: resource busy or locked
TypeScript then kept that error in packages/bundler-metro/dist/tsconfig.lib.tsbuildinfo, and every later build of the package failed the same way until that file was removed.
One invocation, pnpm nx affected -t build test --base=origin/main --head=HEAD --outputStyle=static, plans each build once (31 tasks: 21 builds and 10 test runs). I can open a PR with that change.
System Info
System:
OS: Windows 11 10.0.26200
Binaries:
Node: 26.8.1
React Native Harness Version
1.6.0 (main at bca0781)
Reproduction
https://github.com/callstackincubator/react-native-harness/blob/main/lefthook.yml
Steps to reproduce
- On a branch that changes
packages/bundler-metro, runpnpm nx affected -t test --base=origin/main --head=HEAD --graph=test.jsonandpnpm nx affected -t build --base=origin/main --head=HEAD --graph=build.json: both graphs hold the same 13buildtasks. - Push the branch with those builds missing from the Nx cache: both hook commands build the packages at the same time, and on Windows their writes to one file can collide as above.
- Ngôn ngữ chính
- TypeScript
- Star
- 333
- Fork
- 20
- Merge trung bình
- 14 giờ 55 phút
- Pull request đã merge (30 ngày)
- 44
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 callstackincubator/react-native-harness
-
--metroPort is documented, but the CLI rejects it as an unrecognized optionCó thể đã có người làm @YevheniiKotyrlo đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
callstackincubator/react-native-harness#199 ·
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 78/100
callstackincubator/react-native-harness#128 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
callstackincubator/react-native-harness#277 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
callstackincubator/react-native-harness#273 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Android Activity recreation during a UI test is not reported as a host lifecycle changeCó thể đã có người làm @mrousavy đã nhận 1 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
callstackincubator/react-native-harness#271 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của callstackincubator/react-native-harness
Issue tương tự
-
area:agent-view area:tui bug platform:macos
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
anthropics/claude-code#104558 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[CURRICULUM] computation fakdĐang mởupdater
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
UniversityOfHelsinkiCS/oodikone#5141 ·
-
maintanance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
inmanta/web-console#7606 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug skills
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
equinor/fusion-framework#5846 ·
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 74/100