Re: More on Actions, routes and builders in general
Bram Moolenaar <[email protected]> Sat, 19 Jun 2004 20:01:18 +0200
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
Lars Ivar Igesund wrote: > Bram Moolenaar wrote: > > Be careful to only make actions "primary" when they are always to be > > used for turning its input filetypes into its output filetypes. Thus one > > would be "d" to "object,default", another "d" to "libobject" and the > > third "d" to "dllobject". These are in the d module, the actions in the > > dmd tool can't be primary actions, they are invoked indirectly by the > > module. > > That's the way it is. > > > I can't guess what is wrong. Can you show me the code? > > (d.aap and dmd.py are attached.) They were not attached, thus I have to do a bit of guessing. > It is quite possible that something is wrong in my code somewhere, but > as I said before, if I want to build a program only, it works if the > compile to object,default is the last to be defined. I have detected why > this happens (although I don't know if it is intended or not): > > The executive use the find_action to find the correct action to use. > find_action finds the last action added that satisfies both the intype > and outtype needed. To find out which types are supported by an action, > get_in_types and get_out_types are used. The problem exist for both of > them, but in this case it is only a problem with get_out_types. > get_out_types checks if there is an action to defer the work to (and > there is in this case; compile_dmd). get_out_types then use get_ftypes > and it is here the real trouble is created. get_ftypes adds all the > outtypes supported by all the compile_dmd actions to the list of > outtypes to be returned, and in total all the compile_dmd actions > support all three outtypes. This leads to the fact that all three > primary actions satisfies the if in find_action and thus the last > defined is returned as the action to use even though it might not > _really_ support the outtype requested. There currently is no restriction in the input types for the desired output, and the other way around. But from your description that doesn't appear to be the problem. You say all three primary actions defer the work to a "compile_dmd" action. Then isn't it so that each action can accept the work and defer it to "compile_dmd"? Where does this go wrong? Adding a restriction in the output types that only one input type is used wouldn't help, since the input is always a "d" file. I'll look into the extra check for the combination of input and output type in one action, but I'm not sure if that will help for your problem. -- Your mouse has moved. Windows must be restarted for the change to take effect. Reboot now? /// 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