From 77fa204ad16fef561c009fcef0ab1fb92a37f986 Mon Sep 17 00:00:00 2001 From: Jonathan Meier Date: Wed, 14 May 2025 22:44:16 +0000 Subject: [PATCH] fix(compiler-cli): rename flag for enabling fast type declaration emission (#61353) Rename the flag `_geminiAllowEmitDeclarationOnly` to `_experimentalAllowEmitDeclarationOnly` as a follow-up on a comment in PR #61334. PR Close #61353 --- goldens/public-api/compiler-cli/compiler_options.api.md | 2 +- .../compiler-cli/src/ngtsc/core/api/src/public_options.ts | 4 ++-- packages/compiler-cli/src/ngtsc/core/src/compiler.ts | 2 +- .../compliance/declaration-only/declaration_only_emit_spec.ts | 2 +- .../compiler-cli/test/ngtsc/declaration_only_emission_spec.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/goldens/public-api/compiler-cli/compiler_options.api.md b/goldens/public-api/compiler-cli/compiler_options.api.md index e9d45462f1e..ebdaefd0360 100644 --- a/goldens/public-api/compiler-cli/compiler_options.api.md +++ b/goldens/public-api/compiler-cli/compiler_options.api.md @@ -7,7 +7,7 @@ // @public export interface BazelAndG3Options { annotateForClosureCompiler?: boolean; - _geminiAllowEmitDeclarationOnly?: boolean; + _experimentalAllowEmitDeclarationOnly?: boolean; generateDeepReexports?: boolean; generateExtraImportsInLocalMode?: boolean; onlyExplicitDeferDependencyImports?: boolean; diff --git a/packages/compiler-cli/src/ngtsc/core/api/src/public_options.ts b/packages/compiler-cli/src/ngtsc/core/api/src/public_options.ts index bad6c20aebc..009d82cac1b 100644 --- a/packages/compiler-cli/src/ngtsc/core/api/src/public_options.ts +++ b/packages/compiler-cli/src/ngtsc/core/api/src/public_options.ts @@ -353,9 +353,9 @@ export interface BazelAndG3Options { * references. * * The mode is experimental and specifically tailored to support fast type declaration emission - * for the Gemini app in g3. + * for the Gemini app in g3 for the initial phase of the experiment. */ - _geminiAllowEmitDeclarationOnly?: boolean; + _experimentalAllowEmitDeclarationOnly?: boolean; } /** diff --git a/packages/compiler-cli/src/ngtsc/core/src/compiler.ts b/packages/compiler-cli/src/ngtsc/core/src/compiler.ts index cc5a375dbce..c66e20ebc67 100644 --- a/packages/compiler-cli/src/ngtsc/core/src/compiler.ts +++ b/packages/compiler-cli/src/ngtsc/core/src/compiler.ts @@ -468,7 +468,7 @@ export class NgCompiler { this.enableLetSyntax = options['_enableLetSyntax'] ?? true; this.enableSelectorless = options['_enableSelectorless'] ?? false; this.emitDeclarationOnly = - !!options.emitDeclarationOnly && !!options._geminiAllowEmitDeclarationOnly; + !!options.emitDeclarationOnly && !!options._experimentalAllowEmitDeclarationOnly; // Standalone by default is enabled since v19. We need to toggle it here, // because the language service extension may be running with the latest // version of the compiler against an older version of Angular. diff --git a/packages/compiler-cli/test/compliance/declaration-only/declaration_only_emit_spec.ts b/packages/compiler-cli/test/compliance/declaration-only/declaration_only_emit_spec.ts index 19f6144b95e..a6bb2dee4ab 100644 --- a/packages/compiler-cli/test/compliance/declaration-only/declaration_only_emit_spec.ts +++ b/packages/compiler-cli/test/compliance/declaration-only/declaration_only_emit_spec.ts @@ -43,7 +43,7 @@ function emitDeclarationOnlyTest(fs: FileSystem, test: ComplianceTest): CompileR }, { ...test.angularCompilerOptions, - _geminiAllowEmitDeclarationOnly: true, + _experimentalAllowEmitDeclarationOnly: true, }, ); } diff --git a/packages/compiler-cli/test/ngtsc/declaration_only_emission_spec.ts b/packages/compiler-cli/test/ngtsc/declaration_only_emission_spec.ts index 6aabb0e50fd..99bc3ab85f6 100644 --- a/packages/compiler-cli/test/ngtsc/declaration_only_emission_spec.ts +++ b/packages/compiler-cli/test/ngtsc/declaration_only_emission_spec.ts @@ -31,7 +31,7 @@ runInEachFileSystem(() => { noCheck: true, }, angularCompilerOptions: { - _geminiAllowEmitDeclarationOnly: true, + _experimentalAllowEmitDeclarationOnly: true, }, }; env.write('tsconfig.json', JSON.stringify(tsconfig, null, 2));