Skip to content

Commit c6f29a2

Browse files
javachemeta-codesync[bot]
authored andcommitted
Fix missing VERSION_NATIVE_FB in commit artifacts (#36889)
Summary: ## Summary The `runtime_commit_artifacts` workflow has been failing in the "move relevant files for react in fbsource into compiled-rn" step with: ``` mv: cannot stat 'build/facebook-react-native/VERSION_NATIVE_FB': No such file or directory ``` `VERSION_NATIVE_FB` was only written in `processExperimental`, *inside* `build/facebook-react-native/`. That directory is not part of the allowlist in the cleanup loop at the end of `processExperimental`, so the experimental workers wrote the version file and then immediately deleted it. This was masked until #36859. The cleanup loop previously used `rm -rm` (an invalid flag), so `rm` errored out and deleted nothing — the loop was effectively a no-op. Once it was changed to `fs.rmSync`, the deletion actually took effect. After CI merges the per-worker artifacts, `facebook-react-native/*/cjs` still survives (the **stable** workers produce it and `processStable` has no cleanup loop), but `VERSION_NATIVE_FB` is gone because stable never wrote it. ## Fix The `build/facebook-react-native` artifacts are identical across release channels: - RN packages resolve to the generic `.fb.js` entry fork (no `.modern.fb.js` / `.classic.fb.js` split). - The `native-fb` feature-flag forks don't reference `__EXPERIMENTAL__`. - The version string is identical (`<ReactVersion>-native-fb-<sha>-<date>`). So this writes `VERSION_NATIVE_FB` from `processStable`, where `facebook-react-native` is preserved, and drops the now-dead write from `processExperimental`. ## Test Plan Verified locally by building the `react` package through each code path: - **Stable channel** (`yarn build --r=stable react/index`): `build/facebook-react-native/VERSION_NATIVE_FB` is written with the correct `19.3.0-native-fb-<sha>-<date>` version string. ✅ - **Experimental channel** (`yarn build --r=experimental react/index`): `build/facebook-react-native` is deleted by the cleanup loop, leaving only `oss-experimental` and `facebook-www` — confirming the version file cannot come from this channel. ✅ - **Local merged build** (`yarn build react/index`, builds both channels and merges): the final `build/facebook-react-native/` contains `VERSION_NATIVE_FB`, matching what CI produces after merging per-worker artifacts. ✅ DiffTrain build for [68631c0453b08e2c7c96a40910f4c91db1f66d5a](react/react@68631c0) Reviewed By: rickhanlonii, zeyap Differential Revision: D109860005 fbshipit-source-id: e63fd7e887908ee4fbc303f44303ce8384d44c45
1 parent 15b1f55 commit c6f29a2

2 files changed

Lines changed: 40 additions & 40 deletions

File tree

packages/react-native/Libraries/Renderer/shims/ReactNativeTypes.js

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noformat
88
* @nolint
99
* @flow strict
10-
* @generated SignedSource<<4ab83fd2606d6a4d374ef914f231d9c1>>
10+
* @generated SignedSource<<92e869744dd405a4d74b1b6f50fa8d52>>
1111
*/
1212

1313
import type {
@@ -25,42 +25,42 @@ import * as React from 'react';
2525

2626
export type AttributeType<T, V> =
2727
| true
28-
| $ReadOnly<{
28+
| Readonly<{
2929
diff?: (arg1: T, arg2: T) => boolean,
3030
process?: (arg1: V) => T,
3131
}>;
3232

33-
// We either force that `diff` and `process` always use mixed,
33+
// We either force that `diff` and `process` always use unknown,
3434
// or we allow them to define specific types and use this hack
3535
export type AnyAttributeType = AttributeType<$FlowFixMe, $FlowFixMe>;
3636

37-
export type AttributeConfiguration = $ReadOnly<{
37+
export type AttributeConfiguration = Readonly<{
3838
[propName: string]: AnyAttributeType | void,
39-
style?: $ReadOnly<{
39+
style?: Readonly<{
4040
[propName: string]: AnyAttributeType,
4141
...
4242
}>,
4343
...
4444
}>;
4545

46-
export type ViewConfig = $ReadOnly<{
47-
Commands?: $ReadOnly<{[commandName: string]: number, ...}>,
48-
Constants?: $ReadOnly<{[name: string]: mixed, ...}>,
46+
export type ViewConfig = Readonly<{
47+
Commands?: Readonly<{[commandName: string]: number, ...}>,
48+
Constants?: Readonly<{[name: string]: unknown, ...}>,
4949
Manager?: string,
50-
NativeProps?: $ReadOnly<{[propName: string]: string, ...}>,
50+
NativeProps?: Readonly<{[propName: string]: string, ...}>,
5151
baseModuleName?: ?string,
52-
bubblingEventTypes?: $ReadOnly<{
53-
[eventName: string]: $ReadOnly<{
54-
phasedRegistrationNames: $ReadOnly<{
52+
bubblingEventTypes?: Readonly<{
53+
[eventName: string]: Readonly<{
54+
phasedRegistrationNames: Readonly<{
5555
captured: string,
5656
bubbled: string,
5757
skipBubbling?: ?boolean,
5858
}>,
5959
}>,
6060
...
6161
}>,
62-
directEventTypes?: $ReadOnly<{
63-
[eventName: string]: $ReadOnly<{
62+
directEventTypes?: Readonly<{
63+
[eventName: string]: Readonly<{
6464
registrationName: string,
6565
}>,
6666
...
@@ -70,30 +70,30 @@ export type ViewConfig = $ReadOnly<{
7070
validAttributes: AttributeConfiguration,
7171
}>;
7272

73-
export type PartialViewConfig = $ReadOnly<{
73+
export type PartialViewConfig = Readonly<{
7474
bubblingEventTypes?: ViewConfig['bubblingEventTypes'],
7575
directEventTypes?: ViewConfig['directEventTypes'],
7676
supportsRawText?: boolean,
7777
uiViewClassName: string,
7878
validAttributes?: AttributeConfiguration,
7979
}>;
8080

81-
type InspectorDataProps = $ReadOnly<{
81+
type InspectorDataProps = Readonly<{
8282
[propName: string]: string,
8383
...
8484
}>;
8585

8686
type InspectorDataGetter = (
87-
<TElementType: React.ElementType>(
87+
<TElementType extends React.ElementType>(
8888
componentOrHandle: React.ElementRef<TElementType> | number,
8989
) => ?number,
90-
) => $ReadOnly<{
90+
) => Readonly<{
9191
measure: (callback: MeasureOnSuccessCallback) => void,
9292
props: InspectorDataProps,
9393
}>;
9494

95-
export type InspectorData = $ReadOnly<{
96-
closestInstance?: mixed,
95+
export type InspectorData = Readonly<{
96+
closestInstance?: unknown,
9797
hierarchy: Array<{
9898
name: ?string,
9999
getInspectorData: InspectorDataGetter,
@@ -103,11 +103,11 @@ export type InspectorData = $ReadOnly<{
103103
componentStack: string,
104104
}>;
105105

106-
export type TouchedViewDataAtPoint = $ReadOnly<
106+
export type TouchedViewDataAtPoint = Readonly<
107107
{
108108
pointerY: number,
109109
touchedViewTag?: number,
110-
frame: $ReadOnly<{
110+
frame: Readonly<{
111111
top: number,
112112
left: number,
113113
width: number,
@@ -119,39 +119,39 @@ export type TouchedViewDataAtPoint = $ReadOnly<
119119

120120
export type RenderRootOptions = {
121121
onUncaughtError?: (
122-
error: mixed,
123-
errorInfo: {+componentStack?: ?string},
122+
error: unknown,
123+
errorInfo: {readonly componentStack?: ?string},
124124
) => void,
125125
onCaughtError?: (
126-
error: mixed,
126+
error: unknown,
127127
errorInfo: {
128-
+componentStack?: ?string,
128+
readonly componentStack?: ?string,
129129
// $FlowFixMe[unclear-type] unknown props and state.
130130
// $FlowFixMe[value-as-type] Component in react repo is any-typed, but it will be well typed externally.
131-
+errorBoundary?: ?React.Component<any, any>,
131+
readonly errorBoundary?: ?React.Component<any, any>,
132132
},
133133
) => void,
134134
onRecoverableError?: (
135-
error: mixed,
136-
errorInfo: {+componentStack?: ?string},
135+
error: unknown,
136+
errorInfo: {readonly componentStack?: ?string},
137137
) => void,
138138
onDefaultTransitionIndicator?: () => void | (() => void),
139139
};
140140

141-
export opaque type Node = mixed;
142-
export opaque type InternalInstanceHandle = mixed;
141+
export opaque type Node = unknown;
142+
export opaque type InternalInstanceHandle = unknown;
143143

144144
export type ReactFabricType = {
145-
findHostInstance_DEPRECATED<TElementType: React.ElementType>(
145+
findHostInstance_DEPRECATED<TElementType extends React.ElementType>(
146146
componentOrHandle: ?(React.ElementRef<TElementType> | number),
147147
): ?PublicInstance,
148-
findNodeHandle<TElementType: React.ElementType>(
148+
findNodeHandle<TElementType extends React.ElementType>(
149149
componentOrHandle: ?(React.ElementRef<TElementType> | number),
150150
): ?number,
151151
dispatchCommand(
152152
handle: PublicInstance,
153153
command: string,
154-
args: Array<mixed>,
154+
args: Array<unknown>,
155155
): void,
156156
isChildPublicInstance(parent: PublicInstance, child: PublicInstance): boolean,
157157
sendAccessibilityEvent(handle: PublicInstance, eventType: string): void,
@@ -211,7 +211,7 @@ export type LayoutAnimationProperty =
211211
| 'scaleY'
212212
| 'scaleXY';
213213

214-
export type LayoutAnimationAnimationConfig = $ReadOnly<{
214+
export type LayoutAnimationAnimationConfig = Readonly<{
215215
duration?: number,
216216
delay?: number,
217217
springDamping?: number,
@@ -220,7 +220,7 @@ export type LayoutAnimationAnimationConfig = $ReadOnly<{
220220
property?: LayoutAnimationProperty,
221221
}>;
222222

223-
export type LayoutAnimationConfig = $ReadOnly<{
223+
export type LayoutAnimationConfig = Readonly<{
224224
duration: number,
225225
create?: LayoutAnimationAnimationConfig,
226226
update?: LayoutAnimationAnimationConfig,

packages/react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noformat
88
* @nolint
99
* @flow strict-local
10-
* @generated SignedSource<<1f7876c0dc0b05685a730513dc410236>>
10+
* @generated SignedSource<<260b8a01781c54c31a520f00cb1bde7f>>
1111
*/
1212

1313
'use strict';
@@ -17,16 +17,16 @@ import invariant from 'invariant';
1717

1818
// Event configs
1919
export const customBubblingEventTypes: {
20-
[eventName: string]: $ReadOnly<{
21-
phasedRegistrationNames: $ReadOnly<{
20+
[eventName: string]: Readonly<{
21+
phasedRegistrationNames: Readonly<{
2222
captured: string,
2323
bubbled: string,
2424
skipBubbling?: ?boolean,
2525
}>,
2626
}>,
2727
} = {};
2828
export const customDirectEventTypes: {
29-
[eventName: string]: $ReadOnly<{
29+
[eventName: string]: Readonly<{
3030
registrationName: string,
3131
}>,
3232
} = {};

0 commit comments

Comments
 (0)