Skip to content

Commit

Permalink
feat(core): deprecate integration with the Web Tracing Framework (WTF) (
Browse files Browse the repository at this point in the history
#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
  • Loading branch information
alxhub authored and jasonaden committed May 23, 2019
1 parent b5c8939 commit f310a59
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
11 changes: 11 additions & 0 deletions aio/content/guide/deprecations.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -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 | | [`Renderer`](api/core/Renderer) | [`Renderer2`](api/core/Renderer2) | v4 | none |
| [`RootRenderer`](api/core/RootRenderer) | [`RendererFactory2`](api/core/RendererFactory2) | 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). | [`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} {@a forms}
Expand Down Expand Up @@ -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} {@a deep-component-style-selector}
### `/deep/`, `>>>` and `:ng-deep` component style selectors ### `/deep/`, `>>>` and `:ng-deep` component style selectors


Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/profile/profile.ts
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function noopScope(arg0?: any, arg1?: any): any {
* an exception is expected during normal execution while profiling. * an exception is expected during normal execution while profiling.
* *
* @publicApi * @publicApi
* @deprecated the Web Tracing Framework is no longer supported in Angular
*/ */
export const wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn = export const wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn =
wtfEnabled ? createScope : (signature: string, flags?: any) => noopScope; wtfEnabled ? createScope : (signature: string, flags?: any) => noopScope;
Expand All @@ -61,6 +62,7 @@ export const wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn =
* *
* Returns the `returnValue for easy chaining. * Returns the `returnValue for easy chaining.
* @publicApi * @publicApi
* @deprecated the Web Tracing Framework is no longer supported in Angular
*/ */
export const wtfLeave: <T>(scope: any, returnValue?: T) => T = export const wtfLeave: <T>(scope: any, returnValue?: T) => T =
wtfEnabled ? leave : (s: any, r?: any) => r; wtfEnabled ? leave : (s: any, r?: any) => r;
Expand All @@ -77,6 +79,7 @@ export const wtfLeave: <T>(scope: any, returnValue?: T) => T =
* }); * });
* } * }
* @publicApi * @publicApi
* @deprecated the Web Tracing Framework is no longer supported in Angular
*/ */
export const wtfStartTimeRange: (rangeType: string, action: string) => any = export const wtfStartTimeRange: (rangeType: string, action: string) => any =
wtfEnabled ? startTimeRange : (rangeType: string, action: string) => null; wtfEnabled ? startTimeRange : (rangeType: string, action: string) => null;
Expand All @@ -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 * [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been
* enabled. * enabled.
* @publicApi * @publicApi
* @deprecated the Web Tracing Framework is no longer supported in Angular
*/ */
export const wtfEndTimeRange: (range: any) => void = wtfEnabled ? endTimeRange : (r: any) => null; export const wtfEndTimeRange: (range: any) => void = wtfEnabled ? endTimeRange : (r: any) => null;
1 change: 1 addition & 0 deletions packages/core/src/profile/wtf_impl.ts
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {global} from '../util/global';
* A scope function for the Web Tracing Framework (WTF). * A scope function for the Web Tracing Framework (WTF).
* *
* @publicApi * @publicApi
* @deprecated the Web Tracing Framework is no longer supported in Angular
*/ */
export interface WtfScopeFn { (arg0?: any, arg1?: any): any; } export interface WtfScopeFn { (arg0?: any, arg1?: any): any; }


Expand Down
5 changes: 5 additions & 0 deletions tools/public_api_guard/core/core.d.ts
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1440,14 +1440,19 @@ export declare class WrappedValue {
static wrap(value: any): WrappedValue; static wrap(value: any): WrappedValue;
} }


/** @deprecated */
export declare const wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn; export declare const wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn;


/** @deprecated */
export declare const wtfEndTimeRange: (range: any) => void; export declare const wtfEndTimeRange: (range: any) => void;


/** @deprecated */
export declare const wtfLeave: <T>(scope: any, returnValue?: T) => T; export declare const wtfLeave: <T>(scope: any, returnValue?: T) => T;


/** @deprecated */
export interface WtfScopeFn { export interface WtfScopeFn {
(arg0?: any, arg1?: any): any; (arg0?: any, arg1?: any): any;
} }


/** @deprecated */
export declare const wtfStartTimeRange: (rangeType: string, action: string) => any; export declare const wtfStartTimeRange: (rangeType: string, action: string) => any;

0 comments on commit f310a59

Please sign in to comment.