Multi-level project dependencies broken?

General questions regarding the usage of CodeLite
tankist02
CodeLite Veteran
Posts: 56
Joined: Thu Sep 22, 2011 11:29 pm
Genuine User: Yes
IDE Question: c++
Contact:

Multi-level project dependencies broken?

Post by tankist02 »

If I have a workspace with one-level project dependencies:

A1 (base)
A2 (base)
A3 (base)
B (depends on A1, A2, A3)

then build order works as expected - first A1, A2 and A3 are built, then B.

But if I have this:

A1 (base)
A2 (base)
A3 (base)
B (depends on A1, A2, A3)
C (depends on B)

then rebuilding the whole workspace doesn't work.

I am using CL 3.0.5078
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Multi-level project dependencies broken?

Post by eranif »

codelite does not support multi level dependencies. You will need to set them manually in the project 'Build Order' dialog

Eran
Make sure you have read the HOW TO POST thread
tankist02
CodeLite Veteran
Posts: 56
Joined: Thu Sep 22, 2011 11:29 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Multi-level project dependencies broken?

Post by tankist02 »

That's exactly what I did. By "dependency" I mean "build order": B depends on A == B builds after A.


I have projects structured like this (they are listed in build order):

A1 (base level)
A2 (base level)
...
A30 (base level)
A31 (base level)

B1 (depends on A1-30)
B2 (depends on A1-30)

C1 (depends on B2)
C2 (depends on B2 and A31)

D1 (depends on B2)

E1 (depends on D1)

F1 (depends on E1)
F2 (depends on E1)

G1 (depends on F1, F2, D1, C1, C2)

When I do workspace rebuild it fails because build order is not followed by CL - some required projects are not built before the ones that depend on them. In particular D1 is never gets built.

I also observed (with a different, simpler layout) that workspace rebuild sometimes finishes without rebuilding top-level projects. I have to run build one more time to finish.

I am afraid this is a show-stopper for me. I switched from CodeBlocks to CodeLite because CB doesn't generate dependencies between .cpp and .h correctly. I like CL a lot (and many thanks for developing it), but I need multiple-projects workspaces behave correctly.

I tried (when was struggling with CodeBlocks) to use external Makefiles I wrote myself (they work just fine), but then I'll have to support source files in both Makefiles and IDE - not cool.

If you want to look at this problem I can spend some time to create a simple workspace/projects layout that demonstrates this issue. I can also try to debug the problem myself, but I am not familiar with CL sources at all. When fighting with CB I debugged and fixed one problem - generating .cpp/.h dependecies per one project. But then I found that for multiple projects they use deplib incorrectly and decided I didn't have time to fix that too. Plus I found that CL looks much better, debugs faster and closely resembles Visual Studio that I am quite familiar with.

BTW I am using 4-core machines and CL built from sources as of yesterday.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Multi-level project dependencies broken?

Post by eranif »

It should not be a problem fixing it - I am pretty sure I already wrote such a class that perform a topological sorting

Eran
Make sure you have read the HOW TO POST thread
tankist02
CodeLite Veteran
Posts: 56
Joined: Thu Sep 22, 2011 11:29 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Multi-level project dependencies broken?

Post by tankist02 »

That would be great! Any idea when it will get into trunk? I am volunteering to test it. :)
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Multi-level project dependencies broken?

Post by eranif »

tankist02 wrote:hat would be great! Any idea when it will get into trunk?
I don't have even a rough estimation as I am working on something else atm.

As soon as I will implement this, I will update this thread

Eran
Make sure you have read the HOW TO POST thread
tankist02
CodeLite Veteran
Posts: 56
Joined: Thu Sep 22, 2011 11:29 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Multi-level project dependencies broken?

Post by tankist02 »

Hi Eran,

It's been a year since I started this tread. Any idea when multi-level build will be fixed?

We are trying to use CL as the main C++ IDE on Linux and we sorely miss multi-level build.

Thanks a lot for the great project,
Andrew
tankist02
CodeLite Veteran
Posts: 56
Joined: Thu Sep 22, 2011 11:29 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Multi-level project dependencies broken?

Post by tankist02 »

Hi Eran,

I'd like to give you a better context while discussing this issue. We have a few big products in development each consisting of a few dozen projects (static libs, shared libs, exe) which are organized in tree-like structures. The main platform is Windows with Visual Studio 2008 and 2010 as main IDEs. Now we are moving to embrace Linux and we need a good IDE, ideally comparable to VS. Codelite is the closest fit that we found - light, fast, reliable. Many thanks for creating such a great product.

I am wondering if you have any timeframe in mind for adding support of multi-level projects build order. Lack of this feature is a big pain for us. Instead of pressing Shift-F7 to automatically build the active project and all required parts we have to manually traverse the projects structure and build parts individually. This is error-prone and non-productive.

You mentioned the other time that you already have a class that does topological sort. Maybe I could help you to finish integrating it with CL - I have some experience with C++ programming.

Thanks again,
Andrew
Post Reply