Skip to content

Add feature backtrace - #526

Open
target-san wants to merge 29 commits into
proptest-rs:mainfrom
target-san:feature/backtrace
Open

Add feature backtrace#526
target-san wants to merge 29 commits into
proptest-rs:mainfrom
target-san:feature/backtrace

Conversation

@target-san

@target-san target-san commented Oct 6, 2024

Copy link
Copy Markdown
Contributor

Enables collection of full backtraces:

  • when panic occurs inside test, but only if handle-panics feature is enabled
  • when prop_assert macro or any of its derivatives is used

///
/// This is constructed via `.into()` on a `String`, `&'static str`, or
/// `Box<str>`.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would removal of these traits not be considered public API breaking? It would seem so to me since any client reliant on the methods of the removed traits would no longer work.

(Sorry for getting back to this so late, thank you for your patience 🙇)

@target-san target-san Oct 30, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These had to be implemented manually below - because Backtrace can't implement them, except Debug which would be just too verbose. Please check lines 83+ and 165+.

Comment thread proptest-macro/Cargo.toml
# Transitive dependency of `insta`, v0.15.10 requires MSRV 1.66
console = "=0.15.8"
# Transitive dependency of `insta`, v0.1.14+ requires some features unstable on Rust 1.65
unicode-width = "=0.1.13"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the MSRV is much higher now so this may need to be adjusted

@target-san

Copy link
Copy Markdown
Contributor Author

Sorry, won't be able to check this until end of next week. And I'll need to recheck it - it's been a year since I posted this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants