Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [buckminster-dev] Still fuzzy on generators/artifacts

Okay, I think I figured it out...

Looks like I was barking up the wrong tree with 'generators' as I believe
(to answer my own question) generators are intended to 'generate' whole
components, rather than just attributes (somebody please correct me if I'm
wrong...).

For my use case, it looks like simply creating a prerequisite using the
build action for 'Component B' on my build action for 'Component A' was
exactly what I was looking for...

Ah, Buckminster - you're a cruel mistress :)

Thanks
T

Todd Lee
Software Tools
ON Semiconductor
Tel:  +1.519.884.9696 ext 2242
Fax: +1.519.884.0228
E-mail: todd_lee@xxxxxxxx


                                                                           
             Todd_Lee@xxxxxxxx                                             
             Sent by:                                                      
             buckminster-dev-b                                          To 
             ounces@xxxxxxxxxx         Buckminster developer discussions   
             g                         <buckminster-dev@xxxxxxxxxxx>       
                                                                        cc 
                                                                           
             04/16/2008 12:54                                      Subject 
             PM                        Re: [buckminster-dev] Still fuzzy   
                                       on generators/artifacts             
                                                                           
             Please respond to                                             
                Buckminster                                                
                 developer                                                 
                discussions                                                
             <buckminster-dev@                                             
               eclipse.org>                                                
                                                                           
                                                                           




Thanks Thomas,

I guess for starters, looking at the metadata lang ref, I'm not exactly
certain how the generator is defined or how the dependency on a generator
(or an attribute generated by a generator) works.

<quote>
Assuming a component X has been specified as a Dependency in a given Cspec.
Generator allows to declare that component X can be obtained (or generated)
via an attribute y in a component Z. NOTE that the enclosing Cspec and all
dependant ones would than only declare Dependencys on X and Z to allow a
successful resolution.
</quote>

>From the above it would seem that what you're saying is, given an
enclosing
CSPEC for a component 'A'

Component:A "depends on" Component:X
and if
Component:Z "contributes" Attribute:Y
Attribute:Y    "generates"   Component:X
then
Component:A "depends on" Component:Z

So, a couple of really basic questions:

1) in the example above, where does the generator get defined - in
Component Z's cspec (and if not, then where)?
2) does the generator always have to generate a 'component' (i.e. an entity
with it's own cspec)? In the case I'm working on right now, what I'd really
like to do is trigger the build action for an artifact as part of the
resolution/materialization process. Is that possible?

The process I need would look something like this:

Component:A "depends on" Component:X  (or more precisely, Attribute:Y)
Component:X "contributes" Attribute:Y
Attribute:Y    "is generated by"  Action:Z

I'm wondering if there's a way to, somewhere in the resolve/materialze/bind
phase, call Action:Z, producing Attribute (Artifact) Y?

I wonder if I need to revise my component definitions so that what I'm
defining as 'Artifacts' in my component (binary products built in
subdirectories) get bumped up to 'components' themselves....

Does that explaination clarify what I'm trying to do?
If you've got any suggestions here, I'd love to hear them :)

Thanks
Todd



Todd Lee
Software Tools
ON Semiconductor
Tel:  +1.519.884.9696 ext 2242
Fax: +1.519.884.0228
E-mail: todd_lee@xxxxxxxx



             Thomas Hallgren
             <thomas@xxxxxxx>
             Sent by:                                                   To
             buckminster-dev-b         Buckminster developer discussions
             ounces@xxxxxxxxxx         <buckminster-dev@xxxxxxxxxxx>
             g                                                          cc

                                                                   Subject
             04/16/2008 11:47          Re: [buckminster-dev] Still fuzzy
             AM                        on generators/artifacts


             Please respond to
                Buckminster
                 developer
                discussions
             <buckminster-dev@
               eclipse.org>






Hi Todd,
I don't think the generator concept is widely used at present and I haven't
got around to write any
demo sample for it just yet. We added it to support some use-cases in
Buckminster that we since then
moved away from (we moved from Axis with and interfaces generated from WSDL
to using JSON).

I'm more then happy to help though but in order to do that, you must tell
me some more about what
specific problems that you are facing.

Regards,
Thomas Hallgren


Todd_Lee@xxxxxxxx wrote:
> Hi there,
>
> Does anybody have any examples of a component which has a dependency on a
> sub-component (ie attribute) of another component which itself is a
product
> of an action?
>
> i.e. -
> Component A depends on Component B's 'artifact.lib' artifact.
> artifact.lib is generated by an action which depends only on the source
for
> the binary and the ant actor that builds it.
>
> I'm trying to manually write the buckminster cspecs (they're non-java
> components) for 'A' and 'B' above so that when B is resolved as a
> dependency of A, 'artifact.lib' is automatically built by the actor that
> generates it... Is this possible?
>
> Any help is greatly appreciated.
>
> T
>
>
> Todd Lee
> Software Tools
> ON Semiconductor
> Tel:  +1.519.884.9696 ext 2242
> Fax: +1.519.884.0228
> E-mail: todd_lee@xxxxxxxx
>
>
>

>              Todd_Lee@xxxxxxxx

>              Sent by:

>              buckminster-dev-b
To
>              ounces@xxxxxxxxxx         buckminster-dev@xxxxxxxxxxx

>              g
cc
>

>
Subject
>              04/10/2008 04:13          [buckminster-dev] question about

>              PM                        generators and/or 'just in time'

>                                        building of dependencies

>

>              Please respond to

>                 Buckminster

>                  developer

>                 discussions

>              <buckminster-dev@

>                eclipse.org>

>

>

>
>
>
>
>
> I've got a couple of non-java (python) projects that I'm trying to
> 'buckminsterize' - The relation is something like this:
>
> Component A depends on artifact X contained in Component B
>
> So I've set up the dependencies so that when I call my top level cquery
> (dependent on Component A) I get a workspace with both Component A and
> Component B materialized (I'm working in the IDE right now). I've created
> buckminster.cspec's for both components as well as build.xml wrappers for
> the actual python build operations.
>
> I'm wondering if there's a way (I'm sure there must be, so I guess the
> question is really 'what's the recommended way') to build Component B so
> that artifact X is ready and waiting when Component A looks for it to
> fulfill the build-time dependency? Looking at the documentation, it would
> seem that perhaps this is the role of the 'generator' element in the
cspec,
> but I'm not clear on how it should be implemented. Any help would be
> greatly appreciated.
>
> Thanks!
> Todd
>
>
> Todd Lee
> Software Tools
> ON Semiconductor
> Tel:  +1.519.884.9696 ext 2242
> Fax: +1.519.884.0228
> E-mail: todd_lee@xxxxxxxx
>
> _______________________________________________
> buckminster-dev mailing list
> buckminster-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/buckminster-dev
>
>

_______________________________________________
buckminster-dev mailing list
buckminster-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/buckminster-dev


_______________________________________________
buckminster-dev mailing list
buckminster-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/buckminster-dev




Back to the top