Hi,

I'm sorry for the delay in sending this, we all still have jobs :).

First off, the original issue on tinybugs:
    http://wixtoolset.org/issues/4375/

Second, the draft WIP on my fork

https://github.com/Tetnacious/site/blob/master/root/src/documents/development/wips/4375-parameterized-macro-tags.html.md

For the general idea, please read the User Stories and Proposal sections of
the WIP.

Please discuss this idea.
* How much would you like to see this feature in WiX?
* Suggestions of better ways to achieve the same goals?
* Suggestions, remarks or requests regarding the syntax of the macros.
* Suggestions or remarks regarding implementation.
* Any other thoughts.

My thoughts on the implementation.

I originally proposed that it'd be written as a PreprocessorExtension. I
have one major problem with this approach and that is the early expansion.
Currently, preprocessor extensions can only access the full document after
the regular preprocessing. This is both counter-intuitive and limits the
functionality and reuse potential of the macro.

Consider for example that in my macro I want to get the TargetPath of a
referenced project just using the project name. I would write something
like `$(var.$(mac.ProjectName).TargetPath)` which will fail because of the
early expansion since the preprocessor is not aware of the variable and the
extension can't supply it because it is call specific.

So long story short, in my opinion macros should be expanded before
standard preprocessor commands, and so a new extension point is required on
IPreprocessorExtension and in Preprocessor. Something like
PreprocessDocument but before parsing the variables and conditionals. And
that is the only addition to WiX that the feature requires in my opinion.

Regarding Votive. It seems only natural that we give the user some
documentation syntax on the macro definition which will show up in the
tooltips and autocomplete, otherwise there will be a heavy overhead of
constantly checking the macro source when using it. Also, I think that a
basic "Go-To"\F12 functionality will be nice and sort of expected. And on
the same breath we could add the go-to functionality to other places like
XXXXXref tags and include directives.

Regarding the Votive build. Obviously, if the whole thing is implemented as
a preprocessor extension, then there's no need for any change to the Votive
build process.

Best Regards,
Tamir Daniely
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
WiX-devs mailing list
WiX-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to