autorest.csharp: Add Protocol Methods In Generated SDK of (Gen 1) Convenience Client not working
The instructions here do not seem to work anymore. Trying the same steps in the article result in the following error:
❯ dotnet build .\Azure.Data.Tables\src /t:GenerateCode
Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
All projects are up-to-date for restore.
AutoRest code generation utility [cli version: 3.6.1; node: v16.13.0]
(node:47648) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
info | AutoRest core version selected from configuration: 3.8.4.
(node:45300) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
info | Loading AutoRest core 'C:\Users\chriss\.autorest\@autorestcore@3.8.4\nodemodules\@autorest\core\dist' (3.8.4)
warning | DeprecatedConfig | Using directive.0.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.1.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.2.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.3.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.4.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.5.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.6.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.7.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.8.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.9.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.10.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.11.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.12.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.13.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.14.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.15.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.16.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.17.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.18.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.19.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.20.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.21.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.22.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.23.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.24.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.25.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.26.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.27.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.28.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.29.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.30.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.31.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.32.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.33.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.34.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.35.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.36.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.37.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.38.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.39.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.40.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.41.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.42.suppress which is deprecated and will be removed in the future.
warning | DeprecatedConfig | Using directive.43.suppress which is deprecated and will be removed in the future.
info | Loading local AutoRest extension '@autorest/csharp' (C:/Users/chriss/.nuget/packages/microsoft.azure.autorest.csharp/3.0.0-beta.20220817.6/buildMultiTargeting/../tools/netcoreapp3.1/any/)
info | Loading AutoRest extension '@autorest/modelerfour' (4.23.7->4.23.7)
warning | OutdatedExtension | Semantic violation: Extension 'x-ms-code-generation-settings' is not supported in Autorest V3. It will just be ignored. (info > x-ms-code-generation-settings)
- https://github.com/Azure/azure-rest-api-specs/blob/2df8b07bf9af7c96066ca4dda21b79297307d108/specification/cosmos-db/data-plane/Microsoft.Tables/preview/2019-02-02/table.json:6:5
warning | IgnoredPropertyNextToRef | Semantic violation: Sibling values alongside $ref will be ignored. See https://github.com/Azure/autorest/blob/main/docs/openapi/howto/$ref-siblings.md for allowed values (components > schemas > SignedIdentifiers > items)
keys: [ 'xml' ]
- https://github.com/Azure/azure-rest-api-specs/blob/2df8b07bf9af7c96066ca4dda21b79297307d108/specification/cosmos-db/data-plane/Microsoft.Tables/preview/2019-02-02/table.json:1641:7
warning | PreCheck/SchemaMissingType | The schema 'Metrics' with an undefined type and declared properties is a bit ambiguous. This has been auto-corrected to 'type:object'
- https://github.com/Azure/azure-rest-api-specs/blob/2df8b07bf9af7c96066ca4dda21b79297307d108/specification/cosmos-db/data-plane/Microsoft.Tables/preview/2019-02-02/table.json:1389:5
warning | PreCheck/CheckDuplicateSchemas | Checking for duplicate schemas, this could take a (long) while. Run with --verbose for more detail.
warning | Deprecated | seal-single-value-enum-by-default is a temporary flag that WILL be removed in the future. Please change the spec to add x-ms-enum.modelAsString=false for enums with this issue.
warning | Deprecated | seal-single-value-enum-by-default is a temporary flag that WILL be removed in the future. Please change the spec to add x-ms-enum.modelAsString=false for enums with this issue.
warning | Deprecated | seal-single-value-enum-by-default is a temporary flag that WILL be removed in the future. Please change the spec to add x-ms-enum.modelAsString=false for enums with this issue.
warning | Deprecated | seal-single-value-enum-by-default is a temporary flag that WILL be removed in the future. Please change the spec to add x-ms-enum.modelAsString=false for enums with this issue.
warning | Deprecated | seal-single-value-enum-by-default is a temporary flag that WILL be removed in the future. Please change the spec to add x-ms-enum.modelAsString=false for enums with this issue.
warning | Deprecated | seal-single-value-enum-by-default is a temporary flag that WILL be removed in the future. Please change the spec to add x-ms-enum.modelAsString=false for enums with this issue.
warning | Deprecated | seal-single-value-enum-by-default is a temporary flag that WILL be removed in the future. Please change the spec to add x-ms-enum.modelAsString=false for enums with this issue.
warning | Deprecated | seal-single-value-enum-by-default is a temporary flag that WILL be removed in the future. Please change the spec to add x-ms-enum.modelAsString=false for enums with this issue.
warning | Deprecated | seal-single-value-enum-by-default is a temporary flag that WILL be removed in the future. Please change the spec to add x-ms-enum.modelAsString=false for enums with this issue.
warning | Deprecated | seal-single-value-enum-by-default is a temporary flag that WILL be removed in the future. Please change the spec to add x-ms-enum.modelAsString=false for enums with this issue.
Stack overflow.
fatal | Process() cancelled due to failure
error | [Exception] AutoRest extension '@autorest/csharp' terminated.
EXEC : error | error : [Exception] AutoRest extension '@autorest/csharp' terminated. [C:\src\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Azure.Data.Tables.csproj]
error | Autorest completed with an error. If you think the error message is unclear, or is a bug, please declare an issues at https://github.com/Azure/autorest/issues with the error message you are seeing.
C:\Users\chriss\.nuget\packages\microsoft.azure.autorest.csharp\3.0.0-beta.20220817.6\buildMultiTargeting\Microsoft.Azure.AutoRest.CSharp.targets(39,5): error MSB3073: The command "node C:\Users\chriss\.nuget\packages\microsoft.azure.autorest.csharp\3.0.0-beta.20220817.6\buildMultiTargeting\../tools/autorest/entrypoints/app.js --max-memory-size=8192 --skip-csproj --skip-upgrade-check --version=3.8.4 C:\src\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src/autorest.md --use=C:\Users\chriss\.nuget\packages\microsoft.azure.autorest.csharp\3.0.0-beta.20220817.6\buildMultiTargeting\../tools/netcoreapp3.1/any/ --clear-output-folder=true --shared-source-folders="C:\src\azure-sdk-for-net\eng\/../sdk/core/Azure.Core/src/Shared/;C:\Users\chriss\.nuget\packages\microsoft.azure.autorest.csharp\3.0.0-beta.20220817.6\buildMultiTargeting\../content/Generator.Shared/" --output-folder=C:\src\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src/Generated --namespace=Azure.Data.Tables" exited with code 1. [C:\src\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Azure.Data.Tables.csproj]
Build FAILED.
EXEC : error | error : [Exception] AutoRest extension '@autorest/csharp' terminated. [C:\src\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Azure.Data.Tables.csproj]
C:\Users\chriss\.nuget\packages\microsoft.azure.autorest.csharp\3.0.0-beta.20220817.6\buildMultiTargeting\Microsoft.Azure.AutoRest.CSharp.targets(39,5): error MSB3073: The command "node C:\Users\chriss\.nuget\packages\microsoft.azure.autorest.csharp\3.0.0-beta.20220817.6\buildMultiTargeting\../tools/autorest/entrypoints/app.js --max-memory-size=8192 --skip-csproj --skip-upgrade-check --version=3.8.4 C:\src\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src/autorest.md --use=C:\Users\chriss\.nuget\packages\microsoft.azure.autorest.csharp\3.0.0-beta.20220817.6\buildMultiTargeting\../tools/netcoreapp3.1/any/ --clear-output-folder=true --shared-source-folders="C:\src\azure-sdk-for-net\eng\/../sdk/core/Azure.Core/src/Shared/;C:\Users\chriss\.nuget\packages\microsoft.azure.autorest.csharp\3.0.0-beta.20220817.6\buildMultiTargeting\../content/Generator.Shared/" --output-folder=C:\src\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src/Generated --namespace=Azure.Data.Tables" exited with code 1. [C:\src\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Azure.Data.Tables.csproj]
0 Warning(s)
2 Error(s)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (17 by maintainers)
Commits related to this issue
- fix(dataplane): infinite recursion in protocol methods ininitialization There is an infinite recursion between `DataPlaneOutputLibaray.EnsureRestClients()` and `DataPlaneRestClient.GetProtocolMethods... — committed to archerzz/autorest.csharp by archerzz 2 years ago
- fix(dataplane): infinite recursion in protocol methods ininitialization (#2624) There is an infinite recursion between `DataPlaneOutputLibaray.EnsureRestClients()` and `DataPlaneRestClient.GetProtoco... — committed to Azure/autorest.csharp by archerzz 2 years ago
- Fix #2620: Add Protocol Methods In Generated SDK of (Gen 1) Convenience Client not working — committed to AlexanderSher/autorest.csharp by AlexanderSher 2 years ago
The issue should have been fixed in PR: https://github.com/Azure/autorest.csharp/pull/2624
@chunyu3 It is failing in the main branch. You can use this autorest.md file and add below config similar to this doc:
This is an infinite recursion caused by recent changes.
@archerzz, @chunyu3, @pshao25 - Just FYI, here is the test project and here are the test cases for this feature.