A cycle was detected in the build path of project

I have the following 2 modules br_boss_chart_faktura and br_boss_chart_faktura_bookingAccounts. I need to call methods from the modules scopes, but I get the following errors, if I add them mutually to the known modules.

A cycle was detected in the build path of project: BOSS	BOSS		Build path	Build Path Problem
A cycle was detected in the build path of project: br_boss_chart_faktura	br_boss_chart_faktura		Build path	Build Path Problem
A cycle was detected in the build path of project: br_boss_chart_faktura_bookingAccounts	br_boss_chart_faktura_bookingAccounts		Build path	Build Path Problem

In br_boss_chart_faktura I need to call functions from br_boss_chart_faktura_bookingAccounts and in br_boss_chart_faktura_bookingAccounts I need to call functions from br_boss_chart_faktura.

How can I realize that, without getting the above errors?

deezzub:
In br_boss_chart_faktura I need to call functions from br_boss_chart_faktura_bookingAccounts and in br_boss_chart_faktura_bookingAccounts I need to call functions from br_boss_chart_faktura.

Not possible.

The only way is to move functions to a new module which you can reference from both modules you mentioned.

mboegem:

deezzub:
In br_boss_chart_faktura I need to call functions from br_boss_chart_faktura_bookingAccounts and in br_boss_chart_faktura_bookingAccounts I need to call functions from br_boss_chart_faktura.

Not possible.

The only way is to move functions to a new module which you can reference from both modules you mentioned.

Hi Marc, or I call the functions like scopes[ ‘br_boss_chart_faktura_scopename’ ] ‘functionName’ without adding the modules mutually?

Hi Sebastian,

Sure you can weak-link it.
But whatever you do you need to fix the circular reference or you can’t export (i.e. deploy) your solution (well maybe if you disable all the error markers).

In any case best practice is what Marc described…or use Servoy’s svyApplicationCore module which features a listener/broadcaster pattern (which I haven’t tested yet myself).

Hope this helps.

ROCLASI:
But whatever you do you need to fix the circular reference …

Hi Robert, I have removed the modules from each other, so that there is no cycle anymore. Is that not enough?

deezzub:
In br_boss_chart_faktura I need to call functions from br_boss_chart_faktura_bookingAccounts and in br_boss_chart_faktura_bookingAccounts I need to call functions from br_boss_chart_faktura.

How we organize all of our modules to avoid this issue entirely: http://www.servoymagazine.com/home/2012 … tices.html

Hi Sebastian,

deezzub:

ROCLASI:
But whatever you do you need to fix the circular reference …

Hi Robert, I have removed the modules from each other, so that there is no cycle anymore. Is that not enough?

That is indeed enough to break the circular reference.