Soliciting feedback on variant description syntax and reporting
I checked into base last night (http://trac.macosforge.org/projects/ macports/changeset/25147), some code to support variant descriptions. The syntax I chose was the following: 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. Please give feedback on whether you like this, or whether we should use a syntax like this: variant myvariant { configure.args-append --do-this --do-that } variant_description myvariant This variant does this and that (which doesn't need quoting of the description). Secondly, in order to emit the description in port info, I expanded the variant section to show a single variant per line, which makes info a bit longer. Please let me know if you like this, or if we should limit ourselves to showing variant descriptions in "port variants" instead. Thanks for your input on these important matters ;) James
Le 07-05-15 à 12:09, James Berry a écrit :
I checked into base last night (http://trac.macosforge.org/projects/ macports/changeset/25147), some code to support variant descriptions.
The syntax I chose was the following:
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.
Please give feedback on whether you like this, or whether we should use a syntax like this:
variant myvariant { configure.args-append --do-this --do-that } variant_description myvariant This variant does this and that
(which doesn't need quoting of the description).
Secondly, in order to emit the description in port info, I expanded the variant section to show a single variant per line, which makes info a bit longer. Please let me know if you like this, or if we should limit ourselves to showing variant descriptions in "port variants" instead.
I don't know about the code works, but I would like the third untold solution : variant myvariant { configure.args-append --do-this --do-that description This variant does this and that } yves
That would be a little harder to do. I've thought about it, but it would require redefining the description command before executing variants, and it would require the portindex tool to execute each variant separately. On May 15, 2007, at 4:31 PM, Yves de Champlain wrote:
I don't know about the code works, but I would like the third untold solution :
variant myvariant { configure.args-append --do-this --do-that description This variant does this and that }
-- Kevin Ballard http://kevin.sb.org eridius@macports.org http://www.tildesoft.com
I would much prefer for `port info` to be reverted and have `port variants` show the descriptions. On May 15, 2007, at 12:09 PM, James Berry wrote:
Secondly, in order to emit the description in port info, I expanded the variant section to show a single variant per line, which makes info a bit longer. Please let me know if you like this, or if we should limit ourselves to showing variant descriptions in "port variants" instead.
-- Kevin Ballard http://kevin.sb.org eridius@macports.org http://www.tildesoft.com
On May 15, 2007, at 1:31 PM, Yves de Champlain wrote:
Le 07-05-15 à 12:09, James Berry a écrit :
I checked into base last night (http://trac.macosforge.org/ projects/macports/changeset/25147), some code to support variant descriptions.
The syntax I chose was the following:
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.
Please give feedback on whether you like this, or whether we should use a syntax like this:
variant myvariant { configure.args-append --do-this --do-that } variant_description myvariant This variant does this and that
(which doesn't need quoting of the description).
Secondly, in order to emit the description in port info, I expanded the variant section to show a single variant per line, which makes info a bit longer. Please let me know if you like this, or if we should limit ourselves to showing variant descriptions in "port variants" instead.
I don't know about the code works, but I would like the third untold solution :
variant myvariant { configure.args-append --do-this --do-that description This variant does this and that }
Yves, Yes, good idea. As Kevin also pointed out, it's a bit complicated by the fact that to evaluate this we'd have to execute the variant, which probably isn't good. James.
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
to follow up on my solicitation, based on feedback (and/or lack of other good alternatives), I've decided: (1) to keep the variant description syntax: On May 15, 2007, at 9:09 AM, James Berry wrote:
The syntax I chose was the following:
variant myvariant description "This variant does this and that" { configure.args-append --do-this --do-that }
...
Secondly, in order to emit the description in port info, I expanded the variant section to show a single variant per line, which makes info a bit longer. Please let me know if you like this, or if we should limit ourselves to showing variant descriptions in "port variants" instead.
(2) To move output of variant descriptions from "port info" to "port variants". So "port info" will continue to show which variants you have, but to find out more about them you'll need to do a "port variants" too. If you strongly disagree with any of these actions, please speak up. The code in trunk currently implements what I've described above. James
participants (4)
-
Chris Pickel
-
James Berry
-
Kevin Ballard
-
Yves de Champlain