Skip to content

Include declaring type generic args in the ResolveReflection cache key - #321

Merged
nike4613 merged 1 commit into
MonoMod:reorganizefrom
cryptiklemur:resolve-cache-generic-declaring-type
Sep 18, 2026
Merged

nike4613 merged 1 commit into
MonoMod:reorganizefrom
cryptiklemur:resolve-cache-generic-declaring-type

Conversation

@cryptiklemur

@cryptiklemur cryptiklemur commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

A member whose declaring type is a generic instance, but which is not a generic instance itself, builds its cache key in the else branch. GetID() names the generic arguments but carries no assembly for them, so two copies
of the argument type collide on one key:

List<Ability>::GetEnumerator()  ->  "...List`1<RimWorld.Ability>::GetEnumerator() | mscorlib, Version=...@#<hash>, NOMODULE"

Hit in RimWorld under Prepatcher, which loads a second Assembly-CSharp and marks the first reflection-only: ConcordLib/RimWorld#1

@cryptiklemur
cryptiklemur marked this pull request as ready for review September 18, 2026 18:58
@nike4613
nike4613 merged commit df2c02e into MonoMod:reorganize Sep 18, 2026
183 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants