Skip to content

Commit

Permalink
Comment on why we need to drop some messages produced by GHC.
Browse files Browse the repository at this point in the history
  • Loading branch information
facundominguez authored and mergify-bot committed Dec 17, 2021
1 parent 40427ff commit 3153d04
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions haskell/private/ghc_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ if [ "$2" == "--persistent_worker" ]; then
# wrapping GHC. Not ready for production usage.
exec "${compile_flags[@]}" --persistent_worker
else
# Drop messages that GHC produces on features that we rely upon.
#
# "Loaded" is emitted when using GHC environment files, which we
# use as poor man's response files for GHC.
#
# "Warning: the following files ..." is produced when we tell GHC
# to load object files in the interpreter in the build action
# of haskell_module which doesn't do any linking.
while IFS= read -r line; do extra_args+=("$line"); done < "$2"
"${compile_flags[@]}" "${extra_args[@]}" 2>&1 \
| while IFS= read -r line; do [[ $line =~ ^(Loaded|Warning: the following files would be used as linker inputs, but linking is not being done:) ]] || echo "$line"; done >&2
Expand Down

0 comments on commit 3153d04

Please sign in to comment.