kotest icon indicating copy to clipboard operation
kotest copied to clipboard

Improve stacktraces of shouldMatchEach

Open sebek64 opened this issue 1 year ago • 6 comments

When using shouldMatchEach, the stacktraces only refer to this function, not to a particular failure. This change fixes that, so that:

  • if there is a single failure, it merges the stacktraces
  • if there are multiple failures, it explicitly puts the stacktraces into the string failures representations It is a draft for now, because:
  • it changes the public api (didn't find a way how to do that without this change)
  • it doesn't change all operators consistently, only one Any kind of feedback is welcome.

sebek64 avatar Jun 18 '24 15:06 sebek64

Is this ready to come out of draft?

sksamuel avatar Jul 20 '24 10:07 sksamuel

Ok, rebased and moving out of draft. The concern "it doesn't change all operators consistently, only one" is still valid.

sebek64 avatar Jul 24 '24 11:07 sebek64

There are test failures, sorry about not fixing them immediately. I'll provide a fixed version in a few days.

sebek64 avatar Jul 29 '24 12:07 sebek64

Tests should be fixed.

sebek64 avatar Jul 29 '24 14:07 sebek64

Tried to fix the windows build.

sebek64 avatar Oct 02 '24 07:10 sebek64

As a result of my fix, I also broke macos build :( I'll try to find a solution for all platforms.

sebek64 avatar Oct 03 '24 06:10 sebek64

What's left to get this merged? Anything I can help with ?

sksamuel avatar Dec 15 '24 09:12 sksamuel

Actually I forgot about it, I'll try to find some time to fix the missing piece in the following days.

sebek64 avatar Dec 16 '24 12:12 sebek64

Closing this one as it's a bit stale. Let us know if we should reopen

LeoColman avatar Mar 31 '25 12:03 LeoColman

Yes, I don't have time to fix all platform-specific test failures. I'll reopen it if I find some time to do it. Anyone is welcome to do it, of course.

sebek64 avatar Mar 31 '25 12:03 sebek64