Skip to content

Commit 2d32056

Browse files
authored
[flags] Delete enableDebugTracing (#31780)
This is unused, even in the one builds that uses it, and we don't plan on landing it in this form.
1 parent c80b336 commit 2d32056

28 files changed

+4
-903
lines changed

packages/react-dom/src/__tests__/ReactDOMServerIntegrationModes-test.js

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -37,56 +37,6 @@ describe('ReactDOMServerIntegration', () => {
3737
resetModules();
3838
});
3939

40-
// Test pragmas don't support itRenders abstraction
41-
if (
42-
__EXPERIMENTAL__ &&
43-
require('shared/ReactFeatureFlags').enableDebugTracing
44-
) {
45-
describe('React.unstable_DebugTracingMode', () => {
46-
beforeEach(() => {
47-
spyOnDevAndProd(console, 'log');
48-
});
49-
50-
itRenders('with one child', async render => {
51-
const e = await render(
52-
<React.unstable_DebugTracingMode>
53-
<div>text1</div>
54-
</React.unstable_DebugTracingMode>,
55-
);
56-
const parent = e.parentNode;
57-
expect(parent.childNodes[0].tagName).toBe('DIV');
58-
});
59-
60-
itRenders('mode with several children', async render => {
61-
const Header = props => {
62-
return <p>header</p>;
63-
};
64-
const Footer = props => {
65-
return (
66-
<React.unstable_DebugTracingMode>
67-
<h2>footer</h2>
68-
<h3>about</h3>
69-
</React.unstable_DebugTracingMode>
70-
);
71-
};
72-
const e = await render(
73-
<React.unstable_DebugTracingMode>
74-
<div>text1</div>
75-
<span>text2</span>
76-
<Header />
77-
<Footer />
78-
</React.unstable_DebugTracingMode>,
79-
);
80-
const parent = e.parentNode;
81-
expect(parent.childNodes[0].tagName).toBe('DIV');
82-
expect(parent.childNodes[1].tagName).toBe('SPAN');
83-
expect(parent.childNodes[2].tagName).toBe('P');
84-
expect(parent.childNodes[3].tagName).toBe('H2');
85-
expect(parent.childNodes[4].tagName).toBe('H3');
86-
});
87-
});
88-
}
89-
9040
describe('React.StrictMode', () => {
9141
itRenders('a strict mode with one child', async render => {
9242
const e = await render(

packages/react-reconciler/src/DebugTracing.js

Lines changed: 0 additions & 231 deletions
This file was deleted.

packages/react-reconciler/src/ReactFiber.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import {
3232
enableScopeAPI,
3333
enableLegacyHidden,
3434
enableTransitionTracing,
35-
enableDebugTracing,
3635
enableDO_NOT_USE_disableStrictPassiveEffect,
3736
enableRenderableContext,
3837
disableLegacyMode,
@@ -80,7 +79,6 @@ import {NoLanes} from './ReactFiberLane';
8079
import {
8180
NoMode,
8281
ConcurrentMode,
83-
DebugTracingMode,
8482
ProfileMode,
8583
StrictLegacyMode,
8684
StrictEffectsMode,
@@ -89,7 +87,6 @@ import {
8987
import {
9088
REACT_FORWARD_REF_TYPE,
9189
REACT_FRAGMENT_TYPE,
92-
REACT_DEBUG_TRACING_MODE_TYPE,
9390
REACT_STRICT_MODE_TYPE,
9491
REACT_PROFILER_TYPE,
9592
REACT_PROVIDER_TYPE,
@@ -630,13 +627,6 @@ export function createFiberFromTypeAndProps(
630627
return createFiberFromTracingMarker(pendingProps, mode, lanes, key);
631628
}
632629
// Fall through
633-
case REACT_DEBUG_TRACING_MODE_TYPE:
634-
if (enableDebugTracing) {
635-
fiberTag = Mode;
636-
mode |= DebugTracingMode;
637-
break;
638-
}
639-
// Fall through
640630
default: {
641631
if (typeof type === 'object' && type !== null) {
642632
switch (type.$$typeof) {

0 commit comments

Comments
 (0)