You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for reporting this issue. The same logic that applies to return types and property types for resolving cross-package references was missed in the calculation of map value types. The following PR will resolve this issue: #3561
…ses. (#3561)
Closes#3534Closes#3556
This PR adds cross-package resolution in some cases where it was
missing.
In the case of operation inputs, missing effective model type
calculation was causing some input types not to be resolved to external
packages.
In the case of map value types, the calculation of the right hand side
type did not correctly account for the possibility of the type being in
another package, and it now uses the same machinery as other type
references to instrument imports and cross-package references.
The existing scenario test has been extended to prevent regressions and
also extended to test arrays for good measure, though those were working
as expected.
---------
Co-authored-by: Will Temple <[email protected]>
Co-authored-by: Timothee Guerin <[email protected]>
Describe the bug
The protobuf emitter drops the package prefix from the map value type for maps that use an imported model as the value.
Reproduction
https://typespec.io/playground?c=aW1wb3J0ICJAdHlwZXNwZWMvcHJvdG9idWYiOw0KDQp1c2luZyBUeXBlU3BlYy5Qxx3FHEBwYWNrYWdlKHsNCiAgbmFtZTogIm15c2hhcmVkIiwNCn0pDQrEF3NwYWNlIE15U8UaIMUvbW9kZWwgRHVtbXnGESAgQGZpZWxkKDEpIHg6IHN0cmluZzvEGn0NCn3ccGVydmljZdVxxhvMck15TG9jYWzSdG06IE1hcDzGeCzpAK4u5QCjPucAiMQHQOgBBS7HesQVaW50ZXJmzXZzyGRlY2hvKC4uLsd7KTrPXesA5Q%3D%3D&e=%40typespec%2Fprotobuf&options=%7B%7D
Checklist
The text was updated successfully, but these errors were encountered: