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

Generate separate, smaller source files #227

Open
zbaylin opened this issue Nov 1, 2022 · 0 comments
Open

Generate separate, smaller source files #227

zbaylin opened this issue Nov 1, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@zbaylin
Copy link

zbaylin commented Nov 1, 2022

I am currently using ts2ocaml to generate bindings to a fairly large TypeScript library. ts2ocaml produces an mli file approximately 8.2MB in size, which causes both ocamlopt and ocamlc to stack overflow at the default system stack limit on my Macbook Pro.

I am fairly certain this could be solved by generating separate interface files, since modules can't be recursively dependent anyway.

i.e. transform
src.mli:

module X : sig
  ...
end
module Y : sig
  ...
end

into
x.mli, y.mli withsrc.mli:

module X = X
module Y = Y

I recognize that this is a "nice-to-have" and probably doesn't represent a widespread need, but would be very helpful in making builds of my library easier!

@cannorin cannorin added the enhancement New feature or request label Nov 2, 2022
@cannorin cannorin added the v2 label Jul 13, 2023
@cannorin cannorin removed the v2 label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants