From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YIp7A/HdVGGgBgAAgWs5BA (envelope-from ) for ; Wed, 29 Sep 2021 23:43:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id +KeYOvDdVGENfQAAbx9fmQ (envelope-from ) for ; Wed, 29 Sep 2021 21:43:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8D242D17C for ; Wed, 29 Sep 2021 23:43:12 +0200 (CEST) Received: from localhost ([::1]:59934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVhM6-0005Gn-NG for larch@yhetil.org; Wed, 29 Sep 2021 17:43:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVhLy-0005Gb-QF for guix-patches@gnu.org; Wed, 29 Sep 2021 17:43:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38967) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVhLy-000401-Ia for guix-patches@gnu.org; Wed, 29 Sep 2021 17:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mVhLy-000846-GX for guix-patches@gnu.org; Wed, 29 Sep 2021 17:43:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50620] [PATCH 1/2] guix: packages: Document 'computed-origin-method'. Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 29 Sep 2021 21:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50620 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun , Liliana Marie Prikler Cc: 50620@debbugs.gnu.org Received: via spool by 50620-submit@debbugs.gnu.org id=B50620.163295175930972 (code B ref 50620); Wed, 29 Sep 2021 21:43:02 +0000 Received: (at 50620) by debbugs.gnu.org; 29 Sep 2021 21:42:39 +0000 Received: from localhost ([127.0.0.1]:50513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVhLb-00083T-BC for submit@debbugs.gnu.org; Wed, 29 Sep 2021 17:42:39 -0400 Received: from world.peace.net ([64.112.178.59]:53308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVhLY-00083G-OM for 50620@debbugs.gnu.org; Wed, 29 Sep 2021 17:42:37 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mVhLC-0001hi-CM; Wed, 29 Sep 2021 17:42:14 -0400 From: Mark H Weaver In-Reply-To: References: <20210916114734.2686426-1-zimon.toutoune@gmail.com> <9b6ee27ff10e1042a5d61d0f93d957cf760e9ecb.camel@gmail.com> <87v930ay5y.fsf@netris.org> <87pmstghx0.fsf@netris.org> <1803ff0456849f456c6994d47cbe50d1a8ff6a09.camel@gmail.com> <56dcce10a751153d89f515028cd18c9125f6b84f.camel@gmail.com> <756ae01852047a7adc2522c025c8cd7283dc7e55.camel@gmail.com> Date: Wed, 29 Sep 2021 17:40:39 -0400 Message-ID: <87ee97givh.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632951792; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=GUB9p9GAz4NS4+lhTrqgY+N/KewbOajCM1FkszadkIg=; b=rbvJJUVfhSfCoJS8MYmd46jCAPAAVU48qA/JgTx0rbag+zbecrxjFmiYg/amgqZAC8kR1D HkMowp2Acw9Y1u0NecFpIJpeyUen8qU4RIfB6rYWoEIt0mxZLFFfdCPsdxos8bNa5WaJag k/7ra9Ta5KmSm6HuaN4vS25ZOzD1/qSiB4b3WroDafkhcUG9WrGJiYqG/93rDSEaSwmbSF 0+/PhyrhKaQOwuSuwM0+60sZg2lFMJrF9tUOep5jRq6SeNQz4NxOP2mhXMqfxiWIpU5B2D FZQ7Z2gzWsc8mCOwFWQe8mo9vm+YM6NIyvEuaBxJzNdnGQ7VgOfARYLxlFyP3Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632951792; a=rsa-sha256; cv=none; b=av1NOCB1s3BUwQg3BemTiDAasFoRr1jZRh96Envt8QzoPYxDybIoeBuLYedouttZri7z59 8jrbC3Et7qNypGCQicSRWEVnD/XnhEbVdK78/xNYUMJQBm0pZn8x2YQDw/vnGORjpx8maK 8jfuYihlPgpo7gsbfvxDI0gkp0DMqidzNBClnaLtRqXd/tCQlSPoz+cFjX38sMFPFtNq6e PP8Fd7kB+BYB8gypcMUMpAoiWUzHJ9UBa7LV7KDxQ6YUIArOI4PRBAYEYqcM2xc7spBCwS o2EVFnQjyko9VxT8mAdOkMzG3vgMMJwHP3EUPhEeappyIo+Mjs0LCljngC7SSQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.80 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 8D242D17C X-Spam-Score: -2.80 X-Migadu-Scanner: scn1.migadu.com X-TUID: Si9C9f64Kf2g Hi Simon, zimoun writes: > On Wed, 29 Sept 2021 at 16:36, Liliana Marie Prikler > wrote: > >> > Perhaps I am wrong about option (2) -- my claim is that >> > computed-origin-method is *always* used with a promise so it is for >> > sure an half-baked guess but enough; and it avoids to hard code the >> > modules from where the packages come from. Therefore, option (2) >> > does not improve, IMHO. >> >> The probability of having a promise when using computed-origin-method >> is 100%. What is the probability of having computed-origin-method when >> you see a promise? The answer is: we don't know. We can see from the > > You mean, what is the probability of having a computed-origin-method > when the origin-uri is a promise? We do not know, but pragmatically, > for now 100%. :-) To my mind, that's not good enough. I consider it unsafe, and poor programming practice, to force a promise without first knowing what that promise represents and what are the implications of forcing it. In projects as large as Guix, if it becomes accepted practice to introduce lots of assumptions scattered around the code that are "for now 100%" true, the result is eventually a very brittle project where it's difficult to make changes without random stuff breaking. > Option (2) is: > > ___ (or (eq? method (@@ (gnu packages gnuzilla) computed-origin-method)) > _______ (eq? method (@@ (gnu packages linux) computed-origin-method))) > > then I ask you similarly: what is the probability of having packages > using computed-origin-method in these 2 modules only? We do not know, > but pragmatically, for now 100%. :-) The potential failure mode here is far less bad. In this case, if someone else makes another clone of 'computed-origin-method' in another module and forgets to update this code, the worst case is that some source code fails to be added to SWH. Incidentally, I guess that's the same outcome that would happen if someone adds a brand new 'origin-method' and forgets to update this code. Incidentally, I have a suggestion for how to avoid that failure mode properly, once and for all: issue a warning if we're unable to identify the 'method' of the origin at hand, calling attention to the fact that there's an unhandled case in this code. This is precisely analogous to Standard ML's *very* useful feature of issuing warnings at compile time in case of an non-exhaustive 'match' form. What do you think? In any case, thanks very much for your efforts to push this issue toward resolution. Regards, Mark -- Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about .