This document should describe what should be the behavior when we have recursive dependencies.
// TODO: Why is this useful. As seen in harfbuzz and freetype2 on runtime and for general recursion you can look at most compilers.
Runtime Recursion means a case where two dependencies or more, recursively depends on each other, only on runtime, harfubzz and freetype2 is an example of this.
As we can describe non inclusive dependencies, we can say easily
- A depends on B but is not inclusive
- B depends on A but is not inclusive
Example:
- harfbuzz depends freetype2 but doesn't depends on freetype2 dependencies
This is also the case for any command, where you're not building the package itself
General Recursion means a case where a dependencies endsup depending on itself recursively and you cannot escape it easily, it happens mostly during build.
TODO: find examples and think about how to solve it, probably ocaml itself
// TODO describe that Classic compiler bootstrap should be good.
How could we bootstrap this case?
- A1, no deps
- B1, deps A1
- A2 provides A1, depends on B1
- B2 provides B1, depends on A2
Both solutions needs to be implemented to have it without any compromise
Pros:
- reproducible
- can be used on new platforms
Cons:
- needs to build every dependency
- package author needs to describe it
- REALLY SLOW
Pros:
- easily solved
- fast
Cons:
- not reproducible
- not useful for new platforms
TODO:
- think about cases where you have three or more dependencies