Re: [gentoo-dev] [PATCH] versionator.eclass: Add tests for parameter counts

2016-07-24 Thread Kent Fredric
On Sun, 24 Jul 2016 12:17:56 +0200 Michał Górny wrote: > So what's the alternative? Design another eclass where ebuilds will > fail just the same because people will ignore the more explicit > requirement just the same as they do ignore the API? Sometimes you don't need a

Re: [gentoo-dev] [PATCH] versionator.eclass: Add tests for parameter counts

2016-07-24 Thread Alexis Ballier
On Sun, 24 Jul 2016 10:17:24 +0200 Chí-Thanh Christopher Nguyễn wrote: > > Then ebuilds will fail just the same > > No. Before, ebuilds would maybe display an upgrading message when > they shouldn't, or vice versa. Now the eclass dies on them. As a side note: die-ing in

Re: [gentoo-dev] [PATCH] versionator.eclass: Add tests for parameter counts

2016-07-24 Thread Chí-Thanh Christopher Nguyễn
Chí-Thanh Christopher Nguyễn schrieb: I don't say it is a correct use of versionator.eclass. I just say it has become (unintentionally) part of the API, and therefore is subject to the rules about changing APIs in eclasses. Actually, after reading those rules[1] again, it would be enough to

Re: [gentoo-dev] [PATCH] versionator.eclass: Add tests for parameter counts

2016-07-24 Thread Ulrich Mueller
> On Sun, 24 Jul 2016, Michał Górny wrote: > There is no such thing as 'unintentional API'. API is what's > described. If you rely on internals, random undefined behaviors > or whatever, it's not a part of the API. Like memcpy(3) direction? Ulrich pgpaBBWxp15uE.pgp Description: PGP

Re: [gentoo-dev] [PATCH] versionator.eclass: Add tests for parameter counts

2016-07-24 Thread Jeroen Roovers
On Sun, 24 Jul 2016 12:17:56 +0200 Michał Górny wrote: > But that's a social problem that could easily solved by more > proactive retirements, and not a good API design point. You need some trained and payed PR people to correct your writings before they go to press or you

Re: [gentoo-dev] [PATCH] versionator.eclass: Add tests for parameter counts

2016-07-24 Thread Chí-Thanh Christopher Nguyễn
Michał Górny schrieb: You are changing the API of versionator.eclass, even if it was unintentional API. There is no such thing as 'unintentional API'. API is what's described. If you rely on internals, random undefined behaviors or whatever, it's not a part of the API. Well there is the API

Re: [gentoo-dev] [PATCH] versionator.eclass: Add tests for parameter counts

2016-07-24 Thread Michał Górny
On Sun, 24 Jul 2016 10:17:24 +0200 Chí-Thanh Christopher Nguyễn wrote: > Michał Górny schrieb: > > So, to summarize we shouldn't fix existing code because people did > > assume accepting invalid parameters was fine. > > You are changing the API of versionator.eclass, even

Re: [gentoo-dev] [PATCH] versionator.eclass: Add tests for parameter counts

2016-07-24 Thread Jason Zaman
On Sun, Jul 24, 2016 at 10:17:24AM +0200, Chí-Thanh Christopher Nguyễn wrote: > Michał Górny schrieb: > > So, to summarize we shouldn't fix existing code because people did > > assume accepting invalid parameters was fine. > > You are changing the API of versionator.eclass, even if it was

Re: [gentoo-dev] [PATCH] versionator.eclass: Add tests for parameter counts

2016-07-24 Thread Chí-Thanh Christopher Nguyễn
Ciaran McCreesh schrieb: On Sun, 24 Jul 2016 10:17:24 +0200 Chí-Thanh Christopher Nguyễn wrote: Then ebuilds will fail just the same No. Before, ebuilds would maybe display an upgrading message when they shouldn't, or vice versa. Now the eclass dies on them. This

Re: [gentoo-dev] [PATCH] versionator.eclass: Add tests for parameter counts

2016-07-24 Thread Ciaran McCreesh
On Sun, 24 Jul 2016 10:17:24 +0200 Chí-Thanh Christopher Nguyễn wrote: > > Then ebuilds will fail just the same > > No. Before, ebuilds would maybe display an upgrading message when > they shouldn't, or vice versa. Now the eclass dies on them. This attitude that invisible

Re: [gentoo-dev] [PATCH] versionator.eclass: Add tests for parameter counts

2016-07-24 Thread Chí-Thanh Christopher Nguyễn
Michał Górny schrieb: So, to summarize we shouldn't fix existing code because people did assume accepting invalid parameters was fine. You are changing the API of versionator.eclass, even if it was unintentional API. Then ebuilds will fail just the same No. Before, ebuilds would maybe

Re: [gentoo-dev] [PATCH] versionator.eclass: Add tests for parameter counts

2016-07-24 Thread Michał Górny
On Sun, 24 Jul 2016 00:17:21 +0200 Chí-Thanh Christopher Nguyễn wrote: > Michał Górny schrieb: > > Ensure that proper number of parameters is passed to each versionator > > function; die otherwise. This prevents the functions from proceeding > > with undefined behavior when

Re: [gentoo-dev] [PATCH] versionator.eclass: Add tests for parameter counts

2016-07-23 Thread Chí-Thanh Christopher Nguyễn
Michał Górny schrieb: Ensure that proper number of parameters is passed to each versionator function; die otherwise. This prevents the functions from proceeding with undefined behavior when mis-called. You are making what versionator.eclass accepts stricter. That it used to work when passed