1 |
On 12 March 2012 22:09, Michał Górny <mgorny@g.o> wrote: |
2 |
|
3 |
>> or as <eapi value="15" />. |
4 |
> |
5 |
> No, definitely not. That's not the XML style. |
6 |
|
7 |
Sure, but these examples are just examples after all. And XML is only |
8 |
being used for an example use case, but there are many more |
9 |
structured formats than XML. |
10 |
|
11 |
Some of us are mostly just worried that the proposals as they stand |
12 |
won't be resilient enough to allow a future that isn't bash. |
13 |
|
14 |
>> Part of the point of all of this is that we shouldn't have to guess |
15 |
>> what future EAPIs will look like. |
16 |
> |
17 |
> I'm just suggesting a way which will support a little more than |
18 |
> bash-based solutions. We could also assume that if a file doesn't match |
19 |
> the regexp at all, it's a unsupported EAPI. |
20 |
|
21 |
I just find a top-down regexp solution dangerously naive, as its |
22 |
infering that the first line that matches the regexp *is* the EAPI |
23 |
requirement field, when depending on the actual format used, that may |
24 |
not be the case. |
25 |
|
26 |
If for example, a format is machine generated, and the EAPI |
27 |
declaration accidentally comes after something that *isnt* an EAPI |
28 |
declaration but by the regexp, LOOKS like one, then the probing |
29 |
mechanism will resolve the WRONG value. |
30 |
|
31 |
And that doesn't strike me as being very resilient. |
32 |
|
33 |
-- |
34 |
Kent |
35 |
|
36 |
perl -e "print substr( \"edrgmaM SPA NOcomil.ic\\@tfrken\", \$_ * 3, |
37 |
3 ) for ( 9,8,0,7,1,6,5,4,3,2 );" |