From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id QLb/NlbbR2RnaAEASxT56A (envelope-from ) for ; Tue, 25 Apr 2023 15:53:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id OGoENlbbR2QpXAAAG6o9tA (envelope-from ) for ; Tue, 25 Apr 2023 15:53:26 +0200 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 780A51DB08 for ; Tue, 25 Apr 2023 15:53:26 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prJ6G-0004rn-Bl; Tue, 25 Apr 2023 09:52:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1prJ6F-0004rc-Nl for guix-devel@gnu.org; Tue, 25 Apr 2023 09:52:55 -0400 Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1prJ6D-0006cJ-Td for guix-devel@gnu.org; Tue, 25 Apr 2023 09:52:55 -0400 Received: by mail-qk1-x736.google.com with SMTP id af79cd13be357-74dd7f52f18so1626181785a.0 for ; Tue, 25 Apr 2023 06:52:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682430772; x=1685022772; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=IIX6iZUQN2p/rBvPxJYNKclDNPb/vDynUfdKMkIF/Q8=; b=pR4CPJjUWGR104wZs8gu33Wtx7ERWAUIveYBzG4H5/hJH8hdlsGEgtPjoFtsjFWVwC fg5QB7aH4FPAv3fz92bcx/r+sPTZViyoUBL733IzVSZDMz/QGyXQHkQ63NnTVX8KZmrR 9AW9uMKN87G8SpxHYVqgTIE4uWeV5gaP1dWCw/puPr1LQz8PLSqmgwfr3pQ4vd+shqlA 9+seFHAvto5RmQ3zIwe178MbKSUmxmBZIGAMSMni272xOsmi9jbhLR/8kuqvxcVQ631W Z0iVJvo1nv6gcatqyE3DP+FqvXb1XVIhR/Ai1kriSeW1DNbFyMck8aPFcp5sE3Zsu43C 9A8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682430772; x=1685022772; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=IIX6iZUQN2p/rBvPxJYNKclDNPb/vDynUfdKMkIF/Q8=; b=NerilYvx7Vxzq9CbhxRT1aGJhTXbrHVyxMF78dm01Fz/Xzb9sUjF5BCihErWu5jeTW l+YJSTMEVxNVAO5CWGbWiyHOsVkQoj0wy1L5vtnBeE9ScHDoShg3I7KvTBiw6PZtSdRJ 3LFbZDCjzxkqHAgPXR1FUhQyXsZJRSD4+H87HMfhhCcxxEMCaBYD0fqXvNY/ZUqQoZ6n jRO3fL6CsUHtTjRrjcrZY6QgXvp+bHijHlJmu77E+/m4CICR2fCJzwku2NaV9NePrCsd oakxcqgoI/xiSYHs7vPdjgVF+Bt+NKgOirOnK3JLwzm48YEZ0x2t+eggjPOEMGhlAU4y nQDA== X-Gm-Message-State: AAQBX9fWrm7qgSjaS0alskmVwyh81zRDrBif9nGWMv7g3fk9htmHSIY8 xTJlRvC+CfSDC9mJ+i6ooPU= X-Google-Smtp-Source: AKy350aHe2aiS8oLpvCoaKv28ExIwmelUu0fZvMPZ49OAi22Xh7JdDb7OF+JhnyCcULz8q7he4jrVQ== X-Received: by 2002:a05:6214:5195:b0:5ef:512d:2d47 with SMTP id kl21-20020a056214519500b005ef512d2d47mr25821474qvb.19.1682430772645; Tue, 25 Apr 2023 06:52:52 -0700 (PDT) Received: from hurd ([2607:fad8:4:3::1003]) by smtp.gmail.com with ESMTPSA id x16-20020a0ce250000000b005ef6b124d39sm4104285qvl.5.2023.04.25.06.52.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Apr 2023 06:52:51 -0700 (PDT) From: Maxim Cournoyer To: Simon Tournier Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , =?utf-8?Q?Bj=C3=B6rn_H=C3=B6fling?= , guix-devel@gnu.org, Lars-Dominik Braun Subject: Re: Adding content-addressed URLs to https://guix.gnu.org/sources.json References: <20230312220021.22bfff4f@tangletp> <878rfwgbng.fsf@gnu.org> <86lej8y75p.fsf@gmail.com> <87cz3t44hi.fsf_-_@inria.fr> <86pm7sb7vf.fsf@gmail.com> Date: Tue, 25 Apr 2023 09:52:50 -0400 In-Reply-To: <86pm7sb7vf.fsf@gmail.com> (Simon Tournier's message of "Tue, 25 Apr 2023 11:59:00 +0200") Message-ID: <87354oqdal.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::736; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x736.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682430806; a=rsa-sha256; cv=none; b=tLsPF2+7PiD95NsbqnCj5LUkkRekR7+nw1iHv7tzlgYJICQFwUkRDY+0Je2tlOVda3GbBd 4cUgN9sLitWCpldSeW3dRdcOc3pPtrw72LgxFUw43UKoVfSzhZynWO8w4DVvUJ5OdlrB+8 Jl7whw70zzg8x/TCbWDLpnWTX1S/qOISdvSalByr7e5rmG1LgAN+ZUDaMZ4LSW3gA3W2VL PZlRtGYdPVu6KRByJPlJZbaT4g61IKD5yFRAbzEj95HF0LoL9IQk6ZPtd8ZKkEZSfHo8HC blA1mQlvxh9s1J/xSCCLOb/bYmdppKRag7VpjjYHcewKZieY+kBzo5/obGzrWQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=pR4CPJjU; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682430806; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=IIX6iZUQN2p/rBvPxJYNKclDNPb/vDynUfdKMkIF/Q8=; b=CEkYYV6h+8iOV0jcxECC2yYlbBaxydbCiPXflX4ig3S6O3oyqhei4FW52/PGsO4CFenzBl +goLiTSaKSnENn6LhPJLcquoWYZujx7UqsBqy0WH/lr0GYHkGUsRhqhhrIwtmVuc88Tbw+ lJ0W+RLKg7bXoaW87HGAWIgsPtyfPWic8ih4TjwmhGcW5lIYeS9EvCCoPD6Dme1EW5iwN7 LJP8AyZBsBEwcCbqmmavQzE8aGB2MmCPH950E3W0pP7V6NDr1vemoFSLNI90bhcVeVcAMZ nQfImD9Ey4jLiqEiSJhPtXLavI3KVQPYPXbHfmaBZ+atVD7XaQhEnrRu9FHvzA== X-Migadu-Spam-Score: -7.33 X-Spam-Score: -7.33 X-Migadu-Queue-Id: 780A51DB08 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=pR4CPJjU; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-TUID: PBmstt4uXa4u Hi Simon, Simon Tournier writes: [...] > $ guix repl -- build-package-metadata.scm /tmp/ > guix repl: package metadata will be written to '/tmp/' > Backtrace: > > [...] > > In procedure %origin-patches-real: Wrong type argument: #<= name: "ruby-sorbet-runtime-0.5.10610.20230106174520-1fa668010-checkout" ge= xp: # url: "https://github.com/s= orbet/sorbet" commit: "0.5.10610.20230106174520-1fa668010" recursive?: #f> = #= () 7fa67b7f6000>:out> "/gems/sorbet-" #) #)) gnu/packages/ruby.scm:14078:5 7fa67b701c90> guile: #f options= : (#:local-build? #t)> > > > > Somehow, it reveals 3 currently uncovered cases: computed-file appearing > as, > > 1. =E2=80=99origin=E2=80=99 in source field (ruby-sorbet-runtime) > 2. =E2=80=99inputs=E2=80=99 (racket-minimal) > 3. =E2=80=99snippet=E2=80=99 in origin in source field (chromium) > > And I think we should not try to fix these cases on > build-package-metadata.scm side but instead investigate why they are > needed in the first place. > > > The regression in build-package-metadata is introduced by commit > 7405e0c83f8f4eee5c4c40e809a40f2e4407a38c: > > CommitDate: Tue Mar 28 22:22:24 2023 -0400 > Author: Maxim Cournoyer > > gnu: Add ruby-sorbet-runtime. > > * gnu/packages/ruby.scm (ruby-sorbet-runtime): New variable. > (sorbet-version): New variable. > (sorbet-monorepo): New variable. > (make-sorbet-gem-source): New procedure. > > (define (make-sorbet-gem-source gem) > "Return the source of GEM, a sub-directory." > (computed-file > (string-append "ruby-sorbet-" gem "-" sorbet-version "-checkout") > (with-imported-modules (source-module-closure '((guix build utils)= )) > #~(begin > (use-modules (guix build utils)) > (copy-recursively (string-append #$sorbet-monorepo > "/gems/sorbet-" #$gem) > #$output))))) > [...] > > (define-public ruby-sorbet-runtime > (package > (name "ruby-sorbet-runtime") > (version sorbet-version) > (source (make-sorbet-gem-source "runtime")) > > > This pattern appears to me wrong. It should use =E2=80=99snippet=E2=80= =99. And if the > point is to have a meaningful path in /gnu/store, as it is the case with > icecat or linux or emacs-company-box, the current way is > =E2=80=99computed-origin-method=E2=80=99 from (guix packages). > > For =E2=80=99ruby-sorbet-runtime=E2=80=99, the fix seems =E2=80=99compute= d-origin-method=E2=80=99. Per the source, IIRC, 'computed-origin-method' is also considered a hack or workaround around the fact that a snippet can't affect the name of a source. But it's a well established one. That was indeed the rationale here (to have meaningful top level directory names matching the source), which is worth it in my opinion. --=20 Thanks, Maxim