Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DefaultFormatter.EnableStacktrace #160

Closed
gavv opened this issue Nov 23, 2022 · 7 comments
Closed

Add DefaultFormatter.EnableStacktrace #160

gavv opened this issue Nov 23, 2022 · 7 comments
Assignees
Labels
feature New feature or request help wanted Contributions are welcome
Milestone

Comments

@gavv
Copy link
Owner

gavv commented Nov 23, 2022

Add flag EnableStacktrace to DefaultFormatter that enables printing of stacktrace on failure. Formatted stacktrace should be added to FormatData (likely as slice of strings) and used in failure template.

See also #159.

@gavv gavv added feature New feature or request help wanted Contributions are welcome labels Nov 23, 2022
@gavv gavv changed the title Add DefaultFormatter.EnableStacktrace Add DefaultFormatter.EnableStacktraces Nov 23, 2022
@gavv gavv changed the title Add DefaultFormatter.EnableStacktraces Add DefaultFormatter.EnableStacktrace Nov 23, 2022
@fahimbagar
Copy link
Contributor

Hi @gavv, just checking.

What's the difference between this and the chain path? and what's the expected result here? 🤚

Sorry for the dumb question 😄

@gavv
Copy link
Owner Author

gavv commented Feb 27, 2023

Hi, this issue is about regular go stacktrace / backtrace, like you see on panic or crash

https://dev.to/mcaci/reading-stack-traces-in-go-3ah5

It is possible to retrieve it programmatically from go runtime

@gavv
Copy link
Owner Author

gavv commented Feb 27, 2023

Chain path, on the other hand, is a logical representation of path in httpexpect object tree

It doesn't include actual function frames, though it provides similar information in some sense

Most notably, chain path doesn't tell anything about location in user code. It shows path to object, but it doesn't show where that object were actually used when failure happened (maybe it was stored to variable and used later)

@fahimbagar
Copy link
Contributor

Understood. I'll learn about go stacktrace / backtrace first and message you here afterward unless someone picks this up.
Thanks for the answer @gavv.

@diPhantxm
Copy link
Contributor

Hi @gavv
I'm interested in this issue. May I take it?

@gavv
Copy link
Owner Author

gavv commented Apr 6, 2023

@diPhantxm Sure, thanks!

@gavv
Copy link
Owner Author

gavv commented Jun 2, 2023

Landed

@gavv gavv closed this as completed Jun 2, 2023
@gavv gavv added this to the v2 milestone Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request help wanted Contributions are welcome
Projects
None yet
Development

No branches or pull requests

3 participants