Skip to content

Commit 51259ee

Browse files
committed
Fix yarn install parallelization issue
When you have multiple yarn processes running at once they fall over themselves (and the cache) in a hilariously bad fashion. Only way to fix this is via file or network mutex. I've decided to use the former.
1 parent 8e0d4d5 commit 51259ee

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ install(DIRECTORY "${boost_lib_dir}" DESTINATION "${CMAKE_INSTALL_PREFIX}")
9090

9191
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
9292
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
93+
set(yarn_mutex_file ${CMAKE_CURRENT_SOURCE_DIR}/.yarn-mutex)
9394

9495
add_subdirectory(cbmc)
9596

env-model-generator/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ add_custom_command(
1414
OUTPUT ${javascript_files}
1515
DEPENDS ${typescript_files};package.json
1616
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
17-
COMMAND yarn install
17+
COMMAND yarn install --mutex file:${yarn_mutex_file}
1818
COMMAND yarn run build
1919
)

trace-transformer/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ add_custom_command(
1313
OUTPUT ${javascript_files}
1414
DEPENDS ${typescript_files};package.json
1515
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
16-
COMMAND yarn install
16+
COMMAND yarn install --mutex file:${yarn_mutex_file}
1717
COMMAND yarn run build
1818
)

0 commit comments

Comments
 (0)