Skip to content

Generate separate, smaller source files #227

Open
@zbaylin

Description

@zbaylin

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions