Bug #14558


"Backtrace in reverse order" always upsets my brain!

Added by gfx (Goro FUJI) over 6 years ago. Updated about 4 years ago.

Target version:
ruby -v:
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]


A Ruby 2.5.0 feature "backtrace in reverse order", issued in, is confusing in developing Rails applications because I can't expect the order: it sometimes "reversed", sometimes "non-reversed". It just sucks.

Please revert this feature, or provide a way to disable it.

Updated by mrkn (Kenta Murata) over 6 years ago

it sometimes "reversed", sometimes "non-reversed"

Is it acceptable that the backtrace is always new, 2.5-style order?

Updated by gfx (Goro FUJI) over 6 years ago

mrkn (Kenta Murata) wrote:

it sometimes "reversed", sometimes "non-reversed"

Is it acceptable that the backtrace is always new, 2.5-style order?

Might be acceptable, or at least it's better than the current "random" order.

Why not provide a way to customize it, for example RubyVM.backtrace_reverse_order = -> (io) { true }, where -> (io) { io.tty? } is the algorithm that 2.5.0 has.

Updated by shevegen (Robert A. Heiler) over 6 years ago

I think I understand what Goro Fuji refers to.

It sometimes takes me a while as well to adjust to the change, too.

What I found in particular hard is when it is a long backtrace AND
when the .rb file names are long and deeply branched on the local
filesystem, for example:


Then it becomes quite difficult for me to see where the error is
because it is overflowing on my console output. This leads to a
situation where the error reported number is on the right side,
but the error is often on the next line overflow on the left
side, which actually makes the intent of the change a bit moot
since it may take me longer than before to find the error. :D

I think the suggestion to customize it would be best. Then people
could use what they prefer in regards to the order style in use.

I don't mind the changed tracking order so much as such, but I think
it really would be best if there is some way to customize it, either
at run-time, or settable at compile-time via a configure switch
or both ways (but "run-time" is probably best, as Goro Fuji showed
in his example).

Updated by vo.x (Vit Ondruch) over 6 years ago

I wish the original backtrace order is back. If at least the order was consistent. I must agree that the current situation is unbearable.

Updated by jeremyevans0 (Jeremy Evans) about 4 years ago

  • Status changed from Open to Closed

The backtrace order was switched back in 487d0c99d53208594702bb3ce1c657130fb8d65f.


Also available in: Atom PDF