Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Dependencies handling ?

<< < (5/5)

mandrav:

--- Quote ---That's why I need the dependency feature, I'm could not live without. Projects dependencies allow faster coding since we do not have to remember all the dependencies, and to compile every time I modify a file. That's my habits Rolling Eyes , and it seems really useful to every people I know using the Visual environment.
--- End quote ---

Point taken already.


--- Quote ---That's not what I want. I just want to discuss it, to ear the opinion of the main developer and issue a feature request! As I said, I could not live without, so if the main developers agree with this new functionality, ok, I will help implementing it in the core SDK or give some feedback, otherwise I'll switch off using CodeBlocks. So I want some feedback from them. Moreover, this could not be implemented as a plugin since it imply modifying core sdk files (cbproject files) !
--- End quote ---

I have no problem adding this functionality, but I don't have the spare time now. I 'm doing bug-fixes, then I 'll release RC1 and then I 'll take my vacation :)
Anyway, since this kind of changes would be pretty heavy for the build system, they will have to be postponed for post-1.0 (no matter who writes the code).

--- Quote ---PS: could I commit modifications on the CVS, how ? Should I be registered as a regular developer ? (for visual workspaces imports)
--- End quote ---

Please submit a patch.

Yiannis.

rickg22:
OK what I see could be done is this:

* Add the option to specify project files as dependencies for a project (cbproject.cpp etc).
* Keep a stack of "inter-project dependencies", as which project is on the bottom of the stack. When a project depends on other projects, push it to the stack and get a list of inter-project dependencies. (This would need modification on the compiler plugin)
* If any of the inter-proj dependencies is already present on the stack, ask to abort (circular dependency error), or ignore (don't try to compile project already in the stack).

Doesn't seem as hard to implement. ZieQ, we'd need your help on this. ANY VOLUNTEERS TO HELP???

Also, please tell us about the *OTHER* problems regarding visual studio imports. (Please explain them further in your sourceforge bug report).

I wanted to tackle these before 1.0 but I'm afraid this might not be possible before RC1 at least.

zieQ:
I posted a patch for visual imports  :P

About dependencies, I finally think it should be "target dependencies" since we may have one projects with many targets that depends on each other! As you said, we just have to keep a list of dependent targets (pointers) in each target. The idea of the stack is good if we want to avoid testing a target (for up-to-date) more than once (consider the exemple below). But it is more complicated to get it work than just testing/compile the dependent projects one by one.

Here is a sketch of dependencies handling for compilation. The contents of the stack is in brackets.

                      -->  { A }
     A               -->  { A, B, C } (for the current element of the stack, A here, we add its dependencies at the end, i.e B, C)
   /   \
  B     \            --> { A, B, C, E } (dependencies of B added)
  |      C           --> { A, B, C, E, D } (dependencies of C added)
  |      |
  |      D          ---> { A, B, C, D, E }  (E was already in the stack, it is moved to the end since it must be compiled before)
   \   /
     E


And finally we compile projects from the end of the stack towards the beginning, that is E, D, C, B, A (issue up-to-date if there's nothing to do) and it should work fine.

As a side note, I said that the include of dependent projects should be added in the current project, but that is not true in Visual. We must set includes by hand. The dependency feature just add the dependent library (virtually, do not appear in the project settings) to the link libs of the current target.

Hope this helps. I may help implement this feature in the week if everything is ok.

zieQ:
Note that I'm working on a patch to implement inter-target dependencies in C::B  :)

troels:

--- Quote from: zieQ on July 31, 2005, 09:36:34 pm ---Note that I'm working on a patch to implement inter-target dependencies in C::B  :)

--- End quote ---

Can't wait to see it. Killer-feature!
/Troels

Navigation

[0] Message Index

[*] Previous page

Go to full version