Bump Lib.Harmony from 2.3.6 to 2.4.2 #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updated Lib.Harmony from 2.3.6 to 2.4.2.
Release notes
Sourced from Lib.Harmony's releases.
2.4.2
Harmony 2.4.2 upgrades MonoMod.Core to v1.3.3 and now supports NET 10!
What's Changed
Full Changelog: pardeike/Harmony@v2.4.1.0...v2.4.2.0
2.4.1
Harmony v2.4.1 mainly fixes that v2.4 leaked types of Mono.Cecil.* to the public API.
What's Changed
Full Changelog: pardeike/Harmony@v2.4.0.0...v2.4.1.0
2.4
Harmony 2.4 includes a lot of bug fixes and now supports arm64!
Enjoy and consider supporting me on Patreon or become a GitHub sponsor!
Changelog
Added
Full support for arm64 across all operating systems, including Apple Silicon
Configurable error handler: A new API lets you register a global error handler that Harmony invokes whenever a patch throws an exception. This allows logging or suppressing errors centrally
Extended CodeMatcher API: New methods—RemoveSearchForward, RemoveSearchBackward, RemoveUntilForward, RemoveUntilBackward and Do—make it easier to remove or transform instruction sequences via CodeMatcher
Struct patching: [HarmonyPatch] attributes can now target methods defined in structs, not just classes
Additional MethodType cases: Harmony’s API now covers more method kinds (e.g., async methods, property accessors or operators). This broadens the range of targets you can patch
Simpler manual patch registration: The PatchClassProcessor no longer requires Harmony‑specific attributes when registering patches programmatically
Changed
Patch serialization: PatchInfo now uses ToArray() instead of MemoryStream.GetBuffer to serialize patches, improving compatibility across .NET runtimes
JSON serialization improvements: InnerMethod and patch classes gained custom System.Text.Json converters. Patch information now serializes round‑trip correctly and fields such as infixes were replaced with innerprefixes and innerpostfixes (new infix system)
Exception handling: try/fault blocks emitted by Harmony are now compiled as try/catch/finally and won't fail to patch anymore
Fixed
Correct index for local variables: CodeInstructionExtensions.LocalIndex now checks whether an operand is a LocalBuilder; it returns the correct LocalIndex instead of converting to int, preventing mis‑indexed local variables in transpilers
Infix negative position bug: Matching of negative positions in infix patches was corrected; positions counting from the end now compute the index properly
Argument validation for InnerMethod: Creating an InnerMethod now throws ArgumentNullException if method is null and ArgumentException if any position is zero, preventing silent errors
Stream memory handling: A bug where patch generation incorrectly used MemoryStream.GetBuffer (which could include unused capacity) was fixed; ToArray is now used instead
IL offset logging: IL offsets are logged again and reported accurately when debugging patched methods (commit referenced in release tag).
Removed
New Contributors
CodeInstructionExtensions.LocalIndexpardeike/Harmony#682Full Changelog: pardeike/Harmony@v2.3.6.0...v2.4.0.0
Commits viewable in compare view.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)