Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Compiler plugin API inconsistencies?

(1/2) > >>

zieQ:
Well I'm looking at the compiler plugin API and the gcc compiler plugin and I see inconsistencies.

First, there are Clean, Compile and Rebuild functions with an optional target parameter of type ProjectBuildTarget*
And there are the conterparts CompileAll, RebuildAll.

Then, my opinions:
- CleanAll is missing
- It seems that if we provide the default 0 value to the target parameter, the gcc compiler plugin would segfault.
- It seems to me that XXAll are redundant with the target=0 parameters of XX method or the documentation is not clear about that.

What about removing either the =0 after the target or provide no XXAll methods ?

zieQ

mandrav:

--- Quote from: zieQ on July 30, 2005, 03:11:19 pm ---Well I'm looking at the compiler plugin API and the gcc compiler plugin and I see inconsistencies.

First, there are Clean, Compile and Rebuild functions with an optional target parameter of type ProjectBuildTarget*
And there are the conterparts CompileAll, RebuildAll.

Then, my opinions:
- CleanAll is missing
- It seems that if we provide the default 0 value to the target parameter, the gcc compiler plugin would segfault.
- It seems to me that XXAll are redundant with the target=0 parameters of XX method or the documentation is not clear about that.

What about removing either the =0 after the target or provide no XXAll methods ?

zieQ

--- End quote ---
The interface will not change any more, at least until 1.0 is out.
You 're right, some of those calls might be redundant but it's no harm and definetely not a reason to change the interface again.

About the crash you mentioned, can you send me the .RPT file located in the same dir with codeblocks.exe?

Yiannis.

zieQ:
I said it MAY crash. Hopefully the function are never called with a value 0 as parameter! What about CleanAll missing. I know it could be done with Clean(0) but it would be more consistent with other XXXAll functions! More, there's no cleanAll option in the compile menu

mandrav:

--- Quote from: zieQ on July 31, 2005, 09:30:03 am ---I said it MAY crash. Hopefully the function are never called with a value 0 as parameter!

--- End quote ---

It will not crash with a NULL parameter...
Let me clear this up a bit:

The xxxAll() compiler functions act on all the open projects, not all the targets of the active project.
So, Compile(target) would compile the active project's target or, if target==NULL, it would compile the whole project.
CompileAll() would compile all the open projects.

Yiannis.

zieQ:
Ok, it appears that I had not understood completly the API, it's ok now.
Some comments should be added to make it clearer. I could add them since I'm already adding target dependencies!?

Navigation

[0] Message Index

[#] Next page

Go to full version