From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2ClhBp7tbGCW1QAAgWs5BA (envelope-from ) for ; Wed, 07 Apr 2021 01:24:14 +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 cMghAJ7tbGChVgAAbx9fmQ (envelope-from ) for ; Tue, 06 Apr 2021 23:24:14 +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 3D2C09489 for ; Wed, 7 Apr 2021 01:24:13 +0200 (CEST) Received: from localhost ([::1]:51756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTv3K-0003on-TV for larch@yhetil.org; Tue, 06 Apr 2021 19:24:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTv3C-0003oR-Oc for bug-guix@gnu.org; Tue, 06 Apr 2021 19:24:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59148) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lTv3C-0007Pz-HV for bug-guix@gnu.org; Tue, 06 Apr 2021 19:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lTv3C-0004Ea-E6 for bug-guix@gnu.org; Tue, 06 Apr 2021 19:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#33848: Store references in SBCL-compiled code are "invisible" Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 06 Apr 2021 23:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33848 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Leo Famulari , Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 33848-submit@debbugs.gnu.org id=B33848.161775140816227 (code B ref 33848); Tue, 06 Apr 2021 23:24:02 +0000 Received: (at 33848) by debbugs.gnu.org; 6 Apr 2021 23:23:28 +0000 Received: from localhost ([127.0.0.1]:42461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lTv2e-0004Df-Cp for submit@debbugs.gnu.org; Tue, 06 Apr 2021 19:23:28 -0400 Received: from world.peace.net ([64.112.178.59]:46890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lTv2V-0004DG-MM for 33848@debbugs.gnu.org; Tue, 06 Apr 2021 19:23:27 -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 1lTv2P-0006ro-FB; Tue, 06 Apr 2021 19:23:13 -0400 From: Mark H Weaver In-Reply-To: References: <87eefu30a4.fsf@gnu.org> <87im56l6es.fsf@yamatai> <87wntm8j18.fsf@ambrevar.xyz> <87a6qil4b1.fsf@yamatai> <87a6qiz5b3.fsf@ambrevar.xyz> <871rbtc3j5.fsf@netris.org> <87r1js9udv.fsf@netris.org> <87sg47vp16.fsf@ambrevar.xyz> <875z139liy.fsf@netris.org> <87ft04sefs.fsf@gnu.org> Date: Tue, 06 Apr 2021 19:21:30 -0400 Message-ID: <87mtubngmi.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pierre Neidhardt , 33848@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617751453; 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: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=qRqVp6BqI2bg5oaHwKsTypXrHpr6P1R3QwzQv7YiUmo=; b=m7E8Vi3O0/tTG55hODmsj5tYbDvyDPqvz+w7C7qpcVFJ1E+ObhUKxZqiTCrxGWRNyRLSSK Fnq0dViHBWYDBoyaZTJZgYDaDSSqYZeirauwIO0T9JpgYUFHAev60VHp6dV/MbrFJTYDvU jI9OUaDbUbLSCkc4c8K+qZ2Z17nZsS8hdhMlNPK2NxedQRGRSDL4PD9coSlUbWX3o16NsP GUIQscx6xtFsz17WFTtT58V3TrFUJMtk2dqtwOg0sJK/GuFUmfxzrFvgZKl+pXGKuZUK+J 3xpj070aRkmMeQHXMJMmq04oilamKwty7QwWQTgz2skf42s4Ja0/CayYpJNgiw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617751453; a=rsa-sha256; cv=none; b=PanG1x4mtbgJH931MHdwGDC6Pzet2NH1T4vChz9AizlgKztMa2BnQQlqiBroMdUXtkEAr1 sUsq7gmNItZjsQmHTmuQJpQHYbNIE3pVyBw8evNx9EC5qjcjN3mhOoWKvo0LCbOucj3Cdw Sylm5y3ti/Chv3vWaYuSTmWMBbZGwnn2LETHRPWoLcMl8MCY8ZEPsCSvz84rDEmP7xjc0w UVxr5IqS5PmsTuVCvv0ko3kW+MXt+4E5msyh9faKOEoGyRaLUswmeIFZMhvMKPXxacMJcA F4TtAwEmjwp/y4uvvYYly8r8ymxopmVnLQ58aZRCGpzxiAVKA189l0nbEuN2oA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.44 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 3D2C09489 X-Spam-Score: -2.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: PPs/xCAnFWCY Hi Leo, Leo Famulari writes: > On Mon, Apr 05, 2021 at 09:45:43PM +0200, Ludovic Court=C3=A8s wrote: >> The GC=E2=80=99s scanner still gets it wrong though. I wonder whether h= aving >> the grafting code more capable than the scanner could lead to bad >> surprises. WDYT? > > I'm going off-topic, but I've wished we had a generic fast string-search > (and replace?) procedure. Guile has several functions to help with this, e.g. 'string-contains', 'string-replace', 'string-replace-substring', and of course the regexp functions. The grafting code can't use these things because (1) we are not searching for a single string, but rather for arbitrary nix hashes, and (2) we can't easily use the regexp functions because there could be NULs present. > The go-build-system has a slow "one byte a time" implementation because > I couldn't figure out how to re-use the code in (guix build grafts): > > https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build/go-build-syste= m.scm?h=3Dv1.2.0#n269 >From a glance, I would think that 'replace-store-references' from (guix build grafts) is directly applicable here. Do you remember what the difficulty was in using it? Alternatively, since you are only searching for a single string to replace, I think you could read the entire file into a single string (e.g. using 'get-string-all' with "ISO-8859-1" encoding) and use 'string-replace-substring'. What do you think? Mark