« Return to Thread: [jira] Created: (BOO-969) It's very good and safe operation to call BindAttributes step twice (second after ExpandMacroStep)

[jira] Closed: (BOO-969) Cycle over attribute application and macro expansion until all are applied and expanded (within a fixed limit of iterations)

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View in Thread


     [ http://jira.codehaus.org/browse/BOO-969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rodrigo B. de Oliveira closed BOO-969.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.8.3

Fixed in the repository.

> Cycle over attribute application and macro expansion until all are applied and expanded (within a fixed limit of iterations)
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: BOO-969
>                 URL: http://jira.codehaus.org/browse/BOO-969
>             Project: Boo
>          Issue Type: Improvement
>          Components: Compiler
>            Reporter: Fagim Sadikov
>            Assignee: Rodrigo B. de Oliveira
>            Priority: Minor
>             Fix For: 0.8.3
>
>         Attachments: ResolveExpressions.cs
>
>
> I've started to design compile support for DSL that created ActiveRecordRelated classes.
> for Example module that contains:
> namespace MyProject.Model
> import Mediatech.AR.Compile
> [Entity] class Bill:
>         pass
> [Entity] class Operation:
>         pass
> rel Operation > Bill as MyBill , lazy
> leads to create
> 1. public abstract class mpmRoot<T>(ActiveRecordBase<T>):
>       pass
> 2. piblic interface IBill(IEntityDataPattern): //IEntityDataPattern not discussed here
>       pass
> 3... operation too
> Bill and Operation clases gets mpmRoot and those interfaces as root....
> AND:
> "rel" macro leads to create MyBill property with Castle.ActiveRecord.BelongsTo in Operation class and HasMany in Bill class with Lazy and Operations name (deffault name when no "as")....
> BUT TO DO IT IT WAS NESSESARY TO REWRITE ONE LINE IN BOO SOURCES:
> but default implementation of ResolveExpressions pipeline doesn't allow to do it because all attributes must be binded BEFORE maxroses are expanded...
> so i can to define somethig like RelAttribute but it will be not clear because it will be needs to deside to what class of pair your must bind it, it's hardly to read and hardly to manage.
> So in my copy of sources i simply double BindAndApplyAttributes step in pipline , inserting second one after ExpandMacro step, recompile it and xcopy it to sharpdevelop - all works fine, no performance issuses, but i catch great ability to define ANY type of nodes from my macro. Before it, in DEFAULT implementation - you can do anything from macro except of attributes - it's not clear i think....
> My Suggestion is to update ResolveExpressions step with double BindAndApplyAttributes - before (as it now) and after (as i rewrite) ExpandMacros step - nothing wrong in one hand and macroses became much stronger at another:
>  52:                 Add(new BindAndApplyAttributes());
>
>                         Add(new ExpandMacros());
>
> //SFO : from macro i've generate some stuff with attributes, so i wonna rebind it...
> Add(new BindAndApplyAttributes());
> ///////////////////////////////////////////////////////////////////////////////////
>
> Add(new IntroduceModuleClasses());

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: [jira] Created: (BOO-969) It's very good and safe operation to call BindAttributes step twice (second after ExpandMacroStep)

LightInTheBox - Buy quality products at wholesale price!