Questions about modules dependency

Hi there,

The following might have been asked before, but I don't remember the exact
answers, so here we go (again):

- if I have a module A depending on B and I have B depending on C, does that
imply A depends on C? If in module A I have code accessing classes from
module C, do I need to explicitly say that A depends on C or is it covered
by the other 2 dependencies?
- if module A depends on module B and module B declares the use of some
external libraries (either module level of project level), can I use classes
from the B declared libraries in module A? Or do I have to declare those
libraries in module A as well in order to be able to use them?

Thx,
Andrei


5 comments

You named the two most serious flaws in the current module implementation:

  • Module dependencies are not transitiv. You must explicitly specify the dependency from A to C. Since the number of these additional dependencies grows exponentially with the depth of your dependency tree this can become a lot of work.

  • Libraries are not visible to dependent modules. Well at least the additional work to be done grows only quadratic with your number of modules ;)


Somebody from JetBrains said in another thread that they will address these issues in the next minor release after 4.0.

Setting up my project using modules has been very tedious for me due to these two deficiencies.
However in the latest release it finally is working quite well after I was through with all the setup.

0

Setting up my project using modules has been very tedious for me due to

these two deficiencies.

However in the latest release it finally is working quite well after I was

through with all the setup.

For me, unfortunatelly, all those dependencies seem to cause a real
performance problem which I'm not able to get around. I was hoping I could
rely on dependencies' transitivity and get rid of some of them.
The only thing I haven't tried yet is to put everything is a single module,
just to be able to work in a decent manner. Ironic, though, to have all that
modules beauty and to have avoid it because it's not fast enough.

Oh, well...

Thanks for the answers,
Andrei


0

I had the same performance problem and was forced to revert to a single
module with additional modules only for webapps. I maintain both the
multi-module and single-module projects, trying out the mulit-module
project with each new eap. Each time I sadly go back to my single-module
project.

For me, unfortunatelly, all those dependencies seem to cause a real
performance problem which I'm not able to get around. I was hoping I could
rely on dependencies' transitivity and get rid of some of them.
The only thing I haven't tried yet is to put everything is a single module,
just to be able to work in a decent manner. Ironic, though, to have all that
modules beauty and to have avoid it because it's not fast enough.


0

What exactly do you mean with performance problem? What Idea build have you been using? E.g. debugging has become really fast in build 1138.

0

I was talking about
http://www.intellij.net/tracker/idea/viewSCR?publicId=28759

Code completion was quite slow with all the modules relationships. Now I can
hardly wait to get my hands on 1143. :)

Andrei


Stephen Kelvin wrote:

What exactly do you mean with performance problem? What Idea build have
you been using? E.g. debugging has become really fast in build 1138.


0

Please sign in to leave a comment.