Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: dmoore on December 06, 2006, 09:23:48 pm

Title: CB Project Infrastructure
Post by: dmoore on December 06, 2006, 09:23:48 pm
These are somewhat tentative thoughts about Projects in CB, largely aimed at allowing CB to be slightly less C/C++ centric. I'm sure Mandrav and others have thought more deeply about these issues, but thought I'd raise them now with the talk of impending feature freezes. I think some of these issues could be addressed with only minor changes to the SDK, but some  may need to wait until 1.x.

Keep in mind these are just my opinions, no offense intended.

1. Projects depend on the presence of a compiler plugin

I recently tried disabling the debugger and compiler plugins to see what would happen. When I attempt to create any new project, C::B crashes. Shouldn't project types that depend on the compiler plugin simply be disabled/refuse to open. (Otherwise it should not be possible to disable the compiler plugin?)

2. Projects must have a compiler assigned

Even when creating an empty project, CB forces you to choose a compiler. In my view, not all projects need a compiler and some may want to use more than one. (Maybe this is just a templating issue). This leads me to my next point

3. Projects can't simply be a collection of files?

If not, why not? Even when I try to create the simplest of projects (for instance to edit some html files) it is filled with build/compiler dependancies. e.g.:

Code
	<Project>
<Option title="TEST" />
<Option pch_mode="2" />
<Option default_target="" />
<Option compiler="none" />
<Option virtualFolders="" />
<Build>
<Target title="Release">
<Option output="Release\TEST.exe" prefix_auto="1" extension_auto="1" />
<Option object_output="Release\" />
<Option type="1" />
<Option compiler="none" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
</Compiler>
<Unit filename="index.html">
<Option compilerVar="CPP" />
<Option compile="0" />
<Option link="0" />
<Option objectName="index.html" />
<Option target="Release" />
</Unit>
</Project>

This contains a lot of content that is irrelevant to a minimal project. Ideally CB should allow some other plugin to write project specific configuration (for instance, a set of config variables required to deploy the set of html pages to a website)

4. Many C/C++ specific plugins react to all file types

Try right clicking on the editor pane in files that aren't C/C++ filetypes. Does CB have/need a filetype manager to assist plugins?

5. File properties quirks

Selecting file properties from the project tree (i) crashes C::B if the compiler plugin is disabled (ii) presents c/c++ centric information even if files aren't c/c++ files

6. Version control support

We need it. Ideally at the project level.
Title: Re: CB Project Infrastructure
Post by: killerbot on December 06, 2006, 09:37:21 pm
Quote
6. Version control support

We need it. Ideally at the project level.

there are already several plugins for different version control systems (clearcase, svn).
After 1.0 we are thinking of creating a framework/interface for registering version control plug-ins and the actions that can be performed. But for that we need to compare the functionalities of the different version control systems to find the common tasks.
Title: Re: CB Project Infrastructure
Post by: MortenMacFly on December 06, 2006, 11:35:34 pm
1. Projects depend on the presence of a compiler plugin
I recently tried disabling the debugger and compiler plugins to see what would happen. When I attempt to create any new project, C::B crashes.
How did you do that? I can't reproduce - you are usually not able to create a project without a compiler (although this isn't the best solution, though...). Can you give me exactly step-by-step instructions how you do that?

5. File properties quirks
Selecting file properties from the project tree (i) crashes C::B if the compiler plugin is disabled
This has been fixed in SVN (r3349). We can't fix stuff if it doesn't get reported. Thanks for reporting.

With regards, Morten.
Title: Re: CB Project Infrastructure
Post by: Game_Ender on December 07, 2006, 12:18:38 am
After 1.0 we are thinking of creating a framework/interface for registering version control plug-ins

I think its a bad idea if you end up shooting for the lowest common denominator, especially if its coded into the CB core or SDK.  I think it would be cool to see a flexible version control plugin that could load a backend for each version control system.  That way someone could still write one completely from scratch if they wanted to.

All that said, is there some page on the wiki where we can start posting ideas for this?
Title: Re: CB Project Infrastructure
Post by: mandrav on December 07, 2006, 09:13:58 am
After 1.0 we are thinking of creating a framework/interface for registering version control plug-ins

I think its a bad idea if you end up shooting for the lowest common denominator, especially if its coded into the CB core or SDK.  I think it would be cool to see a flexible version control plugin that could load a backend for each version control system.  That way someone could still write one completely from scratch if they wanted to.

We need the lowest common denominator as a base interface. Of course any version control plugin could offer all the functionality it needs but it should support the minimum set of commands needed.

All that said, is there some page on the wiki where we can start posting ideas for this?

I don't think there is one but you 're free to create a new page.
Title: Re: CB Project Infrastructure
Post by: dmoore on December 07, 2006, 03:44:40 pm
1. Projects depend on the presence of a compiler plugin
I recently tried disabling the debugger and compiler plugins to see what would happen. When I attempt to create any new project, C::B crashes.
How did you do that? I can't reproduce - you are usually not able to create a project without a compiler (although this isn't the best solution, though...). Can you give me exactly step-by-step instructions how you do that?

my apologies, I was using a Nov 24 build, someone must have fixed already.

It's still weird that when I select empty project it forces me to choose a compiler (when the compiler plugin is deactivated the list is empty) and at least one build target.

So what about project settings: Shouldn't it be possible to remove all targets from a project? Similarly, for a language that doesn't support PCH, why have a PCH setting?