Delayed properties resolving
Daniel Tihelka <[email protected]>
| Newsgroups | gmane.comp.java.cruise-control.devel,gmane.comp.java.cruise-control.user |
|---|---|
| Organization | KKY |
| Message-ID | <[email protected]> |
Dear CruiseControl users and developers,
We have the following problem. In our project (building of voices for
text-to-speech synthesis) we need dozen of properties filled by a default
value. The values are mostly the same, but in general, any of them may differ
for a particular voice. So, our "general" project file contains lines like:
<property name="build.memory.speech" value="1000000000"/>
<property name="build.memory.feats" value="800000000"/>
<property name="build.inventory.DAC" value="1.0"/>
<property name="build.inventory.DGC" value="1.0"/>
<property name="build.inventory.IGC" value="1.0"/>
... and so on, about 30 in total
However, it also defines property USING that values (to simplify):
<property name="build.args.inventory_builder"
value="-mf ${build.memory.feats} -mw ${build.memory.speech} -dac
${build.inventory.DAC} -dgc ${build.inventory.DGC} -igc
${build.inventory.IGC} ... and those others ... "/>
resulting in:
'build.args.inventory_builder' = "-mf 800000000 -mw 1000000000 -dac 1.0 -dgc
1.0 -igc 1.0 ... "
And we include sub-projects for the individual voices:
<include.projects
file="${root.dir}/${cruise.projects.dir}/inventory_spkr_PP.cruise" />
<include.projects
file="${root.dir}/${cruise.projects.dir}/inventory_spkr_AJ.cruise" />
... and so on
Well, the problem is, when we want to change a property,
e.g. 'build.inventory.IGC' from 1.0 to 1.3 for one of the voices. We can
defined the property again in the required voice-building project, but the
new value will NOT appear in the 'build.args.inventory_builder' property! So
instead of the required:
'build.args.inventory_builder' = "-mf 800000000 -mw 1000000000 -dac 1.0 -dgc
1.0 -igc 1.3 ... "
we still have:
'build.args.inventory_builder' = "-mf 800000000 -mw 1000000000 -dac 1.0 -dgc
1.0 -igc 1.0 ... "
Of course they will not appear there - the 'build.args.inventory_builder' is
resolved on the level of the general file, and there is
no 'build.inventory.IGC' property to be resolved
in 'build.args.inventory_builder' in the particular project (although the
value of the property is changed).
Temporarily, we solved it by repetition of the property (the arguments
contain ''... -igc 1.0 ... -igc 1.3 ..."), which is tool-dependent (some
tools take the value of the fist occurrence, some of the last), not
persistent, neither very robust (we had to bypass one tool which disliked an
option defined twice ...).
So, what to do with it?
- there already is a way of achieving it. Please, if you know the way, let me
know ...
- change the behavior of CC to resolve the properties at the last moment,
just before they are used. However, it may change the behavior of CC, and
someone may rely on it. Therefore, I expect it is hardly acceptable
- add new optional attribute to <property /> tag, something like
like "delayresolving=true", with default to "false" if not set; that would
cause the resolving of properties to the last moment before they are required;
the original behavior will stay unaffected
- ??? any better/cool idea?
If you think that the idea is interesting and CC users may benefit from it, I
really could try to code any of your suggestions into CC (kind of looking
forward into it, as the update of properties
http://jira.public.thoughtworks.org/browse/CC-952 was quite fun). For us it
would definitely made the configuration much more readable and easier to
understood.
Thank you very much for your answers and suggestions.
Kind regards,
Dan
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Cruisecontrol-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-devel
signature.asc
(application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) iEYEABECAAYFAktDV+4ACgkQuYlVhxo/P1GJPwCgtjnnLnBBZLMdubGGkl6/48fi L1IAoLHP1UMjehWE111XH+V+n1lfajzY =zw81 -----END PGP SIGNATURE-----