[Windows] CMake build fails with "build.ninja still dirty" due to long path limit (CMAKE_OBJECT_PATH_MAX) using pnpm in a Monorepo
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- android, cmake, cpp, react-native
- Área
- build-system, mobile-dev
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C++
- Estrellas
- 792
- Forks
- 65
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de margelo/react-native-worklets-core
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
margelo/react-native-worklets-core#271 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
margelo/react-native-worklets-core#269 · 2 reacciones ·
-
Unable to download JS bundleAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
margelo/react-native-worklets-core#268 · 2 comentarios ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
margelo/react-native-worklets-core#267 · 1 comentario · 1 reacción ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
margelo/react-native-worklets-core#266 · 1 comentario · 2 reacciones ·
Todos los issues de margelo/react-native-worklets-core
Issues similares
-
Component: Python API
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Vector35/binaryninja-api#8649 ·
Los mantenedores suelen responder en 3 días
-
ai_p2 comp-parquet-reader-v3
Dificultad 2/5 Medio día Aptitud para principiantes 66/100
ClickHouse/ClickHouse#124986 ·
Los mantenedores suelen responder en 1 día
-
bug product: very_good_flutter_plugin
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
VeryGoodOpenSource/very_good_templates#654 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
AcademySoftwareFoundation/OpenImageIO#5550 ·
Los mantenedores suelen responder en 2 días