Bug 69623 - kdevelop project file sync option missing
Summary: kdevelop project file sync option missing
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-04 10:51 UTC by Janne Karhunen
Modified: 2007-02-23 21:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janne Karhunen 2003-12-04 10:51:08 UTC
Version:            (using KDE KDE 3.1.94)
Installed from:    Compiled From Sources
Compiler:          gcc-3.3.1-29-SuSE 

If you have more than one guy working on the same project without sharing the same kdevelop project file, more project files may appear 'on the fly'.  As kdevelop is already able to sync all files to project from below the top level directory in project creation phase, it would be cool to be able to trigger this same function while working. This gets rid of the annoyance of manually adding somebody elses files into yout project file.
Comment 1 Amilcar do Carmo Lucas 2003-12-04 11:21:47 UTC
This works very well already with CVS.
All you need is to share all files via CVS.

On the fly CVS file update is strange though ....

And anyways, how do you want us to implement on-the-fly files update??? We need to know the path of where all the persons have their files and check if their files changed and update yours accordingly ? This is a weird wish!!!

And why don't you share the project file???

And what KDevelop version are you using?
Comment 2 Janne Karhunen 2003-12-04 11:34:24 UTC
KDevelop is up-to-date CVS version (3.0 beta-2). 

I reckon it wouldn't be 'on-the-fly', but 'on-the-request'. So it would be cool to have some button somewhere to 'sync all files to project' - and that button would do exactly the same thing than answering yes to 'populate project with  all files below the top level directory?' while importing the project.
Comment 3 Amilcar do Carmo Lucas 2003-12-04 12:18:30 UTC
KDevelop supports
CVS
preforce
clearcase
subversion

Choose one of these.
Choose update in the "File tree view"
That's it.
Comment 4 Janne Karhunen 2003-12-04 12:35:35 UTC
We're using CVS, but we're not checking in kdevelop project files because:
- If you add a file, you need to check in project file as well accordingly -> too much work ;)
- People can and will use many different tools (eclipse, kdevelop2, kdevelop3, emacs, vi, MSDEV..), and we *dont* want to end up with a mess of project files in the source tree. 

BUT IF it syncs directly from CVS without having project files in there, then that's great. I wasn't aware of that - hmm - but this wishlist item was reported because that didn't seem to work (at least while using ctags)..
Comment 5 Amilcar do Carmo Lucas 2003-12-04 13:03:16 UTC
KDevelop doesn't use project files if you use autotools or QMake.

If you use one of these buildtools (available on Win, Linux and solaris)
you do not need to commit project files each time you add a file. You need to commit the .po or Makefile.am files. and that's it.

And you can use eclipse, emacs, VI with it. (This tecnique is not kdevelop2 or MSDEV compatible AFAIK)
Comment 6 Janne Karhunen 2003-12-04 13:16:25 UTC
We use plain Makefiles as this is not a multiplatform product and thus, need for autotools is not that great. Besides, this is a telecom system that was created ages ago when autotools didn't even exist yet. So could it be possible that such a button would be present for us old-timers working with plain old make ;)
Comment 7 Amilcar do Carmo Lucas 2003-12-04 13:32:03 UTC
So you are using KDevelop's "Custom Project Mananger".

This buildtool also doesn't store build info on the project file. All you need is to update the Makefiles.
Comment 8 Janne Karhunen 2003-12-04 14:24:14 UTC
No, project top level Makefile (or any other file named Makefile for that matter) doesn't include any sources. Makefiles are generated, just like in autotools case, except that it's a proprietary tool that generates those. It even does this 'on the fly' (just adding a file into a directory is enough for it to start compiling a file). Top level Makefile exists only for KDevelop et al to give us those 'well known targets' (all, clean..) and build buttons. Makefile really consists of only a series of commands to compile the project.

Besides, even if this wouldn't be the case, how could kdevelop interpret all possible ways of writing a Makefile (meaning how could it detect all project files from them)? Sure, adding a file to a standard Makefile makes it usually to compile, but this was all about KDevelop being able to detect that and to stay in sync. For me, occasionally manually triggering source file 'finds' in a directory tree or triggering it after performing an action such as 'cvs up' seems like an only way.

Comment 9 Amilcar do Carmo Lucas 2003-12-04 14:41:20 UTC
> how could kdevelop interpret all possible ways of writing a Makefile (meaning how could it detect all project files from them)?
How? I have no idea but the guy who wrote buildtools/custommakefiles knows. Because KDevelop does exacly that!!! :)

> Sure, adding a file to a standard Makefile makes it usually to compile, but this was all about KDevelop being able to detect that and to stay in sync
KDvelop detects that and stays in sync. If it doesn't just close the project and reopen it again.

> For me, occasionally manually triggering source file 'finds' in a directory tree or triggering it after performing an action such as 'cvs up' seems like an only way.
I don't understand what you mean here!
Comment 10 Janne Karhunen 2003-12-04 15:00:42 UTC
> KDvelop detects that and stays in sync. If it doesn't just close the project and reopen it again. 
 
I don't see any other ways to do this than the 'find . -iname \*.h \*.cpp ..' for all types of source files, as AFAIK there are *no* generic ways to parse a makefile. I can write a makefile just about the same manner than a book, or it could as well resemble line noise. No try to parse that. Files belonging to a project need to be detected in some other way (that is, by their suffix).

So it sounds to me that this (re-)population of project files is already triggered while reopening a certain type of project. Good. Now i was asking for a way to trigger that same event without re-opening the project but instead, pushing a button. If it already tries to trigger that event in the case of cvs up etc, it doesn't seem to work ( at least for me ). However, just doing this is not a perfect solution, as i could do cvs up from the command line and kdevelop wouldn't know about that. Thus, a button to stay in sync is needed ;)


Comment 11 Andreas Pakulat 2007-02-23 21:59:35 UTC
I implemented a re-populate action in 3.4 svn for custom. Amilcar was wrong, we don't parse all aspects of a Makefile, we only get the targets out of it.

I'm also planning to have a dirwatcher to notify kdevelop and then add new files automatically to custom project (or remove them if they got removed from disk).