share code between makebuilder and external scripts

Milian Wolff mail at milianw.de
Wed Sep 22 02:08:59 UTC 2010


On Wednesday 22 September 2010 00:25:02 Aleix Pol wrote:
> On Tue, Sep 21, 2010 at 11:03 PM, Milian Wolff <mail at milianw.de> wrote:
> > Hey guys,
> > 
> > I need your feedback on this. Apparently some people are using my
> > external scripts plugin to run some magic build scripts, like e.g.:
> > 
> > https://bugs.kde.org/show_bug.cgi?id=251983
> > 
> > This is great since that was definitely one of the reasons I wrote that
> > plugin.
> > Anyways, people are not yet satisfied and want (rightly so!) the features
> > we
> > give them for plain make build jobs, esp. the highlighting of
> > errors/warnings
> > and the ability to jump to those positions inside the code.
> > 
> > I want to give that to the users of custom buildsystems as well,
> > currently I'd
> > imagine a checkbox in the configuration of an external script, which you
> > can
> > tick to enable this "error detection".
> > 
> > What I want to prevent is duplicated code. The code for MakeJobs works
> > fine it
> > seems, so I'd be interested in reusing that. The real question is: how,
> > without making it a API mess that cannot stay BC.
> > 
> > Right now I think the best way would be to put the code in
> > MakeOutputModel::addLines , that decides whether a line has an error or
> > action, into a library so one could reuse it. But I'm not sure whether
> > returning a FilteredItem from this function is fine, considering BC. I
> > could
> > make it a proper class with dptr if it's preferred, or is using that
> > struct there OK?
> > 
> > Furthermore I'd need MakeOutputDelegate and quite some code currently
> > found in
> > MakeOutputModel, like activate, next/prevHighlightIndex, urlForFile...
> > 
> > So should I maybe export the whole MakeOuputModel and rebase my own model
> > on
> > that somehow? I.e. put MakeOutputModel into kdevplatform/outputview?
> > 
> > Too many maybes, whats and unsures for me. Please give me some help :)
> > 
> > Bye
> > --
> > Milian Wolff
> > mail at milianw.de
> > http://milianw.de
> > 
> > --
> > KDevelop-devel mailing list
> > KDevelop-devel at kdevelop.org
> > https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
> 
> Maybe it would be easier to add support for custom targets? I think that
> our makebuilder should support all kinds of interaction a developer might
> need against make. No?
> 
> If you used the MakeOutputModel, how would you let the user tell if he's
> using make command or not? isn't that workaround-ish?

As I said, a simply checkbox "output should be filtered for make messages" or 
similar. Imo external scripts should have such a feature.

Or we add yet another way to build scripts by defining arbitrary shell commands 
and add them as targets. I.e. a context menu entry on folders (not targets) 
"New Target" or similar.

One could do that, and the idea is indeed nice. What do the others think?
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100922/2bc00ffc/attachment.sig>


More information about the KDevelop-devel mailing list