1 |
On 11/06/2016 02:52 AM, Michał Górny wrote: |
2 |
> Hi, everyone. |
3 |
> |
4 |
> Following my previous RFC wrt version operator problems, I'd like to |
5 |
> start the second part of the discussion: how to improve version |
6 |
> operators in a Future EAPI? |
7 |
> |
8 |
> I've collected various ideas on operator changes on a wiki page [1]. |
9 |
> I've tried to stay open-minded and cover every possibility, even though |
10 |
> I doubt some of them would be even considered. |
11 |
> |
12 |
> I should warn you that some of the solutions are interlinked to each |
13 |
> other, and you probably need to look through the whole page first |
14 |
> before starting to construct an opinion. For example, specific |
15 |
> solutions to most of the problems depend on whether we enable version |
16 |
> ranges and in which form. |
17 |
> |
18 |
> I think we should start by loosely discussing the various ideas |
19 |
> on the wiki page. Feel free to also point out any missing ideas |
20 |
> or remarks that would be useful there. |
21 |
> |
22 |
> So, what are your comments? |
23 |
> |
24 |
> [1]:https://wiki.gentoo.org/wiki/Future_EAPI/Version_syntax_changes |
25 |
> |
26 |
I think it complicates version matching. Of course, matching the correct |
27 |
version is a difficult task in itself. Anything that requires the least |
28 |
necessary change and improves readability and utility the most should |
29 |
get in. I like the idea of version ranges and slot ranges, but it's |
30 |
tough to figure out which form is best for that. |
31 |
|
32 |
Then we have the pesky * that, when used in a version spec, doesn't |
33 |
follow intuition. Unless a package is slotted for each major or |
34 |
major.minor version, there isn't a way currently (that I know of) to |
35 |
express "pull in any version 1.2.x of app-misc/foobar" in a single |
36 |
declaration/line. |
37 |
|
38 |
In an attempt at a solution: we already use [] for USE, and () are for |
39 |
groupings. If bash doesn't yell at us much, maybe {} would be good for |
40 |
version restrictions. Maybe something like: |
41 |
|
42 |
>=app-misc/foobar-{1.2..1.4}:=[baz] |
43 |
|
44 |
To mean "any version of 1.2 or greater, up to version 1.4, inclusive". |
45 |
We could add in asterisk support to match any sub versions, e.g. |
46 |
{1.2*..1.4}, but it could get really messy. |
47 |
|
48 |
While the initial proposal to put the operator in a better place seems |
49 |
nice on paper, I can only think of the massive amount of work that'd |
50 |
need to be done to get that change pushed through and re-educate fellow |
51 |
devs on how to do things going forward. Maybe we should go through some |
52 |
particularly tricky ebuilds and "try out" the new ideas, to see what the |
53 |
final product looks like. |
54 |
-- |
55 |
Daniel Campbell - Gentoo Developer |
56 |
OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net |
57 |
fpr: AE03 9064 AE00 053C 270C 1DE4 6F7A 9091 1EA0 55D6 |