rspec / rspec-core

RSpec runner and formatters
http://rspec.info
MIT License
1.23k stars 765 forks source link

Most recent call last backtraces #2989

Closed markburns closed 6 days ago

markburns commented 1 year ago

Subject of the issue

I'm not sure if this is an issue or already configurable or mentioned elsewhere or something, or even if feature requests go elsewhere. So apologies in advance if I need to look elsewhere.

But since ruby 2.5 we get reversed backtraces. I.e. most recent call last. I did have a quick search but didn't find anything.

Traceback (most recent call last):

I'm a fan of them and keep getting thrown off by now needing to scan to the top and the bottom because of RSpec output versus exception backtraces. sometimes seeing a bit of both depending on the test.

I think overall having the mix of the two is worse than keeping the old most recent first approach.

Your environment

Steps to reproduce

run a failing spec and look at the backtrace. It will be with most recent first.

Expected behavior

If configured reverse the backtrace output to have most recent last.

Actual behavior

Most recent first.

JonRowe commented 1 year ago

You're welcome to open a PR adding this feature, note that it will need to be within our notifications that process this to make the backtrace reversible to all formatters.

JonRowe commented 6 days ago

Closing due to inactivity during the monorepo migration, but if someone wanted to revisit this they'd be welcome.