Skip to content

Commit

Permalink
add recompile comment in --trace-compile in terminal color mode too (#…
Browse files Browse the repository at this point in the history
…56275)

Update: Just adds the comment in color terminal mode too

---

I didn't think adding the `# recompile` text to the end in the repl was
a good idea as it increases likelihood of text wrapping.
And the color should be sufficient for local review, but when people
copy from a color terminal we lose the recompile info.

So this just adds a zero-length change indicator, for people to look out
for.
  • Loading branch information
IanButterworth authored Oct 22, 2024
1 parent 6de6b46 commit e4101b7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/gf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2566,12 +2566,10 @@ static void record_precompile_statement(jl_method_instance_t *mi, double compila
jl_static_show(s_precompile, mi->specTypes);
jl_printf(s_precompile, ")");
if (is_recompile) {
jl_printf(s_precompile, " # recompile");
if (s_precompile == JL_STDERR && 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)
Expand Down

0 comments on commit e4101b7

Please sign in to comment.