Azure / autorest.typescript

Extension for AutoRest (https://github.com/Azure/autorest) that generates TypeScript code. The transpiled javascript code is isomorphic. It can be run in browser and in node.js environment.
MIT License
179 stars 75 forks source link

Monitor @typespec/compiler next version #2753

Open v-jiaodi opened 3 months ago

v-jiaodi commented 3 months ago

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

  1. common/config/rush run npx @azure-tools/typespec-bump-deps@latest pnpm-config.json --add-rush-overrides
  2. packages/typespec-test run npx @azure-tools/typespec-bump-deps@latest package.json
  3. packages/typespec-test run npx @azure-tools/typespec-bump-deps@latest package.json
  4. run rush update && rush build
  5. run rushx copy:typespec and rushx generate-tsp-only:rlc
MaryGao commented 1 month 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 commented 1 month 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)

fixed in tcgc: https://github.com/Azure/typespec-azure/pull/1659