depends_run and circular deps

René J.V. Bertin rjvbertin at gmail.com
Mon Nov 25 09:36:14 UTC 2019


Hi,

Just had another run-in with a circular dep issue so I'd like to re-raise a question I think I've asked before:

Why are runtime dependencies pulled in *before* building a port? Consider a port App for an application that requires a platform plugin. The plugin is a separate project that depends on a library provided by the main port. Logically we'd thus have:

port:Aapp : depends_run port:Aplg
port:Aplg : depends_lib port:Aapp

which should be perfectly possible if runtime dependencies could be pulled in *after* a port was installed.
Qt5 could have been a perfect example if it didn't include its platform plugins in the "qtbase" component.

I seem to recall a counter argument that the main port might depend on the runtime dependency during its build (or probably rather configure) stage. That is possible (it'd be a bug in the scenario above!) but this can already be formalised by using both a depends_run and a depends_build.

As a compromise: how about a switch that determines when runtime dependencies are pulled in, modelled after the skip_archcheck option and defaulting to the current behaviour so nothing changes for existing ports?

Perfect food for thought for a Monday morning :)

R.


More information about the macports-dev mailing list