fix: resolve imported resource types in resource position lookup#32
Merged
fix: resolve imported resource types in resource position lookup#32
Conversation
When a component imports a resource type (e.g., Import(15) at type 24) and defines canonical ResourceRep/ResourceNew using a different type ID (type 25, Defined), resolve_resource_positions now falls back to single-candidate matching when the exact type ID lookup fails. This handles the common case where a component has exactly one resource type with a given canonical prefix. Also documents the 3-component resource table routing issue: when the resource is defined by a third component (not caller or callee), the adapter needs caller-side resource lookup, not callee-side. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
avrabe
added a commit
that referenced
this pull request
Mar 18, 2026
fix: propagate resource type aliases in resource import map (#31) fix: resolve instance alias arguments in propagate_outer_wiring When a composed component uses alias export to create an instance alias, propagate_outer_wiring now correctly resolves the alias to find the source sub-component. Previously only direct Instance entries were mapped; alias-created instances silently failed. Changes instance_infos from Vec to HashMap keyed by absolute instance index, and handles InstanceExportAlias by chasing the alias chain. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
avrabe
added a commit
that referenced
this pull request
Mar 18, 2026
* fix: resolve instance alias arguments in propagate_outer_wiring When a composed component uses `alias export $inst "..." (instance)`, propagate_outer_wiring now correctly resolves the alias to find the source sub-component. Previously only direct Instance entries were mapped; alias-created instances silently failed, causing import resolution to fall back to "first non-self match" by name. Changes instance_infos from Vec to HashMap keyed by absolute instance index, and handles InstanceExportAlias by chasing the alias chain. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * fix: resolve imported resource types in resource position lookup (#32) fix: propagate resource type aliases in resource import map (#31) fix: resolve instance alias arguments in propagate_outer_wiring When a composed component uses alias export to create an instance alias, propagate_outer_wiring now correctly resolves the alias to find the source sub-component. Previously only direct Instance entries were mapped; alias-created instances silently failed. Changes instance_infos from Vec to HashMap keyed by absolute instance index, and handles InstanceExportAlias by chasing the alias chain. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
resolve_resource_positionsnow falls back to single-candidate matching when exact resource type ID lookup failsImport(15)at type 24) has a different type ID than the canonicalResourceRep/ResourceNewentry (type 25,Defined)resource_floatsContext
The
resource_floatsfixture progressed through 3 error states:Test plan
🤖 Generated with Claude Code