diff --git a/modules/@angular/compiler-cli/src/codegen.ts b/modules/@angular/compiler-cli/src/codegen.ts index b1ad00d02a..ac74060d2f 100644 --- a/modules/@angular/compiler-cli/src/codegen.ts +++ b/modules/@angular/compiler-cli/src/codegen.ts @@ -72,7 +72,6 @@ export class CodeGenerator { transContent = readFileSync(transFile, 'utf8'); } const {compiler: aotCompiler} = compiler.createAotCompiler(ngCompilerHost, { - debug: options.debug === true, translations: transContent, i18nFormat: cliOptions.i18nFormat, locale: cliOptions.locale, diff --git a/modules/@angular/compiler/src/aot/compiler_factory.ts b/modules/@angular/compiler/src/aot/compiler_factory.ts index 7c68979232..5cacaa97aa 100644 --- a/modules/@angular/compiler/src/aot/compiler_factory.ts +++ b/modules/@angular/compiler/src/aot/compiler_factory.ts @@ -54,9 +54,7 @@ export function createAotCompiler(compilerHost: AotCompilerHost, options: AotCom new HtmlParser(), translations, options.i18nFormat, MissingTranslationStrategy.Warning, console); const config = new CompilerConfig({ - genDebugInfo: options.debug === true, defaultEncapsulation: ViewEncapsulation.Emulated, - logBindingUpdate: false, useJit: false, enableLegacyTemplate: options.enableLegacyTemplate !== false, }); diff --git a/modules/@angular/compiler/src/aot/compiler_options.ts b/modules/@angular/compiler/src/aot/compiler_options.ts index 624e592c54..96b0c9b661 100644 --- a/modules/@angular/compiler/src/aot/compiler_options.ts +++ b/modules/@angular/compiler/src/aot/compiler_options.ts @@ -7,7 +7,6 @@ */ export interface AotCompilerOptions { - debug?: boolean; locale?: string; i18nFormat?: string; translations?: string; diff --git a/modules/@angular/compiler/src/config.ts b/modules/@angular/compiler/src/config.ts index 50f2ca74f9..4e242000b9 100644 --- a/modules/@angular/compiler/src/config.ts +++ b/modules/@angular/compiler/src/config.ts @@ -20,31 +20,17 @@ export class CompilerConfig { public useJit: boolean; public missingTranslation: MissingTranslationStrategy; - private _genDebugInfo: boolean; - private _logBindingUpdate: boolean; - constructor( - {defaultEncapsulation = ViewEncapsulation.Emulated, genDebugInfo, logBindingUpdate, - useJit = true, missingTranslation, enableLegacyTemplate}: { + {defaultEncapsulation = ViewEncapsulation.Emulated, useJit = true, missingTranslation, + enableLegacyTemplate}: { defaultEncapsulation?: ViewEncapsulation, - genDebugInfo?: boolean, - logBindingUpdate?: boolean, useJit?: boolean, missingTranslation?: MissingTranslationStrategy, enableLegacyTemplate?: boolean, } = {}) { this.defaultEncapsulation = defaultEncapsulation; - this._genDebugInfo = genDebugInfo; - this._logBindingUpdate = logBindingUpdate; this.useJit = useJit; this.missingTranslation = missingTranslation; this.enableLegacyTemplate = enableLegacyTemplate !== false; } - - get genDebugInfo(): boolean { - return this._genDebugInfo === void 0 ? isDevMode() : this._genDebugInfo; - } - get logBindingUpdate(): boolean { - return this._logBindingUpdate === void 0 ? isDevMode() : this._logBindingUpdate; - } } diff --git a/modules/@angular/compiler/src/i18n/extractor.ts b/modules/@angular/compiler/src/i18n/extractor.ts index 28a30360a6..be90bc40f2 100644 --- a/modules/@angular/compiler/src/i18n/extractor.ts +++ b/modules/@angular/compiler/src/i18n/extractor.ts @@ -97,12 +97,8 @@ export class Extractor { const staticReflector = new StaticReflector(staticSymbolResolver); StaticAndDynamicReflectionCapabilities.install(staticReflector); - const config = new CompilerConfig({ - genDebugInfo: false, - defaultEncapsulation: ViewEncapsulation.Emulated, - logBindingUpdate: false, - useJit: false - }); + const config = + new CompilerConfig({defaultEncapsulation: ViewEncapsulation.Emulated, useJit: false}); const normalizer = new DirectiveNormalizer( {get: (url: string) => host.loadResource(url)}, urlResolver, htmlParser, config); diff --git a/modules/@angular/compiler/src/jit/compiler_factory.ts b/modules/@angular/compiler/src/jit/compiler_factory.ts index caedc2e69f..fecb7daa03 100644 --- a/modules/@angular/compiler/src/jit/compiler_factory.ts +++ b/modules/@angular/compiler/src/jit/compiler_factory.ts @@ -111,16 +111,12 @@ export class JitCompilerFactory implements CompilerFactory { provide: CompilerConfig, useFactory: () => { return new CompilerConfig({ - // let explicit values from the compiler options overwrite options - // from the app providers. E.g. important for the testing platform. - genDebugInfo: opts.useDebug, // let explicit values from the compiler options overwrite options // from the app providers useJit: opts.useJit, // let explicit values from the compiler options overwrite options // from the app providers defaultEncapsulation: opts.defaultEncapsulation, - logBindingUpdate: opts.useDebug, missingTranslation: opts.missingTranslation, enableLegacyTemplate: opts.enableLegacyTemplate, }); @@ -150,7 +146,6 @@ export const platformCoreDynamic = createPlatformFactory(platformCore, 'coreDyna function _mergeOptions(optionsArr: CompilerOptions[]): CompilerOptions { return { - useDebug: _lastDefined(optionsArr.map(options => options.useDebug)), useJit: _lastDefined(optionsArr.map(options => options.useJit)), defaultEncapsulation: _lastDefined(optionsArr.map(options => options.defaultEncapsulation)), providers: _mergeArrays(optionsArr.map(options => options.providers)), diff --git a/modules/@angular/core/src/linker/compiler.ts b/modules/@angular/core/src/linker/compiler.ts index 2c0bcf613e..c521756288 100644 --- a/modules/@angular/core/src/linker/compiler.ts +++ b/modules/@angular/core/src/linker/compiler.ts @@ -93,6 +93,9 @@ export class Compiler { * @experimental */ export type CompilerOptions = { + /** + * @deprecated since v4 this option has no effect anymore. + */ useDebug?: boolean, useJit?: boolean, defaultEncapsulation?: ViewEncapsulation, diff --git a/modules/@angular/language-service/src/typescript_host.ts b/modules/@angular/language-service/src/typescript_host.ts index 5191ff2edf..3a1d161399 100644 --- a/modules/@angular/language-service/src/typescript_host.ts +++ b/modules/@angular/language-service/src/typescript_host.ts @@ -107,14 +107,9 @@ export class TypeScriptServiceHost implements LanguageServiceHost { const urlResolver = createOfflineCompileUrlResolver(); const htmlParser = new DummyHtmlParser(); // This tracks the CompileConfig in codegen.ts. Currently these options - // are hard-coded except for genDebugInfo which is not applicable as we - // never generate code. - const config = new CompilerConfig({ - genDebugInfo: false, - defaultEncapsulation: ViewEncapsulation.Emulated, - logBindingUpdate: false, - useJit: false - }); + // are hard-coded. + const config = + new CompilerConfig({defaultEncapsulation: ViewEncapsulation.Emulated, useJit: false}); const directiveNormalizer = new DirectiveNormalizer(resourceLoader, urlResolver, htmlParser, config); diff --git a/tools/@angular/tsc-wrapped/src/options.ts b/tools/@angular/tsc-wrapped/src/options.ts index 44505c122f..4e3c7e9df3 100644 --- a/tools/@angular/tsc-wrapped/src/options.ts +++ b/tools/@angular/tsc-wrapped/src/options.ts @@ -76,7 +76,7 @@ interface Options extends ts.CompilerOptions { // Print extra information while running the compiler trace?: boolean; - // Whether to embed debug information in the compiled templates + /** @deprecated since v4 this option has no effect anymore. */ debug?: boolean; // Whether to enable support for