From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KHWkE84cKGPvZAEAbAwnHQ (envelope-from ) for ; Mon, 19 Sep 2022 09:39:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mJmNE84cKGMJKQEAauVa8A (envelope-from ) for ; Mon, 19 Sep 2022 09:39:58 +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 8A5602CF05 for ; Mon, 19 Sep 2022 09:39:57 +0200 (CEST) Received: from localhost ([::1]:45478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaBNk-0006T6-My for larch@yhetil.org; Mon, 19 Sep 2022 03:39:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaBIj-0005L2-2F for help-guix@gnu.org; Mon, 19 Sep 2022 03:34:45 -0400 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21116) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaBIh-0001uI-5j for help-guix@gnu.org; Mon, 19 Sep 2022 03:34:44 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1663572868; cv=none; d=zohomail.com; s=zohoarc; b=av+VMI1h5DjK4KHqDDmDlrKTtvq9PNpJXlI+4nMx3JCXRKBeUAoTOq2gZ8AjF03Pcr3SQhhaIzl6te4BPu2brISd8ibF84sYFwQUBydjUZIsKH9X3IhM10Gn4wA4jmxVUA9WL+wqeciUMTXXG/ymYXrpciNPU/83PkvACYMsNdk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663572868; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=HHa4yEnyWdMtC8Zv7zDUhGXEngyBWg6IIwSaEpZqlBs=; b=Wg3Iriqx5GdYGut7nzMH4dJbOWwfvRZb85HYJz7RdhWBjniwV3BlMRAlDomO6veoRlBlLb/U72XhF5Cv9QTovNQA77O8e03TKcLTtDT0O/ZcDxFDl33cHyx9ojc4rh69DwJzjJlfydY0aTo1MzM0JPV5Wv1nJKDv6NzQRiopUP8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1663572868; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=HHa4yEnyWdMtC8Zv7zDUhGXEngyBWg6IIwSaEpZqlBs=; b=iOUxqxd7HIP/my0IVRkha/cx3E8oUWYm4IQz3Te62mdaVjQ4MpEEDz1pKJhQjPaR +bNdD+FNgDowKZqhU57gOSAN4GgnOUJp5R27Vik0vaLpsn45O2kEO0t3OwTGtvCG7Gj jjC72ie4SQwE3XtFGaYT881o1GUt/7o0lDyh07oI= Received: from localhost (247-109-142-46.pool.kielnet.net [46.142.109.247]) by mx.zohomail.com with SMTPS id 1663572866759610.7188721272418; Mon, 19 Sep 2022 00:34:26 -0700 (PDT) References: <20220917110336.GB18579@dismail.de> <87sfkpj0y5.fsf@elephly.net> <20220918095836.GF24593@dismail.de> User-agent: mu4e 1.8.7; emacs 28.1 From: Ricardo Wurmus To: jgart Cc: help-guix@gnu.org Subject: Re: Why is the scheme record needed? Date: Mon, 19 Sep 2022 09:27:35 +0200 In-reply-to: <20220918095836.GF24593@dismail.de> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Message-ID: <877d1zizr4.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.51; envelope-from=rekado@elephly.net; helo=sender4-of-o51.zoho.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663573198; 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=HHa4yEnyWdMtC8Zv7zDUhGXEngyBWg6IIwSaEpZqlBs=; b=dEmF9LZ2BYgAcf4xybdxD9tiqSEUvc/xqQ95NGgojU467g+X4EekqQv3zHi+xhkGh8LPPa uHRMXpI02d+gtqcBFqlTakVFi8uzaXZeo04Bg9t4hzx5xv+6LiLwmzqmZiB/n6V4E/THu5 2YKapdGT6eRuzh/DVKLnG23ajpyr0ioZcnbxT7QHbvzrK4FDYU5L4R7I6+0iJM0kGnXYTt 9WDaLnmlOdDHR3VtNfcDf+9WrNlQ2+qfMhzLAsV1/oIRb8/7vgoB41ofQlG8pjVKfy9dIX enKAh2vsKzCb70euooZTKLvRwVDfasqFCGumu//pClGvcquwJnWgqBZqBEhqRg== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1663573198; a=rsa-sha256; cv=pass; b=e78OkD5aKXiVnZpzTw9uSXQzziTtZNSQM0Mv4ZcTntZJ5/TMAIgMBMoyYMLUjUmLMerjM+ 5b52HkFNag3iD42Alz7TXy5yz4/buBD01lxFVLLDV4o6fnXasxR215qPhO65Z0Z1N9AIoM s2/3SsKNgwG5nvjtyq2iG8nAKdWUEeOpukOuQNKfoR2r+kdhgR4pIrrbnBUuIkoV9sZZ54 BLQF8lvZc1kUOIa0KLk9eRefJkJqRPFiH1usqpxdkMgbfmc8nniwxF9IpjNmRd02hWrbmn BoW3TYVZ00y16Jmvnq+Ztj3CMRhr4z7IvCgebUZtrCy94F371EEsh5m1BW44tA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=iOUxqxd7; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.34 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=iOUxqxd7; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8A5602CF05 X-Spam-Score: -3.34 X-Migadu-Scanner: scn1.migadu.com X-TUID: H19vKUw7+TCJ jgart writes: >> It is a Scheme representation of a derivation, which also has an on-disk >> representation. > > Why was the scheme representation of a derivation needed? You can search the =E2=80=9Cguix=E2=80=9D directory in the source tree for = =E2=80=9Cderivation-=E2=80=9D to see the many ways that we=E2=80=99re accessing parts of the Scheme representation of derivation files. We=E2=80=99re accessing the expected o= utput location, the list of inputs, we using its fields to build narinfos, etc. The only alternative is to hit the disk every time we want to know something about a derivation and parse the file repeatedly. That would be very unwise. >> Everything that the daemon is asked to build must be compiled to a >> derivation on disk first. From the perspective of the daemon there are >> no first-class packages, only derivations. Much of what Guix as a >> library does is to turn package values into derivation files and >> builders to feed them into the daemon. > > Why are the bags needed? What do the bags solve in the system? The manual says: --8<---------------cut here---------------start------------->8--- Under the hood, build systems first compile package objects to =E2=80=9Cbags=E2=80=9D. A =E2=80=9Cbag=E2=80=9D is like a package, but wit= h less ornamentation=E2=80=94in other words, a bag is a lower-level representation of a package, which includes all the inputs of that package, including some that were implicitly added by the build system. This intermediate representation is then compiled to a derivation (*note Derivations::). --8<---------------cut here---------------end--------------->8--- Bags are an implementation detail. --=20 Ricardo