Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o, konsolebox <konsolebox@×××××.com>
Cc: pms-bugs@g.o
Subject: Re: [gentoo-dev] RFC: Future EAPI version operator changes
Date: Tue, 08 Nov 2016 10:28:52
Message-Id: 37229B21-2C6E-4628-9944-AAED80095FE3@gentoo.org
In Reply to: Re: [gentoo-dev] RFC: Future EAPI version operator changes by konsolebox
1 Dnia 8 listopada 2016 08:09:55 CET, konsolebox <konsolebox@×××××.com> napisał(a):
2 >On Sun, Nov 6, 2016 at 6:52 PM, Michał Górny <mgorny@g.o> wrote:
3 >> Hi, everyone.
4 >>
5 >> Following my previous RFC wrt version operator problems, I'd like to
6 >> start the second part of the discussion: how to improve version
7 >> operators in a Future EAPI?
8 >>
9 >> I've collected various ideas on operator changes on a wiki page [1].
10 >> I've tried to stay open-minded and cover every possibility, even
11 >though
12 >> I doubt some of them would be even considered.
13 >>
14 >> I should warn you that some of the solutions are interlinked to each
15 >> other, and you probably need to look through the whole page first
16 >> before starting to construct an opinion. For example, specific
17 >> solutions to most of the problems depend on whether we enable version
18 >> ranges and in which form.
19 >>
20 >> I think we should start by loosely discussing the various ideas
21 >> on the wiki page. Feel free to also point out any missing ideas
22 >> or remarks that would be useful there.
23 >>
24 >> So, what are your comments?
25 >>
26 >> [1]:https://wiki.gentoo.org/wiki/Future_EAPI/Version_syntax_changes
27 >>
28 >> --
29 >> Best regards,
30 >> Michał Górny
31 >> <http://dev.gentoo.org/~mgorny/>
32 >
33 >I also like the idea of moving the operator as it's more consistent
34 >and opens new doors to other solutions.
35 >
36 >As for the use of operator & and |, they're quite good, but I'd prefer
37 >the use of Gmail's style where expressions placed in () are processed
38 >with AND, and expressions placed inside {} are processed with OR:
39 >
40 >dev-foo/bar[>=1.3&<1.5] dev-foo/bar(>=1.3 <1.5)
41 >dev-foo/bar[>=1.3&<1.5&!=1.4.1] dev-foo/bar(>=1.3 <1.5 !=1.4.1)
42 >dev-foo/bar[<1.1|>=1.5] dev-foo/bar{<1.1 >=1.5}
43 >dev-foo/bar[=1.1*|=1.3*|>=1.5] dev-foo/bar{=1.1* =1.3* >=1.5}
44 >
45 >I find it more readable. The former looks too compressed.
46
47 Two points here:
48
49 1. I really had no idea Gmail has anything like that, and I suspect a lot of developers don't expect things to work that way either. I'm a programmer though, so infix && and || are entirely obvious to me.
50
51 2. I don't think we are going to allow whitespace inside it. Currently dependency specifications can be tokenized on whitespace (except for special handling for groups). Allowing whitespace inside ranges breaks that.
52
53 Furthermore, if we allows whitespace inside ranges, we should probably consider allowing any whitespace in package dependency specifications, to improve readability. This in turn can open a few cans of worms.
54
55 --
56 Best regards,
57 Michał Górny (by phone)

Replies

Subject Author
Re: [gentoo-dev] RFC: Future EAPI version operator changes konsolebox <konsolebox@×××××.com>