Skip to content

[Storage] Error when using @@alternateType for SDK crate-defined model #931

@vincenttran-msft

Description

@vincenttran-msft

.tsp: Azure/azure-rest-api-specs#42277
Full output:

Image

error @azure-tools/typespec-rust/InternalError: The emitter encountered an internal error during preprocessing. Please open an issue at https://github.com/Azure/typespec-rust/issues and include the complete error message.
unhandled headerScalar param type kind external
Error: unhandled headerScalar param type kind external
at getHeaderPathQueryParamValue (file:///C:/azure-sdk-for-rust/sdk/storage/azure_storage_blob/TempTypeSpecFiles/node_modules/@azure-tools/typespec-rust/src/codegen/clients.ts:2043:15)
at Object.body (file:///C:/azure-sdk-for-rust/sdk/storage/azure_storage_blob/TempTypeSpecFiles/node_modules/@azure-tools/typespec-rust/src/codegen/clients.ts:1140:103)
at Module.buildIfBlock (file:///C:/azure-sdk-for-rust/sdk/storage/azure_storage_blob/TempTypeSpecFiles/node_modules/@azure-tools/typespec-rust/src/codegen/helpers.ts:423:19)
at getParamValueHelper (file:///C:/azure-sdk-for-rust/sdk/storage/azure_storage_blob/TempTypeSpecFiles/node_modules/@azure-tools/typespec-rust/src/codegen/clients.ts:884:39)
at applyHeaderParams (file:///C:/azure-sdk-for-rust/sdk/storage/azure_storage_blob/TempTypeSpecFiles/node_modules/@azure-tools/typespec-rust/src/codegen/clients.ts:1132:13)
at constructRequest (file:///C:/azure-sdk-for-rust/sdk/storage/azure_storage_blob/TempTypeSpecFiles/node_modules/@azure-tools/typespec-rust/src/codegen/clients.ts:1173:11)
at getAsyncMethodBody (file:///C:/azure-sdk-for-rust/sdk/storage/azure_storage_blob/TempTypeSpecFiles/node_modules/@azure-tools/typespec-rust/src/codegen/clients.ts:1333:25)
at methodBody (file:///C:/azure-sdk-for-rust/sdk/storage/azure_storage_blob/TempTypeSpecFiles/node_modules/@azure-tools/typespec-rust/src/codegen/clients.ts:217:20)
at emitClients (file:///C:/azure-sdk-for-rust/sdk/storage/azure_storage_blob/TempTypeSpecFiles/node_modules/@azure-tools/typespec-rust/src/codegen/clients.ts:265:40)
at file:///C:/azure-sdk-for-rust/sdk/storage/azure_storage_blob/TempTypeSpecFiles/node_modules/@azure-tools/typespec-rust/src/codegen/codeGenerator.ts:86:29

Failed to generate client

Once we get support for this scenario, we would be able to remove all the into() from HttpRange to coerce it into String for APIs such as range parameter in upload_page.
Azure/azure-sdk-for-rust#4145

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions