Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make compat lib with reason-react #82

Closed
wants to merge 1 commit into from
Closed

Conversation

jchavarri
Copy link
Contributor

@jchavarri jchavarri commented Oct 24, 2023

As the upstream reason-react gets updated, it gets hard to track the changes / differences between the APIs. This adds a library where a react.rei interface can be shared with reason-react so both libs stay in sync easily, until we have better support for virtual libraries or other mechanisms.

See companion PR in reason-react: reasonml/reason-react#807.

⚠️ Should not be merged yet ⚠️ this is what the build shows as errors / missing APIs:

$ dune build
File "packages/react/src/js_compat/react.ml", line 1:
Error: The implementation packages/react/src/js_compat/react.ml
       does not match the interface packages/react/src/js_compat/.unused_js_compat.objs/byte/unused_js_compat__React.cmi:
        The type `componentLike' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 2, characters 0-55:
         Expected declaration
       The type `component' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 3, characters 0-55:
         Expected declaration
       The value `component' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 12, characters 0-66:
         Expected declaration
       The value `createElementVariadic' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 18-19, characters 0-56:
         Expected declaration
       The value `jsxKeyed' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 21, characters 0-74:
         Expected declaration
       The value `jsx' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 23, characters 0-47:
         Expected declaration
       The value `jsxs' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 25, characters 0-48:
         Expected declaration
       The value `jsxsKeyed' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 27, characters 0-75:
         Expected declaration
       The value `jsxFragment' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 29, characters 0-25:
         Expected declaration
       The value `memo' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 87, characters 0-48:
         Expected declaration
       The value `memoCustomCompareProps' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 89-90, characters 0-68:
         Expected declaration
       The module `StrictMode' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 98-102, characters 0-1:
         Expected declaration
       The value `useReducerWithMapState' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 135-137, characters 0-27:
         Expected declaration
       The value `useSyncExternalStore' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 139-144, characters 0-11:
         Expected declaration
       The value `useSyncExternalStoreWithServer' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 146-152, characters 0-11:
         Expected declaration
       The value `useEffect' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 154, characters 0-53:
         Expected declaration
       The value `useEffect7' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 171-172, characters 0-70:
         Expected declaration
       The value `useInsertionEffect' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 174, characters 0-62:
         Expected declaration
       The value `useInsertionEffect0' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 176, characters 0-63:
         Expected declaration
       The value `useInsertionEffect1' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 178, characters 0-74:
         Expected declaration
       The value `useInsertionEffect2' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 180, characters 0-73:
         Expected declaration
       The value `useInsertionEffect3' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 182-183, characters 0-54:
         Expected declaration
       The value `useInsertionEffect4' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 185-186, characters 0-58:
         Expected declaration
       The value `useInsertionEffect5' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 188-189, characters 0-62:
         Expected declaration
       The value `useInsertionEffect6' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 191-192, characters 0-66:
         Expected declaration
       The value `useInsertionEffect7' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 194-195, characters 0-70:
         Expected declaration
       The value `useLayoutEffect' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 197, characters 0-59:
         Expected declaration
       The value `useLayoutEffect7' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 216-217, characters 0-70:
         Expected declaration
       The value `useMemo7' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 235, characters 0-66:
         Expected declaration
       The type `callback' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 238, characters 0-50:
         Expected declaration
       The value `useCallback7' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 256, characters 0-60:
         Expected declaration
       The value `useId' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 261, characters 0-25:
         Expected declaration
       The value `useDeferredValue' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 263, characters 0-30:
         Expected declaration
       The value `useImperativeHandle0' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 265-266, characters 0-54:
         Expected declaration
       The value `useImperativeHandle1' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 268-269, characters 0-65:
         Expected declaration
       The value `useImperativeHandle2' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 271-272, characters 0-64:
         Expected declaration
       The value `useImperativeHandle3' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 274-275, characters 0-68:
         Expected declaration
       The value `useImperativeHandle4' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 277-278, characters 0-72:
         Expected declaration
       The value `useImperativeHandle5' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 280-281, characters 0-76:
         Expected declaration
       The value `useImperativeHandle6' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 283-285, characters 0-6:
         Expected declaration
       The value `useImperativeHandle7' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 287-293, characters 0-6:
         Expected declaration
       The module `Uncurried' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 295-334, characters 0-1:
         Expected declaration
       The value `useTransition' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 336, characters 0-71:
         Expected declaration
       The module `Experimental' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 338-341, characters 0-1:
         Expected declaration
       The value `displayName' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 345, characters 0-52:
         Expected declaration
       The value `useDebugValue' is required but not provided
       File "packages/react/src/js_compat/react.rei", line 347, characters 0-70:
         Expected declaration
       The module `Event' is required but not provided
       File "packages/react/src/js_compat/react.rei", lines 349-880, characters 0-1:
         Expected declaration

@jchavarri
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant