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

Cyclic dependencies #24

Open
ManasJayanth opened this issue Dec 20, 2018 · 2 comments
Open

Cyclic dependencies #24

ManasJayanth opened this issue Dec 20, 2018 · 2 comments

Comments

@ManasJayanth
Copy link
Contributor

Sometimes, the classes have a cyclic dependencies, which when tried to generated bindings for, dune complains

Example:

let data_structures =
  ["Error"; "Layer"; "Timeline";]
Dependency cycle between the following files:
    _build/default/lib/.GES.objs/Layer.mli.all-deps
--> _build/default/lib/.GES.objs/Timeline.mli.all-deps
--> _build/default/lib/.GES.objs/Layer.mli.all-deps

Full gen.ml

@jhrdina
Copy link

jhrdina commented Apr 2, 2019

Are there any best-practices on how to handle cyclic dependencies in OCaml bindings? I know that bs-webapi - BuckleScript (Reason/Ocaml) bindings to DOM API simply put all typedefs into one separate "Types" module... (in bs-webapi specifically it is named "Dom" and ships together with BS compiler, but you get the point...)

Is there any significant disadvantage in this approach?

@ManasJayanth
Copy link
Contributor Author

@jhrdina I think this thread here will interest you.

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

2 participants