Skip to content

Commit

Permalink
Fixed race condition in build of scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mpscholten committed Nov 21, 2022
1 parent c244aa5 commit cfc9b4f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion NixSupport/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,14 @@ in
mkdir -p Application/Script
SCRIPT_TARGETS=`find Application/Script -type f -iwholename '*.hs' -not -name 'Prelude.hs' -exec basename {} .hs ';' | sed 's#^#build/bin/Script/#' | tr "\n" " "`
if [[ ! -z "$SCRIPT_TARGETS" ]]; then
make -j $SCRIPT_TARGETS;
# Need to use -j1 here to avoid race conditions of temp files created by GHC.
#
# These errors look like:
#
# <no location info>: error:
# build/RunUnoptimizedProdServer/Application/Script/Prelude.o.tmp: renameFile:renamePath:rename: does not exist (No such file or directory)
#
make -j1 $SCRIPT_TARGETS;
fi;
'';
installPhase = ''
Expand Down

0 comments on commit cfc9b4f

Please sign in to comment.