From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3BEF913832E for ; Sun, 24 Jul 2016 10:18:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3B608E0B2C; Sun, 24 Jul 2016 10:18:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 40262E0A6C for ; Sun, 24 Jul 2016 10:18:12 +0000 (UTC) Received: from pomiot (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 70A96340BE3; Sun, 24 Jul 2016 10:18:10 +0000 (UTC) Date: Sun, 24 Jul 2016 12:17:56 +0200 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: =?UTF-8?B?Q2jDrS1UaGFuaA==?= Christopher =?UTF-8?B?Tmd1eeG7hW4=?= Cc: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH] versionator.eclass: Add tests for parameter counts Message-ID: <20160724121756.1ccc7276.mgorny@gentoo.org> In-Reply-To: <57947994.9030000@gentoo.org> References: <20160723132714.2110-1-mgorny@gentoo.org> <5793ECF1.7090204@gentoo.org> <20160724094903.6135a0be.mgorny@gentoo.org> <57947994.9030000@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/wrSD7Xa0hZRUk1Bo7HI2Beq"; protocol="application/pgp-signature" X-Archives-Salt: 34c4e067-2478-40f3-ad15-43eff5b36cd4 X-Archives-Hash: 9f4c53bbcd31073fe5b416bc2ca973e7 --Sig_/wrSD7Xa0hZRUk1Bo7HI2Beq Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, 24 Jul 2016 10:17:24 +0200 Ch=C3=AD-Thanh Christopher Nguy=E1=BB=85n wrote: > Micha=C5=82 G=C3=B3rny schrieb: > > So, to summarize we shouldn't fix existing code because people did > > assume accepting invalid parameters was fine. =20 >=20 > You are changing the API of versionator.eclass, even if it was unintentio= nal 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. Yes, I know that most of Gentoo developers are bright enough to assume 'if it is not explicitly forbidden in words I can't find a way to bend to pretend it's allowed anyway, it's allowed even if it doesn't make any sense'. But that's a social problem that could easily solved by more proactive retirements, and not a good API design point. > > Then ebuilds will fail just the same =20 >=20 > No. Before, ebuilds would maybe display an upgrading message when they=20 > shouldn't, or vice versa. Now the eclass dies on them. 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? The problem is not 'there is a valid case to pass useless parameters to the function'. The problem is 'I make an invalid assumption about what will happen based on my limited knowledge which I believe is more correct than people who wrote package managers'. --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/wrSD7Xa0hZRUk1Bo7HI2Beq Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJXlJXUXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2REJCMDdDQzRGMERBRDA2RUEwQUZFNDFC MDdBMUFFQUVGQjQ0NjRFAAoJELB6GurvtEZOs8AQANyQD578KwK+B/RWP4CdFSMw ssVuCbDNY3P2ieTcHn7PFOGm7hFNNgIMZ4gRPFR36lar0Z6qw1cQ+oPyf3biFsQS ngnyuUv4EWPMrl6omSJqHo2Z2QiAfP6LjZQoZ2F+mbxqfT2rk3WhBWy2YDUgpUXK PfeBi6h3Q5OFUYpFLDeu+bAFgrJOpSl0oU5Xt6n6lhZ+DcU7hs9HZ10SaVwEb7GP 7sjjohj2ChFvJoDK7XwgrKDeAbXwBZULVt9n0BOP+xKGuRILjwRe7Y/ZrdGrPRm/ IL0FUyFoshrCTO/a3oiRVvmzfTYTtpWfLmGkfdWAuy3ganiq52GOym8IpfbNnMxQ qcZURqq9Y/fGBHSXmc6ZbAO2fSHryBW84HRABzv1Gcj5e62QKigeKLkfC6zOLaU6 +QBAgDjDug7fdyT2hbqnKzFbrsIzZZ1to2l4Ipi/7EvyUoR6LTJb5WiYIGoyraz6 Zl4pDWX0t9Fnr6aKlhW/ReYFaaULuLMuppQaNmvHJXa2YJhLCxL7wI+44i2pYJgD yt2ZcDoXiqPkSjeUc+K/jZeKmmru0K330d3OEgw9A1F0KR7etXsL6/qiZWWaNjr0 +oKeB4UGHSg4/0obrJJupKoBTIvT3lg5gEvzhAi3W3V1r7iktVDoSRZTcNAuK8S6 3rJ7pKeiXviSkNOcUfPZ =PEuz -----END PGP SIGNATURE----- --Sig_/wrSD7Xa0hZRUk1Bo7HI2Beq--