Re: [Module-build-general] A mini-language for dependencies?
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2003-03-07 21:17:29
|
On Thursday, March 6, 2003, at 02:48 AM, sc...@po... wrote:
> On Thu, Mar 06, 2003 at 11:51:12AM +0800, Autrijus Tang wrote:
>> build_requires:
>> Test::More: {}
>> recommends:
>> Acme::ComeFrom:
>> alternate:
>> Acme::ComeWith:
>> version: 0.05
>> reason: "I really likes it"
>> version: 0.02
>
> The 'alternate' syntax feels better handled like so
>
> recommends:
> Text::Bastardize: 0
> Net Transport Agent:
> LWP: 1.25
> Net::FTP: 0.24
>
> ie. what you need it for then those modules which will fulfill the
> need.
> Its simple to read and write.
>
> And then when you need all the extra information (arch, perl, etc...)
> there's an optional rich syntax like you have below.
I'm not sure I'm convinced that YAML is really the best way to write
this information. That's why I suggested the creation of a
mini-language - YAML is a language for creating data structures, not
declarations of dependencies. My sense is that forcing things into
YAML tends to obscure the information.
If it can be done in easy YAML, and still be eminently readable, I'm
all for it. It does make the parsing easier. But I don't think it's
great to use 3-level nesting in the META.yml files, because you lose
the human readability and the ability to use brain-dead parsing on them.
That said, the real work in this task isn't in the parsing, it's in
turning the parse into a real check of the dependencies. So I'm not
sure there's a whole lot to gain by using YAML either. Recall that the
easy cases (modules with completely static dependencies) can just be
expressed using the current YAML declarations, so it's only the messy
cases that will need to use this anyway.
I should be able to post a counter-proposal within the next couple of
days.
-Ken
|