You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since harmony is a runtime IL weaver, it has some limitations:
generic methods can't be patched consistently
inlined methods can't be patched at all
breakpoints in patched methods don't work
Because of limitation 1 we can't use harmony to implement step attributes (step function may be a generic function).
Limitation 2 prevent harmony patches from working. That means the following stops working if the corresponding target method is inlined by the CLR:
Argument reporting by allure-xunit when the pre-enumeration is disabled (either explicitly or implicitly by xunit)
Selective run in allure-xunit
Selective run in allure-specflow
Limitation 3 is confusing. A workaround is to put a breakpoint somewhere in a nested call instead, but it isn't obvious to a user.
We also can't use AspectInjector instead of harmony because AspectInjector lacks generic API to select methods to patch (it only provided attribute-based API).
Eventually we're stuck with using two IL weavers in a single project.
Proposed solution
We may replace harmony and aspect injector with hand-written IL weaver that is based on Mono.Cecil (the library harmony and aspect injector are both based on). The weaver should just allow us to hook into xunit theories, fixtures, and step functions.
Motivation
The are two key motivations:
To make allure-xunit behavior more straightforward and consistent with regard to debugging and report content.
To reduce the number of dependencies.
The text was updated successfully, but these errors were encountered:
Starting from (most probably) 2.10.0-preview.1 we will be using harmony for the following tasks:
Since harmony is a runtime IL weaver, it has some limitations:
Because of limitation 1 we can't use harmony to implement step attributes (step function may be a generic function).
Limitation 2 prevent harmony patches from working. That means the following stops working if the corresponding target method is inlined by the CLR:
Limitation 3 is confusing. A workaround is to put a breakpoint somewhere in a nested call instead, but it isn't obvious to a user.
We also can't use AspectInjector instead of harmony because AspectInjector lacks generic API to select methods to patch (it only provided attribute-based API).
Eventually we're stuck with using two IL weavers in a single project.
Proposed solution
We may replace harmony and aspect injector with hand-written IL weaver that is based on Mono.Cecil (the library harmony and aspect injector are both based on). The weaver should just allow us to hook into xunit theories, fixtures, and step functions.
Motivation
The are two key motivations:
The text was updated successfully, but these errors were encountered: