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

update to typespec-rust 0.5.1 #1968

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

cataggar
Copy link
Member

This updates the dependencies, matching devDependencies from azure-sdk-for-python emitter-package.json.

This allowed me to get further when attempting to generate a client for AVS:

~/ms/azure-sdk-for-rust> pwsh ./eng/common/scripts/TypeSpec-Project-Process.ps1 /Users/cataggar/ms/azure-rest-api-specs/specification/vmware/Microsoft.AVS.Management 64f6997950d8bee63f314563cedaa20148db2186 https://github.com/Azure/azure-rest-api-specs

I set SaveInput to true to debug. With this PR, the generated tspconfig.yaml

  "@azure-tools/typespec-rust":
    package-dir: "azure_mgmt_avs"

But it will need setting for crate-name and crate-version. I'm assuming those will be loaded from the directory. I'm also not sure what the new naming convention will be.

  "@azure-tools/typespec-rust":
    package-dir: "azure_mgmt_avs"
    crate-name: "azure_mgmt_avs"
    crate-version: "0.1.0"

I hit a bug and will file a separate issue for:

Emitter "@azure-tools/typespec-rust" crashed! This is a bug.
Please file an issue at https://github.com/Azure/typespec-rust/issues

Error: unhandled tcgc type enumvalue
    at Adapter.getType (file:///Users/cataggar/ms/azure-sdk-for-rust/sdk/avs/azure_mgmt_avs/TempTypeSpecFiles/Microsoft.AVS.(file:///Users/cataggar/ms/azure-sdk-for-rust/sdk/avs/azure_mgmt_avs/TempTypeSpecFiles/Microsoft.AVS.

@@ -1,11 +1,19 @@
{
"main": "dist/src/index.js",
"dependencies": {
"@azure-tools/typespec-rust": "0.3.0"
"@azure-tools/typespec-rust": "0.5.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll have 0.6.0 out later today, let's wait for that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.6.0 is now available.

"@typespec/xml": "0.62.0"
"@azure-tools/typespec-autorest": "~0.49.0",
"@azure-tools/typespec-azure-core": "~0.49.0",
"@azure-tools/typespec-client-generator-core": "0.49.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be bumped to 0.49.1 once emitter version 0.6.0 is picked up.

return (Split-Path $projectDirectory -Leaf)
}

function Get-rust-EmitterAdditionalOptions([string]$projectDirectory) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What calls this? The contents make sense, I just don't know how it's wired into the build.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/cc @hallipr

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

Successfully merging this pull request may close these issues.

4 participants