What happens if two packages require each other?

question

#1

Has this chicken & the egg problem already been resolved?


edit: for clarity, this could be:

  • shallow mutual requiring ( a deps on b && b deps on a )
  • or requiring each other through some intermediary packages ( a deps on b deps on c deps on a )

#2

A “base” package required by both packages should do the trick. It would have the minimal set of code that is needed by the other packages.


#3

Just found an example

So we’re clear, there’s nothing to worry about?

// I’m probably going to hide it on my website otherwise


see below: AWSLambda.jl requires itself (indirectly)


#4

Circular dependencies may confuse a few scripts people write if they don’t take into account the possibility they might happen, but Pkg doesn’t have any problems with them. It might hit some corner cases in precompilation, hard to tell unless anyone finds an issue.


#5

Sounds good. Thanks for looking into it!


Some more info before closing this:

Currently AWSLambda and AWSSNS are the only packages with circular dependencies.

Regardless,

  • I now hide circular dependencies on the site
  • but print them all to the logs every data update