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

Suppress source locations from src/Test/Hspec/Hedgehog.hs #25

Merged
merged 1 commit into from
Sep 8, 2023
Merged

Suppress source locations from src/Test/Hspec/Hedgehog.hs #25

merged 1 commit into from
Sep 8, 2023

Conversation

sol
Copy link
Member

@sol sol commented Feb 26, 2023

No description provided.

Copy link
Collaborator

@parsonsmatt parsonsmatt left a comment

Choose a reason for hiding this comment

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

What's the problem this is intending to solve?

src/Test/Hspec/Hedgehog.hs Outdated Show resolved Hide resolved
@sol
Copy link
Member Author

sol commented Jul 18, 2023

What's the problem this is intending to solve?

property has a HasCallStack constraint that we "close" in Test.Hspec.Hedgehog => for a user this stack / location is hardly ever helpful => it is better to suppress it

Note that Hedgehog does not regularly show these unhelpful locations to the user, as evalIO, ==, etc capture their own call stack, which Hedgehog will then use instead. However, if e.g. an exception escapes, then Hedgehog will use them as a fallback. If you want to play around with it, then e.g. add liftIO $ throwIO (ErrorCall "foo") to some property.

@sol
Copy link
Member Author

sol commented Sep 7, 2023

@parsonsmatt any chance to get this merged sometime soon?

@parsonsmatt
Copy link
Collaborator

Sure! Sorry for the delay. Do you mind adding a changelog entry and a version bump so I can release asap?

@sol
Copy link
Member Author

sol commented Sep 8, 2023

Sure! Sorry for the delay. Do you mind adding a changelog entry and a version bump so I can release asap?

Done as a separate PR (#27) to not unnecessarily cause conflicts.

@parsonsmatt parsonsmatt merged commit 5429afc into hspec:master Sep 8, 2023
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