Project

General

Profile

Bug #14558

"Backtrace in reverse order" always upsets my brain!

Added by gfx (Goro FUJI) over 1 year ago. Updated over 1 year ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]
[ruby-core:85855]

Description

A Ruby 2.5.0 feature "backtrace in reverse order", issued in https://bugs.ruby-lang.org/issues/8661, 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.

History

Updated by mrkn (Kenta Murata) over 1 year 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 1 year 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 1 year 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:

/foo/bar/bla/somewhere_anywhere/really_long_path/very_long_name_of_a_file.rb

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 1 year 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.

Also available in: Atom PDF