Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 18, 2025

Updated Lib.Harmony from 2.3.6 to 2.4.0.

Release notes

Sourced from Lib.Harmony's releases.

2.4.0.0

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

  • HarmonyException serialization: HarmonyException is no longer marked [Serializable], so it can no longer be marshalled across AppDomains or remoted contexts

New Contributors

Full Changelog: pardeike/Harmony@v2.3.6.0...v2.4.0.0

Commits viewable in compare view.

Dependabot compatibility score

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 rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will 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 version will 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 dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

---
updated-dependencies:
- dependency-name: Lib.Harmony
  dependency-version: 2.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Aug 18, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 18, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Join our Discord community for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Aug 25, 2025

Superseded by #54.

@dependabot dependabot bot closed this Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant