Skip to content

feat(forge): support for console.log on Invariant handlers#5488

Merged
mattsse merged 10 commits intomasterfrom
evalir/invariant-console-logs
Aug 10, 2023
Merged

feat(forge): support for console.log on Invariant handlers#5488
mattsse merged 10 commits intomasterfrom
evalir/invariant-console-logs

Conversation

@Evalir
Copy link
Member

@Evalir Evalir commented Jul 27, 2023

Motivation

Closes #4951

Solution

Adds support for console logs on invariant handlers, by persisting the logs and traces for the last call.

To avoid any performance regressions we only move values and only copy where absolutely necessary (filling each invariant with the corresponding logs at the end), and only persist the call values at the end of each run campaign, as they would just be overwriting values persisted at the stack otherwise.

@Evalir Evalir force-pushed the evalir/invariant-console-logs branch from 9a152fb to 5ec303e Compare July 27, 2023 22:21
@Evalir
Copy link
Member Author

Evalir commented Jul 27, 2023

hey hey @mds1 mind sanity testing this too? this is a highly requested feature so wanna make sure all is good ^^

@mds1
Copy link
Collaborator

mds1 commented Jul 27, 2023

For sure, again tagging @lucas-manuel and @PaulRBerg for testing assistance too 😁

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

smol nit

@Evalir Evalir requested a review from mattsse July 31, 2023 20:07
@Evalir
Copy link
Member Author

Evalir commented Aug 10, 2023

cc @mattsse this should be good for another review round—functionality is sound

@mattsse mattsse merged commit e707371 into master Aug 10, 2023
@mattsse mattsse deleted the evalir/invariant-console-logs branch August 10, 2023 10:29
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.

feat(forge): enable console logging in invariant handlers

3 participants