From b1ab16a5bf24da71cd4ff64b3861e37a0188bb6c Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 10 Sep 2024 17:06:41 +0800 Subject: [PATCH] http-client-java, report TCGC diagnostics --- packages/http-client-java/emitter/src/code-model-builder.ts | 2 ++ .../generator/http-client-generator-test/package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/http-client-java/emitter/src/code-model-builder.ts b/packages/http-client-java/emitter/src/code-model-builder.ts index 263da6dd15..99842d5de5 100644 --- a/packages/http-client-java/emitter/src/code-model-builder.ts +++ b/packages/http-client-java/emitter/src/code-model-builder.ts @@ -244,6 +244,8 @@ export class CodeModelBuilder { versioning: { previewStringRegex: /$/ }, }); // include all versions and do the filter by ourselves + this.program.reportDiagnostics(this.sdkContext.diagnostics); + // auth // TODO: it is not very likely, but different client could have different auth const auth = getAuthentication(this.program, this.serviceNamespace); diff --git a/packages/http-client-java/generator/http-client-generator-test/package.json b/packages/http-client-java/generator/http-client-generator-test/package.json index 0e86b34aeb..dea1e001b6 100644 --- a/packages/http-client-java/generator/http-client-generator-test/package.json +++ b/packages/http-client-java/generator/http-client-generator-test/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "type": "module", "scripts": { - "clean": "rimraf ./node_modules/@typespec/http-client-java ./package-lock.json", + "clean": "rimraf ./node_modules/@typespec/http-client-java ./package-lock.json ./tsp-output", "format": "npm run -s prettier -- --write", "check-format": "npm run prettier -- --check", "prettier": "prettier --config ./.prettierrc.yaml **/*.tsp",