Skip to content
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

Upgrade to .NET 9 and OTAPI Static Hooks for ARM64 #3050

Draft
wants to merge 11 commits into
base: general-devel
Choose a base branch
from

Conversation

SignatureBeef
Copy link
Member

@SignatureBeef SignatureBeef commented Jan 11, 2025

This is a draft PR until the sister PR at TSAPI is merged: Pryaxis/TSAPI#254
Subsequently have not yet updated the submodule here, so CI is expected to fail currently.

The specific TShock changes/todos are as follows:

  • Removed the reset client patch, as OTAPI addresses it now, as well as decouples from monomod
  • Removed the achievement initialisers IL modification, utilising static hooks instead, again to decouple from monomod to enable arm64
  • Workflow updates for actions to be moved to v4 (cc @hakusaro), and net9 sdk
  • Upgraded installer to net9 runtime urls
  • Updated launcher plugin manager execution to address assembly failures before resolvers were attaching
  • Updated launcher for dev assembly resolution
  • Update nuget packages (todo)
  • Update TSAPI when merged (figured changing the url isnt wise, so will await for gen-dev merge)
  • Alter CI if failing after TSAPI merge
  • Update changelog
  • Public testing before final merge imo

For those who haven't looked at the TSAPI changes (pending PR merge), it's changes are copied in below:


This PR aims for the following:

  • Target frameworks & workflows updated to net9.0
  • OTAPI and other packages updated
  • Moved to generated OTAPI static hooks, making MonoMod RD optional/supplemental (though, OTAPI.Runtime.dll is still included for those still utilising it, and works on net9)
    • Note: File scoped namespaces was utilised, which is why the diff is more than expected.
  • Expanded workflow to test each platform
  • Reduced OTAPI/ModFw console outputs (e.g. no tile ctor print, short version codes etc)

Considerations that may flow through to a TShock PR (or sooner if desired):

  • OTAPI Static Hook namespace naming preferences e.g. HookEvents.* vs MonoMod RD On.*
  • OTAPI Static Hook EventArgs property naming preferences e.g. ContinueExecution, HookReturnValue
  • If any extra static hooks are needed, current list includes most methods from the following Terraria types:
    • Main, Item, NetMessage, Netplay, NPC, WorldGen, Chat.ChatHelper, IO.WorldFile, Net.NetManager, Projectile, RemoteClient, Liquid, Program.
  • Apple Silicon / ARM64 testing
  • Plugin updates: at the moment should just be a matter of ticking up to net9.0, and matching dependencies/updating

Screenshots

Windows x64

image
image

MacOS Arm64

image image Joining Mac Arm64 from Win64:

image

@SignatureBeef SignatureBeef self-assigned this Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant