List Info

Thread: VPATH support for projects




VPATH support for projects
country flaguser name
United States
2007-03-23 08:10:29
Hi,

in hopes of getting kdevelop to play ball with aegis
repositories that have no 
symlinks, I have a feature request/RFC.

Aegis is a software configuration management system. The way
it handles 
branching and changes is to only have changed files in a
branch/change. To 
find a file, you have to look in your change, if not there
look in all the 
branches up along the way to the baseline, then look in the
baseline.

As a crude workaround, aegis can provide symlinks to all the
necessary places, 
but that becomes slightly awkward when working with
repositories that have 
thousands of files, and is really a workaround for broken
build tools. I've 
managed to get my aegis repository be non-symlinked for both
unix and windows 
builds (visual studio called via wine from a unix build
tool). So the only 
thing left is kdevelop 

To work on something, you create a change in its own working
directory. Say in 
project "cool", branch 2.8, you have change 10.
It'd be, by default in 
~/cool.2.8.C010. To find the files, you need two
directories: the project's 
root directory, and the change directory. Given project name
and change 
number, aegis can provide you with both. Assume that
project's root is 
in /devel/cool.

To look for a file called "aargh", you need to
follow this order:

1. ~/cool.2.8.C010/aargh
2. /devel/cool/branch.2/branch.8/baseline/aargh
3. /devel/cool/branch.2/baseline/aargh
4. /devel/cool/baseline/aargh

Aegis can provide a list of files in each level of this
tree. So, could 
inspect following lists in advance and know where each file
is:

1. aegis -list change_files -unformatted -project cool.2.8
-change 10
2. aegis -list change_files -unformatted -project cool.2
-change 8
3. aegis -list change_files -unformatted -project cool
-change 2
4. aegis -list project_files -unformatted -project cool

Files in list 1 are relative to ~/cool.2.8.C010 (change
directory), list 2 is 
relative to /devel/cool/branch.2/branch.8/baseline (branch
directory) and so 
on. I've left out details such as dealing with deleted files
in those 
lists -- one still uses kdevelop's file list so that deleted
files are also 
removed from there so shouldn't be a problem.

Without any specific knowledge of aegis, the direct access
to file lists is 
out of the question, so instead the VPATH approach is
necessary, where a 
project has a VPATH to look in. If a file is not in the
kdevelop project's 
directory, it has to be looked for, in order, in the files
given in the VPATH 
(it can be a project variable).

I don't think it necessary for kdevelop to directly provide
support for 
generating VPATH programmatically. You'd typically have a
script as part of 
the change creation process, which accesses the project's
xml file and 
modifies the VPATH accordingly.

Note that the branch contents change over time as other
changes get checked 
in, so that every time a file is opened, the VPATH traversal
should be 
repeated (no caching!). Also, all the files that are not in
the change are 
non-writeable, but kdevelop will already know about that
from their 
attributes.

I was wondering whether someone would have a big urge to
implement this for 
kdevelop 4, and if not where to start looking in the code?
I'd imagine that 
VPATH would be a global project property, and basically
ignored if empty, and 
used if not-empty.

Kuba

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: VPATH support for projects
user name
2007-03-23 08:56:32
On 23.03.07 09:10:29, Kuba Ober wrote:
> Aegis is a software configuration management system.
The way it handles 
> branching and changes is to only have changed files in
a branch/change. To 
> find a file, you have to look in your change, if not
there look in all the 
> branches up along the way to the baseline, then look in
the baseline.
... 
> I was wondering whether someone would have a big urge
to implement this for 
> kdevelop 4, and if not where to start looking in the
code? I'd imagine that 
> VPATH would be a global project property, and basically
ignored if empty, and 
> used if not-empty.

Can one use any buildsystem on top of aegis-managed
projects? Or does
aegis provide itself a buildsystem? 

>From your description I'd say you should write a plugin
that implements
IProjectFileManager, which deals with finding files. If you
can use
different buildsystems on top of aegis, thats a good thing.
Because its
a use-case for something I was thinking about lately: Split
filemanager+buildsystemmanager into 2 separate interfaces.
If aegis is
itself a buildsystem too, then thats no problem either, just
implement
the IBuildSystemManager instead. There you won't need any
VPATH, as you
can just assume that aegis exists and can use its facilities
to find the
files.

Andreas

-- 
You have the body of a 19 year old.  Please return it before
it gets wrinkled.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )