Skip to content

[typespec-ts] Fail to build multi-client packages #4871

Description

@kazrael2119

https://dev.azure.com/azure-sdk/public/_build/results?buildId=6522533&view=logs&j=83516c17-6666-5250-abde-63983ce72a49&t=00be4b52-4a63-5865-8e02-c61723ad0692&l=5597

Root Cause

The build step fails because this is a multi-client package, but the generated tsconfig build inputs are out of sync with the generated warp.config.yml exports.

The generated warp.config.yml exposes every client's entry point as a separate public subpath export:

exports:
  "./package.json": "./package.json"
  ".": "./src/index.ts"
  "./devCenter": "./src/devCenter/index.ts"
  "./devCenter/api": "./src/devCenter/api/index.ts"
  "./devBoxes": "./src/devBoxes/index.ts"
  "./devBoxes/api": "./src/devBoxes/api/index.ts"
  "./deploymentEnvironments": "./src/deploymentEnvironments/index.ts"
  "./deploymentEnvironments/api": "./src/deploymentEnvironments/api/index.ts"
  "./models": "./src/models/index.ts"

However, the generated config/tsconfig.src.*.json files only include the root entry point:
expected:

  "include": [
    "../src/index.ts",
    "../src/devCenter/index.ts",
    "../src/devBoxes/index.ts",
    "../src/deploymentEnvironments/index.ts"
  ]

generate:

  "include": [
    "../src/index.ts",
  ]

The root src/index.ts does not re-export these per-client barrels (./devCenter/index.ts, ./devBoxes/index.ts, ./deploymentEnvironments/index.ts) — it imports the deeper client/api files directly. As a result, TypeScript never emits dist output for those client-level index.ts files. warp then validates the declared exports against dist, finds the corresponding output files missing, and fails the build with DIST_MISSING.

Metadata

Metadata

Labels

emitter:typescriptIssues for @azure-tools/typespec-ts emitter

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions