List Info

Thread: buildtools/builder API suggestion.




buildtools/builder API suggestion.
user name
2007-04-29 07:30:54
I'm working on CustomMakeManager. The problem is that
IProjectBuilder::build() api is not reusable for
CustomMakeManager

in IProjectBuilder, the only interfaces are

    virtual bool build(ProjectBaseItem *dom) = 0;
    virtual bool clean(ProjectBaseItem *dom) = 0;

The problem is that we cannot specify build target or
build directory using ProjectBaseItem. If we see the
implementation
in MakeBuilder::build(), dom is casted into ProjectItem,
which
doesn't contain any information of target or build
directory. So
MakeBuilder just executes "make" with no target in
top project dir.

Why don't we specify targets as an additional argument?

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

Re: buildtools/builder API suggestion.
user name
2007-04-29 07:52:54
2007/4/29, dukju ahn <dukjuahngmail.com>:
> I'm working on CustomMakeManager. The problem is that
> IProjectBuilder::build() api is not reusable for
CustomMakeManager
>
> in IProjectBuilder, the only interfaces are
>
>     virtual bool build(ProjectBaseItem *dom) = 0;
>     virtual bool clean(ProjectBaseItem *dom) = 0;
>
> The problem is that we cannot specify build target or
> build directory using ProjectBaseItem. If we see the
implementation
> in MakeBuilder::build(), dom is casted into
ProjectItem, which
> doesn't contain any information of target or build
directory. So
> MakeBuilder just executes "make" with no
target in top project dir.
>
> Why don't we specify targets as an additional
argument?

Currently every managers subclass ProjectItem for their
private use.
Because these classes are not part of interfaces, these
cannot be
used to specify more detailed information or instructions.
( IMakeBuilder just treats its argument as ProjectItem )
Thus, I think that informations contained in CMakeTargetItem
should
become an interfaces, and enforce automake, cmake,
custommake
managers should use it to invoke build process.

At least IMakeBuilder::build() should take more subclassed
item as an arguement. For ex, it can take CppProjectItem.
class CppProjectItem : public Projectitem
{
targets, includes, defines, ...
}

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

Re: buildtools/builder API suggestion.
user name
2007-04-29 08:41:54
On 29.04.07 08:52:54, dukju ahn wrote:
> 2007/4/29, dukju ahn <dukjuahngmail.com>:
> > I'm working on CustomMakeManager. The problem is
that
> > IProjectBuilder::build() api is not reusable for
CustomMakeManager
> >
> > in IProjectBuilder, the only interfaces are
> >
> >     virtual bool build(ProjectBaseItem *dom) = 0;
> >     virtual bool clean(ProjectBaseItem *dom) = 0;
> >
> > The problem is that we cannot specify build target
or
> > build directory using ProjectBaseItem. If we see
the implementation
> > in MakeBuilder::build(), dom is casted into
ProjectItem, which
> > doesn't contain any information of target or build
directory. So
> > MakeBuilder just executes "make" with no
target in top project dir.
> >
> > Why don't we specify targets as an additional
argument?
> 
> Currently every managers subclass ProjectItem for their
private use.
> Because these classes are not part of interfaces, these
cannot be
> used to specify more detailed information or
instructions.
> ( IMakeBuilder just treats its argument as ProjectItem
)
> Thus, I think that informations contained in
CMakeTargetItem should
> become an interfaces, and enforce automake, cmake,
custommake
> managers should use it to invoke build process.

No, CMakeTargetItem is specific to CMake and should stay
that way.

> At least IMakeBuilder::build() should take more
subclassed
> item as an arguement. For ex, it can take
CppProjectItem.
> class CppProjectItem : public Projectitem

Please stop this CppProject* stuff, Make can not only build
CPP
projects.

More verbose information as answer to your original mail.
 
Andreas

-- 
Caution: Keep out of reach of children.

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

Re: buildtools/builder API suggestion.
user name
2007-04-29 08:44:21
On 29.04.07 08:30:54, dukju ahn wrote:
> I'm working on CustomMakeManager. The problem is that
> IProjectBuilder::build() api is not reusable for
CustomMakeManager
> 
> in IProjectBuilder, the only interfaces are
> 
>     virtual bool build(ProjectBaseItem *dom) = 0;
>     virtual bool clean(ProjectBaseItem *dom) = 0;
> 
> The problem is that we cannot specify build target or
> build directory using ProjectBaseItem.

So? From the project base item you can fetch the project and
find the
builddir. If a project manager wants to allow building of a
specific
target it should do so by additions to the context menu.

> If we see the implementation
> in MakeBuilder::build(), dom is casted into
ProjectItem, which
> doesn't contain any information of target or build
directory. So
> MakeBuilder just executes "make" with no
target in top project dir.

Of course, because nobody made it more intelligent yet.

> Why don't we specify targets as an additional
argument?

Because not all project builders know what a target is. 

If you need to customize an interface create a subclass and
add new
methods. Then have a plugin implement these.

Andreas

-- 
You have no real enemies.

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

Re: buildtools/builder API suggestion.
user name
2007-04-29 09:08:26
2007/4/29, Andreas Pakulat <apakugmx.de>:
> On 29.04.07 08:30:54, dukju ahn wrote:
> > I'm working on CustomMakeManager. The problem is
that
> > IProjectBuilder::build() api is not reusable for
CustomMakeManager
> >
> > in IProjectBuilder, the only interfaces are
> >
> >     virtual bool build(ProjectBaseItem *dom) = 0;
> >     virtual bool clean(ProjectBaseItem *dom) = 0;
> >
> > The problem is that we cannot specify build target
or
> > build directory using ProjectBaseItem.
>
> So? From the project base item you can fetch the
project and find the
> builddir. If a project manager wants to allow building
of a specific
> target it should do so by additions to the context
menu.

I was not talking about user interface. My question was how
the
projectmanagers can specify which target to build.

> If you need to customize an interface create a subclass
and add new
> methods. Then have a plugin implement these.

I think this is the answer.

>Please stop this CppProject* stuff, Make can not only
build CPP
>projects.

I thought MakeBuilder is just for C/C++. Are there any cases
where
"make" is used for other languages than C/C++? If
then, do we need
to create Builder that is specific for C/C++?

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

Re: buildtools/builder API suggestion.
user name
2007-04-29 09:08:26
2007/4/29, Andreas Pakulat <apakugmx.de>:
> On 29.04.07 08:30:54, dukju ahn wrote:
> > I'm working on CustomMakeManager. The problem is
that
> > IProjectBuilder::build() api is not reusable for
CustomMakeManager
> >
> > in IProjectBuilder, the only interfaces are
> >
> >     virtual bool build(ProjectBaseItem *dom) = 0;
> >     virtual bool clean(ProjectBaseItem *dom) = 0;
> >
> > The problem is that we cannot specify build target
or
> > build directory using ProjectBaseItem.
>
> So? From the project base item you can fetch the
project and find the
> builddir. If a project manager wants to allow building
of a specific
> target it should do so by additions to the context
menu.

I was not talking about user interface. My question was how
the
projectmanagers can specify which target to build.

> If you need to customize an interface create a subclass
and add new
> methods. Then have a plugin implement these.

I think this is the answer.

>Please stop this CppProject* stuff, Make can not only
build CPP
>projects.

I thought MakeBuilder is just for C/C++. Are there any cases
where
"make" is used for other languages than C/C++? If
then, do we need
to create Builder that is specific for C/C++?

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

Re: buildtools/builder API suggestion.
country flaguser name
Russian Federation
2007-04-29 09:09:06
On Sunday 29 April 2007 17:44, Andreas Pakulat wrote:
> On 29.04.07 08:30:54, dukju ahn wrote:
> > I'm working on CustomMakeManager. The problem is
that
> > IProjectBuilder::build() api is not reusable for
CustomMakeManager
> > 
> > in IProjectBuilder, the only interfaces are
> > 
> >     virtual bool build(ProjectBaseItem *dom) = 0;
> >     virtual bool clean(ProjectBaseItem *dom) = 0;
> > 
> > The problem is that we cannot specify build target
or
> > build directory using ProjectBaseItem.
> 
> So? From the project base item you can fetch the
project and find the
> builddir. If a project manager wants to allow building
of a specific
> target it should do so by additions to the context
menu.

FWIW, I'd prefer that in KDevelop4 debugger be able to
specifically
ask the project manager to update the target that is being
debugger.

- Volodya

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

Re: buildtools/builder API suggestion.
user name
2007-04-29 09:40:14
On 29.04.07 10:08:26, dukju ahn wrote:
> 2007/4/29, Andreas Pakulat <apakugmx.de>:
> >Please stop this CppProject* stuff, Make can not
only build CPP
> >projects.
> 
> I thought MakeBuilder is just for C/C++. Are there any
cases where
> "make" is used for other languages than
C/C++? If then, do we need
> to create Builder that is specific for C/C++?

I've used make for building .ui files into .py code when
PyQt4 couldn't
load them during runtime. I can imagine mixed setups where
some makefile
targets build documentation, byte-compile perl or python
code or just
run some shell script to package the project. 

Don't assume a certain language is used with a certain build
tool. We
have language support on a per file basis.

And no I don't see why we should need a CppMakeBuilder, what
would be
the difference to a "standard" makebuilder? After
all all a makebuilder
does is execute make in a certain directory with a certain
target and
possibly some arguments.

Andreas

-- 
You will be winged by an anti-aircraft battery.

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

Re: buildtools/builder API suggestion.
user name
2007-04-29 09:43:06
On 29.04.07 18:09:06, Vladimir Prus wrote:
> On Sunday 29 April 2007 17:44, Andreas Pakulat wrote:
> > On 29.04.07 08:30:54, dukju ahn wrote:
> > > I'm working on CustomMakeManager. The problem
is that
> > > IProjectBuilder::build() api is not reusable
for CustomMakeManager
> > > 
> > > in IProjectBuilder, the only interfaces are
> > > 
> > >     virtual bool build(ProjectBaseItem *dom)
= 0;
> > >     virtual bool clean(ProjectBaseItem *dom)
= 0;
> > > 
> > > The problem is that we cannot specify build
target or
> > > build directory using ProjectBaseItem.
> > 
> > So? From the project base item you can fetch the
project and find the
> > builddir. If a project manager wants to allow
building of a specific
> > target it should do so by additions to the context
menu.
> 
> FWIW, I'd prefer that in KDevelop4 debugger be able to
specifically
> ask the project manager to update the target that is
being debugger.

You can do that already, the debugger knows the project item
that is the
target. We already have ProjectTargetItem. You can fetch the
project
from the item and get its project manager. From the manager
you can
fetch the builder and let it build the target item.

Whats missing is just some more intelligence in the
makebuilder and the
qmake builder too (in case of qmake projects)

Andreas

-- 
Try to relax and enjoy the crisis.
		-- Ashleigh Brilliant

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

Re: buildtools/builder API suggestion.
user name
2007-04-29 12:27:00
2007/4/29, Andreas Pakulat <apakugmx.de>:
> On 29.04.07 08:30:54, dukju ahn wrote:
> > I'm working on CustomMakeManager. The problem is
that
> > IProjectBuilder::build() api is not reusable for
CustomMakeManager
> >
> > in IProjectBuilder, the only interfaces are
> >
> >     virtual bool build(ProjectBaseItem *dom) = 0;
> >     virtual bool clean(ProjectBaseItem *dom) = 0;
> >
> > The problem is that we cannot specify build target
or
> > build directory using ProjectBaseItem.
>
> So? From the project base item you can fetch the
project and find the
> builddir.

I reviewed IProject and there is no method to return the
building
directory. Although project directory can be retreived by
IProject,
it is not always the case to invoke "make" at
top_src_dir.

> If a project manager wants to allow building of a
specific
> target it should do so by additions to the context
menu.

I'm not talking about user interface. My question is how
does the
MakeBuilder know which target to build?

ProjectBaseItem can be into either ProjectItem or
ProjectTargetItem.
But neither doesn't have any interfaces related with
target.

For example, I want to "make clean". How the
"clean" target
can be fetched _inside_ MakeBuilder just using
ProjectTargetItem or
ProjectItem? Do we use QStandardItem::data() or
QStdItem::text()?
Or should we add one more method in TargetItem such as
QString targetName()??

> > If we see the implementation
> > in MakeBuilder::build(), dom is casted into
ProjectItem, which
> > doesn't contain any information of target or build
directory. So
> > MakeBuilder just executes "make" with no
target in top project dir.
>
> Of course, because nobody made it more intelligent
yet.

I am asking these questions to make him more intelligent.

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

[1-10] [11-15]

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