Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[buckminster-dev] Re: Components that come into existence during a build

Done some more thinking. In essence the previous example can be modified to read something like this:

<dependencies>
  <dependency name="B"/>
  <dependency name="G">
    <prerequisites>
      <external name="B" action="create.G"/>
    </prerequisites>
  </dependency>
</dependencies>

Buckminster would read this as "Don't make an attempt to resolve "G" until you have executed the action "B.create.G". An additional interpretation could be that "G" is the product of its prerequisites.

I think this is a simpler and more flexible approach then using subcomponents. It solves the same problem with an already known syntax. More then one prerequisite may exist and a prerequisite may be local.

- thomas



We need some way of expressing Action 'x' in component 'A' needs the result of action 'y' in the generated component 'G'. The CSPEC format can be discussed. Perhaps it's an extension to the Action rather then a subcomponent? How would you do the following?

In the CSPEC for A

<dependencies>
  <dependency name="G" subcomponentOf="B"/>
</dependencies>

<actions>
    <public name="x" .../>
       <prerequisites>
          <external component="G" attribute="y"/>
       </prerequisites>
       ...
    </public>
</actions>

In the B CSPEC

<subcomponents>
  <subcomponent name="G" action="create.G"/>
</subcomponent>

Expected flow:
1. Something triggers action A.x.
2. Buckminster wants to resolve the prerequisite G.y.
3. It asks for the CSPEC of G via the dependency.
4. Finds the subcomponentOf="B" declaration.
5. B is brought in and the subcomponent entry for G is obtained.
6. The action 'create.G' is executed.
7. Once completed, the G CSPEC is obtained and returned all the way up.
8. G.y can now be resolved (which in turn might trigger actions in G)

Another side-effect that Henrik and I discussed is how to deal with dependencies in the generated component. How do we resolve them? Do we allow them at all? Do we allow that they go beyond the dependencies expressed by the generating component? If so, in what scope do we materialize them?

Muddy waters, yes. Let's pour some chlorine into it :)

- thomas



Back to the top