-
Notifications
You must be signed in to change notification settings - Fork 837
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
Remove unpatching functionality from instrumentation package #3301
Comments
There were discussions about this in the past, see #618 and #732. As instrumentation and instrumentations are still experimental no deprecation cylce is needed usually. But we might want some replacement for tests. I think two flags per instrumentation make sense:
|
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue was closed because it has been stale for 14 days with no activity. |
Unpatching in many cases is a "lie" because to be able to do that we need indirection between the patched function and the caller. For functions we cannot assure that for, we either have to
Even this:
... renders unpatching useless. Requiring with de-structuring is an increasingly common pattern. What makes it even worse is that TS compiler currently hides that by referencing objects dynamically in the compiled asset:
Other languages don't have functionality to dynamically "unpatch", in many of them it's even unthinkable. The only use-case I know of are the tests if one has to run all tests in one process, but that can be mitigated by emptying the require cache between the tests and calling require again.
I propose we move towards removing it in the future(with a proper deprecation process, etc). WDYT?
Additional questions:
disable
and how it should be implemented across instrumentations,The text was updated successfully, but these errors were encountered: