Re: More on Actions, routes and builders in general
Bram Moolenaar <[email protected]> Sun, 20 Jun 2004 16:25:47 +0200
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
Lars Ivar Igesund wrote: > Bram Moolenaar wrote: > > > I don't know if any of the other extra features of using > > define_action() is desired. If that is so, then defining > > get_out_types() yourself would work. > > > > Well, it worked as it should before, I think, but I believe that at some > time it might be necessary to be able to support more intypes (resource > files are a good guess) and I had the understanding that that would be > best through using define_action()? If the input or output types that an action supports are not static, but depend on settings or tools available, then define_action() should be used. For static types ":action" is probably sufficient. > And where should I define get_out_types() myself? There is a simplistic example in the docs (ref-python). However, I am not pleased with this method. Mainly because the function you define is not part of the class, thus you can't use "self". Perhaps there is another way to overrule the function? If not, then subclassing Action would be required. I try avoiding that, because this means exposing internals. > Anyway, I think that it is a bug the way it is now (since the same > actions worked when using :action). The solution (IMO) would be to check > the types of the primary action with the types requested by the recipe > and then make sure that the action that do the real work supports at > least the same types as the primary action. But that already happens. The compile_dmd action that is invoked does support the output type. The problem is that Aap doesn't know that the type of the primary action should be used, and not the type of the action the work is deferred to. The whole point of doing this defer stuff was that a build action can support more types when the work is deferred to another action. Thus normally a "build" action would only support object files, on some systems it can additionally support "resource" files, or whatever the linker accepts. Thus when defining the action you must make clear to Aap what input and output types are supported. The get_in_types() and get_out_types() functions are to be defined for that. -- hundred-and-one symptoms of being an internet addict: 221. Your wife melts your keyboard in the oven. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html /// ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND