Skip to content

Commit

Permalink
add trailing comment when color is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Sep 13, 2024
1 parent e989f0c commit 98e301d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/gf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2539,15 +2539,22 @@ static void record_precompile_statement(jl_method_instance_t *mi, double compila
}
}
if (!jl_has_free_typevars(mi->specTypes)) {
if (is_recompile && s_precompile == JL_STDERR)
if (is_recompile && s_precompile == JL_STDERR && jl_options.color != JL_OPTIONS_COLOR_OFF)
jl_printf(s_precompile, "\e[33m");
if (jl_options.trace_compile_timing)
jl_printf(s_precompile, "#= %6.1f ms =# ", compilation_time / 1e6);
jl_printf(s_precompile, "precompile(");
jl_static_show(s_precompile, mi->specTypes);
jl_printf(s_precompile, ")\n");
if (is_recompile && s_precompile == JL_STDERR)
jl_printf(s_precompile, "\e[0m");
jl_printf(s_precompile, ")");
if (is_recompile && s_precompile == JL_STDERR) {
if (jl_options.color != JL_OPTIONS_COLOR_OFF) {
jl_printf(s_precompile, "\e[0m");
}
else {
jl_printf(s_precompile, " # recompile");
}
}
jl_printf(s_precompile, "\n");
if (s_precompile != JL_STDERR)
ios_flush(&f_precompile);
}
Expand Down

0 comments on commit 98e301d

Please sign in to comment.