Skip to content

Conversation

simonrozsival
Copy link
Member

@simonrozsival simonrozsival commented Mar 12, 2025

This is a follow-up to #9856

#9846 showed that several tests are failing with the new managed type map. This PR addresses two of these issues:

  1. Use assembly qualified type name instead of just full name for the managed -> Java mapping
  2. Handle generic types correctly:
    • for managed -> java mapping, include all the different types which map to the same java class name (e.g., JavaList and JavaList<object> both map to java/util/ArrayList)
    • for java -> managed mapping, prefer non-generic base classes over generic subclasses (e.g., map java/util/ArrayList to JavaList instead of JavaList<>)

These changes now break roundtripping (JavaList<T> -> java/util/ArrayList -> JavaList). This broke the current way of checking for hash collisions. I haven't figured out a good way to replace these checks. Since we aren't checking hash collisions in native type maps, maybe we don't need to do the collision checks in the managed type map either.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2025
@akoeplinger akoeplinger deleted the dev/simonrozsival/add-assembly-name-to-typemap-hash branch June 2, 2025 14:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant