From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id +Hb+GYvpU2bMGgAAqHPOHw:P1 (envelope-from ) for ; Mon, 27 May 2024 04:01:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id +Hb+GYvpU2bMGgAAqHPOHw (envelope-from ) for ; Mon, 27 May 2024 04:01:47 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=rXmJpdOz; dmarc=none; 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-Seal: i=1; s=key1; d=yhetil.org; t=1716775307; a=rsa-sha256; cv=none; b=nFCKnOVoOtoXzwQJl1AhgzPTO6PnGVtLDb9dQ5aWAPKfYWDqqdvlC25QhGzcxvPjTOYCjU DVIwUPP14GLfNz0ntsoQFHaGzVXm+T6ph06w+aaC/A5o1DrTuRTrvaivufKn92lXwBDbhx ttl1ez3lpM1ebkZHor3Tglmj+avLulUjNyIBonLU8QCQK/2I3BgIFaHPs1keiu+8qF1rrl DHyStcniMeQo0bOiIlzMDDJywWenPBwRuLyHJa/dtdx37NnPnRMqgm6nQb0cTQCUXfI27s 8L+j1spJ7Yk7jRIwBehUYoAGTRQ94Hpk9Znr8Qc6zf2zAhm3a8Mx4naI61RJjw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=rXmJpdOz; dmarc=none; 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=1716775307; 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:in-reply-to:in-reply-to:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=k22om0Jns4KDcQl0yt9RLC2o/iWGfE4Xa+cacHtsfro=; b=meZgB4D+CoECYnuS+HjB9O9tC1xDx0muhhGz2cWgBCEgVOUx1+cxUkuG3IDJQaqYQkhKMn By+T8lDcHILAfUVCHAuUAdURFXZ7CY8n9BRDNIvYrSk3IwlZZPyHejgGLHEttoHw9LWYQG lQhkDZ1pui+cs8Aq+nf2zA0vBe12QNKv0e6MLxYmN8MyyN6DRb3XZnxix2EvnepQ9tzX7L zZhl1k44HvOt8BejF61ACB6zmuaq73O/mCtmXUGC2BEjuN2NqvO9pTnEtrNL8+dJ514Swf RbSWgg3MFpbSaXzVunxtQTrh9SiD5BbRsGLDiYaIvOhiEfC1OyoSwXoj0qHzSg== 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 2D34069253 for ; Mon, 27 May 2024 04:01:47 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBPff-0002Gl-JG; Sun, 26 May 2024 22:01:07 -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 1sBPff-0002GT-2b for guix-devel@gnu.org; Sun, 26 May 2024 22:01:07 -0400 Received: from mail-108-mta184.mxroute.com ([136.175.108.184]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sBPfb-0007qg-PG for guix-devel@gnu.org; Sun, 26 May 2024 22:01:06 -0400 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta184.mxroute.com (ZoneMTA) with ESMTPSA id 18fb7c78891000efce.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Mon, 27 May 2024 02:00:58 +0000 X-Zone-Loop: 84bb1c2137727adce80ffa9a9b5ace07495067ea4e03 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freakingpenguin.com; s=x; h=Content-Type:MIME-Version:Message-ID:Date:CC: In-Reply-To:Subject:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:References:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=k22om0Jns4KDcQl0yt9RLC2o/iWGfE4Xa+cacHtsfro=; b=rXmJpdOztYLY1ewpI1+/bw48/S 8DAPEYTdqkjWI2MqMXtQJfGxseC+xw2L2CKgiaQtBt4YDUX07sEplH4NSSlmgWwoasviununiIRmM +/bFDKCYowsCzP03jl+dRH5p2nrahQWULwh9UtyVq0cAXJ2691YpZPRLjq8+XBz+N4wBBq57jP1pn lvlW4rQht8RvDau0zFb4xcry7tzU8DAD+zBi5rInQ1TufHKvbm47V5h25m5wXvxBON7mbUJ9Owsdz xednuabwWpYHnD/uWnrnpx6iskRifgj/hjrbsdXfGq6yCKUvQwskA3fYmDkXtxkWVC8nL0O4uXn82 zuV7F1mA==; From: Richard Sent To: guix-devel@gnu.org Subject: Re: Improving the speed of guix time-machine for development environments In-Reply-To: 87le63qaho.fsf@freakingpenguin.com CC: richard@freakingpenguin.com Date: Sun, 26 May 2024 22:00:43 -0400 Message-ID: <87cyp8rp2s.fsf@freakingpenguin.com> MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Id: richard@freakingpenguin.com Received-SPF: pass client-ip=136.175.108.184; envelope-from=richard@freakingpenguin.com; helo=mail-108-mta184.mxroute.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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 X-Migadu-Queue-Id: 2D34069253 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -6.34 X-Spam-Score: -6.34 X-TUID: twjiF0gvLvkE Hi Guix! > I think channels listed in channels.scm files should optionally support > using whatever channel version is already in the user's profile, if > present. This would significantly speed up entering development > environments composed of Guix channels. > Unfortunately, *I may be delayed every time I enter the development > environment by several minutes while Guix computes a new derivation > due to an update in %default-channels*. I wound up implementing a proof of concept for this idea here: https://www.freakingpenguin.com/blog/guix-tricks-self-referential-channelsscm-files.html --8<---------------cut here---------------start------------->8--- (define (soft-pin-channel input-channel) "Given @var{channel}, return a new version of channel that uses the current profile's commit of said channel. If the channel is not present, commit is #f." (define (desired-channel? channel) (equal? (channel-name input-channel) (channel-name channel))) (define (profile-commit input-channel) (call/ec (lambda (return) (map (lambda (x) (when (desired-channel? x) (return (channel-commit x)))) (current-channels)) #f))) (channel (inherit input-channel) (commit (profile-commit input-channel)))) --8<---------------cut here---------------end--------------->8--- If people think this is useful, I'm happy to flesh out the idea more and submit a proper patch. In my experience this does improve the development experience when setting up developer tools that rely on custom channels. At least when there's a new Guix commit, I don't have to wait several minutes for a new Guix channel collection to build, but without pinning it to a specific commit. At present I can think of soft-pinning a list of channels by name being useful. I can also see an option to only fetch dependencies of a channel, not the channel itself, being useful. I would definitely appreciate feedback or use cases! :) -- Take it easy, Richard Sent Making my computer weirder one commit at a time.