[Windows] CMake build fails with "build.ninja still dirty" due to long path limit (CMAKE_OBJECT_PATH_MAX) using pnpm in a Monorepo
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- android, cmake, cpp, react-native
- Lĩnh vực
- build-system, mobile-dev
Hướng nghiên cứu
Start with the Android CMakeLists.txt and the CMAKE_OBJECT_PATH_MAX warning described in the issue. Reproduce on Windows in a pnpm workspace with cd android && ./gradlew clean build, then inspect how the generated object paths reach the 250-character limit. Done means the Android build completes without the Ninja manifest error, or the Windows and pnpm monorepo limitation is documented.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
When building the Android project on Windows inside a pnpm monorepo workspace, the build consistently fails with a ninja: error: manifest 'build.ninja' still dirty after 100 tries error.
This is caused by CMake's 250-character limit (CMAKE_OBJECT_PATH_MAX). Because pnpm creates a deeply nested virtual store structure (e.g., .pnpm/react-native-worklets@...), CMake flattens this long absolute path into the object file name (e.g., C_..._JSIWorkletsModuleProxy.cpp.o). The combined length easily exceeds the OS/CMake limit, preventing Ninja from successfully writing and tracking the compiled files.
Environment
- OS: Windows (10/11) with Registry Long Paths Enabled
- Package Manager: pnpm (Workspace / Monorepo setup)
- Library Version: 12.6.0
- React Native Version: 0.81.5
Steps to Reproduce
- Initialize a React Native project on Windows inside a pnpm workspace.
- Add this library as a dependency.
- Run
pnpm install. - Trigger the Android build (e.g., cd android && ./gradlew clean build).
- Observe the CMake warning followed by the Ninja infinite loop error.
Logs / Error Output
CMake Warning in CMakeLists.txt:
The object file directory
C:/<project>/node_modules/.pnpm/[email protected].../node_modules/react-native-worklets/android/.cxx/Debug/324x203h/arm64-v8a/CMakeFiles/worklets.dir/./
has 191 characters. The maximum full path to an object file is 250 characters (see CMAKE_OBJECT_PATH_MAX). Object file
C:/<project>/node_modules/.pnpm/[email protected].../node_modules/react-native-worklets/Common/cpp/worklets/NativeModules/JSIWorkletsModuleProxy.cpp.o
cannot be safely placed under this directory. The build may not work correctly.
ninja: error: manifest 'build.ninja' still dirty after 100 tries
Proposed Solution / Feature Request
Could the CMakeLists.txt for the Android build be updated to handle long paths more gracefully on Windows? Some other React Native libraries solve this by configuring CMake to output object files into a hashed directory structure (using CMAKE_OBJECT_PATH_MAX workarounds or altering CMAKE_CXX_COMPILER outputs) instead of flattening the entire absolute path.
Alternatively, if there is a known setup guide for Windows + pnpm monorepo users, adding it to the documentation would be highly appreciated.
- Ngôn ngữ chính
- C++
- Star
- 791
- Fork
- 66
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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 margelo/react-native-worklets-core
-
Worklets without captured variables are rejected as "Regular javascript function" when transpiled by react-native-worklets' Babel pluginCó thể đã có người làm @wn-na đã nhận 1 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
margelo/react-native-worklets-core#271 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
margelo/react-native-worklets-core#269 · 2 reaction ·
-
Unable to download JS bundleĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
margelo/react-native-worklets-core#268 · 2 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
margelo/react-native-worklets-core#267 · 1 bình luận · 1 reaction ·
Tất cả issue của margelo/react-native-worklets-core
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
(S1 - Need confirmation)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
CleverRaven/Cataclysm-DDA#89182 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai_p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
ClickHouse/ClickHouse#126833 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
clang:static analyzer
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
llvm/llvm-project#233598 · 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 72/100