Soliciting feedback on variant description syntax and reporting
Chris Pickel
chpickel at stwing.upenn.edu
Tue May 15 16:26:31 PDT 2007
On 16 May, 2007, at 01:09, James Berry wrote:
> variant myvariant description "This variant does this and that" {
> configure.args-append --do-this --do-that
> }
>
>
> I'd love to get feedback both on the syntax. The syntax is a little
> bit different because it requires quoting of the description string
> -- something we don't often use in portfiles.
Technically, shouldn't it be unnecessary to do so? We can always
guarantee that the final argument to `variants` is the body. If we
require that the `description` come after `conflicts` and `depends`
statements, then don't we have a well defined slice of `args` that we
can take?
Not that I would advocate this; I don't find the result readable, and
it wouldn't trigger any sort of syntax-highlighting:
variant myvariant description This variant does this and that {
configure.args-append --do-this --do-that
}
Inlined descriptions are obviously the neatest solution, but I
suppose the "cleanest" way to do it would be to spawn a specialized
interp with the appropriate description function and `proc unknown
{args} {}`... which is not clean, though fairly short, code-wise :)
Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.macosforge.org/pipermail/macports-dev/attachments/20070516/f1ae95e2/PGP.bin
More information about the macports-dev
mailing list