Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[protobuf] Handle cross-package references correctly in some buggy cases. #3561

Merged
merged 4 commits into from
Jun 11, 2024

Conversation

witemple-msft
Copy link
Member

Closes #3534
Closes #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.

@azure-sdk
Copy link
Collaborator

azure-sdk commented Jun 11, 2024

All changed packages have been documented.

  • @typespec/protobuf
Show changes

@typespec/protobuf - fix ✏️

Corrected cross-package reference behavior in some buggy cases.

@azure-sdk
Copy link
Collaborator

You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/3561/

Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/prs/3561/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:protobuf The protobuf emitter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Protobuf emitter incorrect map value type [Bug]: Protobuf emitter incorrect rpc request type
4 participants