From b40844523bdefa53bd643a9c79f080bd35ef49d9 Mon Sep 17 00:00:00 2001 From: Alex Rickabaugh Date: Thu, 23 May 2019 12:28:12 -0700 Subject: [PATCH] feat(core): deprecate integration with the Web Tracing Framework (WTF) (#30642) DEPRECATION: Angular previously has supported an integration with the Web Tracing Framework (WTF) for performance testing of Angular applications. This integration has not been maintained and likely does not work for the majority of Angular applications today. As a result, we are deprecating the integration in Angular version 8. This deprecation covers the following public APIs: * `WtfScopeFn` * `wtfCreateScope` * `wtfStartTimeRange` * `wtfEndTimeRange` * `wtfLeave` FW-1338 #resolve PR Close #30642 --- aio/content/guide/deprecations.md | 11 +++++++++++ packages/core/src/profile/profile.ts | 4 ++++ packages/core/src/profile/wtf_impl.ts | 1 + tools/public_api_guard/core/core.d.ts | 5 +++++ 4 files changed, 21 insertions(+) diff --git a/aio/content/guide/deprecations.md b/aio/content/guide/deprecations.md index 09106111f4c..c056238c3f0 100644 --- a/aio/content/guide/deprecations.md +++ b/aio/content/guide/deprecations.md @@ -101,6 +101,11 @@ Tip: In the [API reference section](api) of this doc site, deprecated APIs are i | [`Renderer`](api/core/Renderer) | [`Renderer2`](api/core/Renderer2) | v4 | none | | [`RootRenderer`](api/core/RootRenderer) | [`RendererFactory2`](api/core/RendererFactory2) | v4 | none | | [`ViewEncapsulation.Native`](api/core/ViewEncapsulation#Native) | [`ViewEncapsulation.ShadowDom`](api/core/ViewEncapsulation#ShadowDom) | v6 | Use the native encapsulation mechanism of the renderer. See [view.ts](https://github.com/angular/angular/blob/3e992e18ebf51d6036818f26c3d77b52d3ec48eb/packages/core/src/metadata/view.ts#L32). +| [`WtfScopeFn`](api/core/WtfScopeFn) | none | v8 | See [Web Tracing Framework](#wtf) | +| [`wtfCreateScope`](api/core/wtfCreateScope) | none | v8 | See [Web Tracing Framework](#wtf) | +| [`wtfStartTimeRange`](api/core/wtfStartTimeRange) | none | v8 | See [Web Tracing Framework](#wtf) | +| [`wtfEndTimeRange`](api/core/wtfEndTimeRange) | none | v8 | See [Web Tracing Framework](#wtf) | +| [`wtfLeave`](api/core/wtfLeave) | none | v8 | See [Web Tracing Framework](#wtf) | {@a forms} @@ -142,6 +147,12 @@ This section lists all of the currently-deprecated features, which includes temp +{@a wtf} +### Web Tracing Framework integration + +Angular previously has supported an integration with the Web Tracing Framework (WTF) for performance testing of Angular applications. This integration has not been maintained and likely does not work for the majority of Angular applications today. As a result, we are deprecating the integration in Angular version 8. + + {@a deep-component-style-selector} ### `/deep/`, `>>>` and `:ng-deep` component style selectors diff --git a/packages/core/src/profile/profile.ts b/packages/core/src/profile/profile.ts index 07a774c1335..70563b59f1f 100644 --- a/packages/core/src/profile/profile.ts +++ b/packages/core/src/profile/profile.ts @@ -49,6 +49,7 @@ function noopScope(arg0?: any, arg1?: any): any { * an exception is expected during normal execution while profiling. * * @publicApi + * @deprecated the Web Tracing Framework is no longer supported in Angular */ export const wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn = wtfEnabled ? createScope : (signature: string, flags?: any) => noopScope; @@ -61,6 +62,7 @@ export const wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn = * * Returns the `returnValue for easy chaining. * @publicApi + * @deprecated the Web Tracing Framework is no longer supported in Angular */ export const wtfLeave: (scope: any, returnValue?: T) => T = wtfEnabled ? leave : (s: any, r?: any) => r; @@ -77,6 +79,7 @@ export const wtfLeave: (scope: any, returnValue?: T) => T = * }); * } * @publicApi + * @deprecated the Web Tracing Framework is no longer supported in Angular */ export const wtfStartTimeRange: (rangeType: string, action: string) => any = wtfEnabled ? startTimeRange : (rangeType: string, action: string) => null; @@ -86,5 +89,6 @@ export const wtfStartTimeRange: (rangeType: string, action: string) => any = * [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been * enabled. * @publicApi + * @deprecated the Web Tracing Framework is no longer supported in Angular */ export const wtfEndTimeRange: (range: any) => void = wtfEnabled ? endTimeRange : (r: any) => null; diff --git a/packages/core/src/profile/wtf_impl.ts b/packages/core/src/profile/wtf_impl.ts index ca2972d13c1..ce2720d08a1 100644 --- a/packages/core/src/profile/wtf_impl.ts +++ b/packages/core/src/profile/wtf_impl.ts @@ -12,6 +12,7 @@ import {global} from '../util/global'; * A scope function for the Web Tracing Framework (WTF). * * @publicApi + * @deprecated the Web Tracing Framework is no longer supported in Angular */ export interface WtfScopeFn { (arg0?: any, arg1?: any): any; } diff --git a/tools/public_api_guard/core/core.d.ts b/tools/public_api_guard/core/core.d.ts index 1e147610acf..cb7d0f3f892 100644 --- a/tools/public_api_guard/core/core.d.ts +++ b/tools/public_api_guard/core/core.d.ts @@ -1429,14 +1429,19 @@ export declare class WrappedValue { static wrap(value: any): WrappedValue; } +/** @deprecated */ export declare const wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn; +/** @deprecated */ export declare const wtfEndTimeRange: (range: any) => void; +/** @deprecated */ export declare const wtfLeave: (scope: any, returnValue?: T) => T; +/** @deprecated */ export interface WtfScopeFn { (arg0?: any, arg1?: any): any; } +/** @deprecated */ export declare const wtfStartTimeRange: (rangeType: string, action: string) => any;