How to manage circular dependencies ?

How to manage circular dependencies ?

by Valery Fremaux -
Number of replies: 5
Picture of Plugin developers

Hi !

I'm facing a design inconsitency due to intimous cooperation between a report and a module (talking about Learning Time Chek)

As i could see, circular dependencies mess two things :

  • They block the travis-ci install process
  • They block the moodle plugin uninstall capability (the install dependency check passes)

so i would have to renounce to declare one of both ways.

why am i getting in this trap?

Because module and report have both distinct responsibilities and they need being linked in some way. Report uses data from the module using a cross component API and module may have to ask the report to check some data using report's fitering options.

so what would i worth doing? prefer binding dependencies of mod to report or report to mod?

Average of ratings: -
In reply to Valery Fremaux

Re: How to manage circular dependencies ?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Circular dependencies should be fine. E.g. I am responsible for qtype_opaque and qbehaviour_opaque, which both depend on each other.

If that breaks travis, then that is a bug in the travis integration.

In reply to Tim Hunt

Re: How to manage circular dependencies ?

by Valery Fremaux -
Picture of Plugin developers

Hi tim,

It does...

i wanted post their message but it seems that travis-ci.org is gone at the moment.

In reply to Valery Fremaux

Re: How to manage circular dependencies ?

by Valery Fremaux -
Picture of Plugin developers
In reply to Valery Fremaux

Re: How to manage circular dependencies ?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

This is a short-coming of the moodle-plugin-ci script.

Circular dependencies are allowed. That script should be able to deal with them.