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

Any way to ensure interfaces remain valid from reason-react? #43

Open
davesnx opened this issue Sep 23, 2023 · 3 comments
Open

Any way to ensure interfaces remain valid from reason-react? #43

davesnx opened this issue Sep 23, 2023 · 3 comments

Comments

@davesnx
Copy link
Member

davesnx commented Sep 23, 2023

If we have a way to ensure our React.ml (and Belt.ml, Js.ml, etc) match with the interface we would avoid those breakages #41 and be compatible would be a matter of following the interface.

Is there any way to depend on an interface from a dependency?

PS: Asked for help here https://discuss.ocaml.org/t/is-there-any-way-to-depend-on-an-interface-file-from-a-dependency/13077

@davesnx
Copy link
Member Author

davesnx commented Oct 25, 2023

This was one approach #82 but still don't have a clear solution here.

Maybe splitting what's React public library and what's ppx_runtime_lib might help, but still can face issues while users might want to use React.jsx (or other runtime_lib stuff)

@davesnx
Copy link
Member Author

davesnx commented Oct 25, 2023

cc @jchavarri

@davesnx davesnx changed the title Any way to ensure interfaces remain valid from the original? Any way to ensure interfaces remain valid from reason-react? Jul 18, 2024
@davesnx
Copy link
Member Author

davesnx commented Aug 9, 2024

To check inclusion module M : module type of T = T2 and equality module M : module type of T2 = T.

When you don't want to keep type equalities module type of struct include T end

Extracted from https://www.reddit.com/r/ocaml/comments/448xdl/ocamlsafestringbuffer_a_buffer_implementation/

Unsure if there's a way now to have both libs on the same scope (melange/native)

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

No branches or pull requests

1 participant