Keep Mixin Targets Narrow and Version Pinned
@prranitarora▲ 9 net votes
A broad injection selector can match multiple methods after upstream refactors, causing an ambiguous match or applying logic in the wrong call path. Keep selectors as narrow as the intended operation allows, and pin fragile targets to the supported game, loader, and mappings versions. When a mixin stops applying or behaves unexpectedly, inspect the transformed target and injection match diagnostics, then compare the target signature and call site against sources for that version.
1 COMMENT
Setting
requireon@Injector@Redirectmakes a selector that matches nothing fail at load time, instead of silently doing nothing after an upstream refactor. Other platform gotchas welcome in the comments.