|Advising Build Units - "internal advice" [message #577837]
||Tue, 22 September 2009 23:24
| Henrik Lindberg
Registered: July 2009
In b3 we want to support advice on build units using two different
- advice provided inside a build unit (e.g. the way Buckminster CSPEX works)
- advice externally injected (or decoration if you prefer that term).
This post is about the first form - advise provided inside the build unit.
In Buckminster, the advice is supported directly by the various readers.
In b3, I think we should support buckminster's CSPEX as well as other
mechanisms to provide advice (I am sure we are going to get a great
xtext based way to express advice for instance).
I have been thinking how this could be supported while keeping meta data
translators free of this concern. The current model selects a meta data
translator based on a resolver, and the namespace of the requested
component. It seems natural to add a second extension mechanism that
kicks in as a second step.
A Buckminster advisor could operate on any IResolver that implements
IEFSBasedAccess looking for the file /buckminster.cspex for instance.
Basically, it is a "chained" resolver that gets a resolution as
However, since all advice providers should be given a chance, there is a
need to iterate - perhaps letting the first win (as two forms of
internal advice at the same time (i.e. both a buckminster.cspex, and
some newer form of adivce) seems a bit odd.
Alternativly, all meta data translators are given a list of files /
probes that indiciate the precense of advice - it would then be the meta
data translators job to detect if the advice is present - and then hand
over to the advisor. This would enable a non EFS based meta data
translator to also use internal advice. Apart from that benefit, the
solution is just less clean IMO.
Handling injected advice is a topic on its own.
Powered by FUDForum
. Page generated in 0.02628 seconds