Open v-jiaodi opened 3 months ago
@tadelesh we have below tcgc error when generating tsp here and could you help verify why?
tsp: https://github.com/Azure/autorest.typescript/tree/main/packages/typespec-test/test/widget_dpg/spec error:
TypeError: Cannot read properties of undefined (reading 'kind')
TypeError: Cannot read properties of undefined (reading 'kind')
at getClientTypeWithDiagnostics (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@azure-tools+typespec-client-generator-corTypeError: Cannot read properties of undefined (reading 'kind')
at getClientTypeWithDiagnostics (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@azure-tools+typespec-client-generator-cor at getClientTypeWithDiagnostics (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@azure-tools+typespec-client-generator-core@0.47.0-dev.10_l7jrr73zx765sxmuxn22t3astq/node_modules/@azure-tools/typespec-client-generator-core/src/types.ts:994:16)
at updateTypesFromOperation (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@azure-tools+typespec-client-generator-core@0.47.0-dev.10_l7jrr73zx765sxmuxn22t3astq/node_modules/@azure-tools/typespec-client-generator-core/src/types.ts:1561:9)
at getAllModelsWithDiagnostics (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@azure-tools+typespec-client-generator-core@0.47.0-dev.10_l7jrr73zx765sxmuxn22t3astq/node_modules/@azure-tools/typespec-client-generator-core/src/types.ts:1785:26)
at getSdkPackage (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@azure-tools+typespec-client-generator-core@0.47.0-dev.10_l7jrr73zx765sxmuxn22t3astq/node_modules/@azure-tools/typespec-client-generator-core/src/package.ts:737:43)
at createSdkContext (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@azure-tools+typespec-client-generator-core@0.47.0-dev.10_l7jrr73zx765sxmuxn22t3astq/node_modules/@azure-tools/typespec-client-generator-core/src/decorators.ts:672:44)
at createContextWithDefaultOptions (file:///D:/Js-sdk-sync/uprepo/packages/typespec-ts/src/index.ts:428:17)
at Object.$onEmit [as emitFunction] (file:///D:/Js-sdk-sync/uprepo/packages/typespec-ts/src/index.ts:91:28)
at runEmitter (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@typespec+compiler@0.61.0-dev.21/node_modules/@typespec/compiler/src/core/program.ts:578:21)
at compile (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@typespec+compiler@0.61.0-dev.21/node_modules/@typespec/compiler/src/core/program.ts:252:11)
at compileOnce (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@typespec+compiler@0.61.0-dev.21/node_modules/@typespec/compiler/src/core/cli/actions/compile/compile.ts:65:21)
@tadelesh we have below tcgc error when generating tsp here and could you help verify why?
tsp: https://github.com/Azure/autorest.typescript/tree/main/packages/typespec-test/test/widget_dpg/spec error:
TypeError: Cannot read properties of undefined (reading 'kind') TypeError: Cannot read properties of undefined (reading 'kind') at getClientTypeWithDiagnostics (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@azure-tools+typespec-client-generator-corTypeError: Cannot read properties of undefined (reading 'kind') at getClientTypeWithDiagnostics (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@azure-tools+typespec-client-generator-cor at getClientTypeWithDiagnostics (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@azure-tools+typespec-client-generator-core@0.47.0-dev.10_l7jrr73zx765sxmuxn22t3astq/node_modules/@azure-tools/typespec-client-generator-core/src/types.ts:994:16) at updateTypesFromOperation (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@azure-tools+typespec-client-generator-core@0.47.0-dev.10_l7jrr73zx765sxmuxn22t3astq/node_modules/@azure-tools/typespec-client-generator-core/src/types.ts:1561:9) at getAllModelsWithDiagnostics (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@azure-tools+typespec-client-generator-core@0.47.0-dev.10_l7jrr73zx765sxmuxn22t3astq/node_modules/@azure-tools/typespec-client-generator-core/src/types.ts:1785:26) at getSdkPackage (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@azure-tools+typespec-client-generator-core@0.47.0-dev.10_l7jrr73zx765sxmuxn22t3astq/node_modules/@azure-tools/typespec-client-generator-core/src/package.ts:737:43) at createSdkContext (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@azure-tools+typespec-client-generator-core@0.47.0-dev.10_l7jrr73zx765sxmuxn22t3astq/node_modules/@azure-tools/typespec-client-generator-core/src/decorators.ts:672:44) at createContextWithDefaultOptions (file:///D:/Js-sdk-sync/uprepo/packages/typespec-ts/src/index.ts:428:17) at Object.$onEmit [as emitFunction] (file:///D:/Js-sdk-sync/uprepo/packages/typespec-ts/src/index.ts:91:28) at runEmitter (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@typespec+compiler@0.61.0-dev.21/node_modules/@typespec/compiler/src/core/program.ts:578:21) at compile (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@typespec+compiler@0.61.0-dev.21/node_modules/@typespec/compiler/src/core/program.ts:252:11) at compileOnce (file:///D:/Js-sdk-sync/uprepo/common/temp/node_modules/.pnpm/@typespec+compiler@0.61.0-dev.21/node_modules/@typespec/compiler/src/core/cli/actions/compile/compile.ts:65:21)
fixed in tcgc: https://github.com/Azure/typespec-azure/pull/1659
Monitor @typespec/compiler dev version build https://dev.azure.com/azure-sdk/public/_build/results?buildId=4208243&view=logs&j=aa4563e2-7f5a-5a88-019c-341451fd8a67&t=3351c2db-8046-5507-7e56-867b3895d138
step: 1.run
npm install -g @typespec/compiler@next
npx @azure-tools/typespec-bump-deps@latest pnpm-config.json --add-rush-overrides
npx @azure-tools/typespec-bump-deps@latest package.json
npx @azure-tools/typespec-bump-deps@latest package.json
rush update && rush build
rushx copy:typespec
andrushx generate-tsp-only:rlc