Skip to content

Add instead hook#39

Merged
jordanmontt merged 9 commits intomasterfrom
feature/instead
Dec 19, 2025
Merged

Add instead hook#39
jordanmontt merged 9 commits intomasterfrom
feature/instead

Conversation

@guillep
Copy link
Contributor

@guillep guillep commented Dec 18, 2025

Add support for instead hook.

The instead hook works alone, it is by design combined with before/after.
If you apply the instead hook, you should apply the before and after altogether, in that single hook.
That is, the before/after hooks are ignored even if defined.

This leaves us with four different instrumentation variants.

  • before only, then forward to normal method
  • after only, forwarding to normal method
  • before and after around forwarding to normal method
  • instead of normal method

Depends on #38

@guillep guillep marked this pull request as draft December 18, 2025 11:10
@guillep guillep marked this pull request as ready for review December 18, 2025 11:16
Fix instead trap generation bug
@jordanmontt
Copy link
Member

Great!!!!

@jordanmontt jordanmontt merged commit 72cc7df into master Dec 19, 2025
9 checks passed
@jordanmontt jordanmontt deleted the feature/instead branch December 19, 2025 13: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.

2 participants