fix: print messages to stderr

This ensures that errors during dependency resolution in the Makefile actually show up
This commit is contained in:
Sebastian Ullrich 2019-11-10 13:40:48 +01:00 committed by Leonardo de Moura
parent 3e74159e01
commit 1f601708e4
3 changed files with 3 additions and 3 deletions

View file

@ -34,7 +34,7 @@ std::ostream & operator<<(std::ostream & out, message const & msg) {
void report_message(message const & msg0) {
if (!get_global_ios().get_options().get_bool(name {"trace", "as_messages"}, false)) {
// Print immediately. Still add as a message so that we get the error code correct.
get_global_ios().get_regular_stream() << msg0;
get_global_ios().get_diagnostic_stream() << msg0;
}
lean_assert(global_message_log());
global_message_log()->add(msg0);

View file

@ -26,7 +26,7 @@ if diff --color --help >/dev/null 2>&1; then
fi
echo "-- testing $f"
"$LEAN" "$ff" | sed 's|does\\not\\exist|does/not/exist|' | sed "/warning: imported file uses 'sorry'/d" | sed "/warning: using 'sorry'/d" | sed "/failed to elaborate theorem/d" | sed "s|^$ff|$f|" > "$f.produced.out"
"$LEAN" "$ff" 2>&1 | sed 's|does\\not\\exist|does/not/exist|' | sed "/warning: imported file uses 'sorry'/d" | sed "/warning: using 'sorry'/d" | sed "/failed to elaborate theorem/d" | sed "s|^$ff|$f|" > "$f.produced.out"
if test -f "$f.expected.out"; then
if $DIFF -u --ignore-all-space -I "executing external script" "$f.expected.out" "$f.produced.out"; then
echo "-- checked"

View file

@ -37,7 +37,7 @@ if [ $? -ne 0 ]; then
exit 1
fi
$BIN_DIR/lean --plugin="$ff.so" "$ff" | sed "s|^$ff|$f|" > "$f.produced.out"
$BIN_DIR/lean --plugin="$ff.so" "$ff" 2>&1 | sed "s|^$ff|$f|" > "$f.produced.out"
if test -f "$f.expected.out"; then
if $DIFF -u --ignore-all-space -I "executing external script" "$f.expected.out" "$f.produced.out"; then
echo "-- checked"