From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ANUDBFb31GACbwAAgWs5BA (envelope-from ) for ; Thu, 24 Jun 2021 23:21:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 0i9SO1X31GC6JgAA1q6Kng (envelope-from ) for ; Thu, 24 Jun 2021 21:21:25 +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 2ADBB11E9D for ; Thu, 24 Jun 2021 23:21:25 +0200 (CEST) Received: from localhost ([::1]:47382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwWmp-0007lJ-25 for larch@yhetil.org; Thu, 24 Jun 2021 17:21:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwWmU-0007jq-NB for bug-guix@gnu.org; Thu, 24 Jun 2021 17:21:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60925) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwWmU-0001Ra-Er for bug-guix@gnu.org; Thu, 24 Jun 2021 17:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lwWmU-0005do-94 for bug-guix@gnu.org; Thu, 24 Jun 2021 17:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#49202: guix import go type error (failed regex match?) Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 24 Jun 2021 21:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49202 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: zimoun Cc: 49202@debbugs.gnu.org, raingloom Received: via spool by 49202-submit@debbugs.gnu.org id=B49202.162456960921542 (code B ref 49202); Thu, 24 Jun 2021 21:21:02 +0000 Received: (at 49202) by debbugs.gnu.org; 24 Jun 2021 21:20:09 +0000 Received: from localhost ([127.0.0.1]:44238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwWlc-0005bO-RP for submit@debbugs.gnu.org; Thu, 24 Jun 2021 17:20:09 -0400 Received: from out1.migadu.com ([91.121.223.63]:27304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwWlZ-0005b9-2j for 49202@debbugs.gnu.org; Thu, 24 Jun 2021 17:20:06 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1624569603; h=from:from: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:references:references; bh=CbZ2Dap3+/bTrIvF8Oa/AZN+Xz1H0JylC4OMGQiVJqA=; b=OVooE8O1Tgvx34zM0pP94kF1w18voqDjrliBm320PtE6jahwxMklhj8imnSBoSh+ZyaszP +bMVIZ7tkHbmiJnm6wswaOSi70tlLQS2UEC3eHGsZ6zj12uf9SQzhEfX86YXPvYPyVqnn+ pb9D++biMognq4v01Zmy471mRfX0U4Q= References: <20210624013203.041e526b@riseup.net> <86r1gr70n7.fsf@mgsn.dev> Date: Thu, 24 Jun 2021 14:20:00 -0700 In-Reply-To: <86r1gr70n7.fsf@mgsn.dev> (Sarah Morgensen's message of "Thu, 24 Jun 2021 08:17:16 -0700") Message-ID: <86o8bv6jun.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Auth-User: iskarian@mgsn.dev 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: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" Reply-to: Sarah Morgensen From: Sarah Morgensen via Bug reports for GNU Guix X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624569685; h=from:from:sender:sender:reply-to: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: dkim-signature; bh=CbZ2Dap3+/bTrIvF8Oa/AZN+Xz1H0JylC4OMGQiVJqA=; b=HJnzkyWU58MuVnCNBdj+wb8YjM4iMt2iU6/y0uX9Qbz06GwyvSrjCqiOih/fGulXG31xr/ Hkn70249Fj48ShOzyRlzuHWswm7VD7vECoMVo+ndWDpe/SPjx2owz0QPe+7IYnn9uxnwFc zpnrf2YC692cyBTNBE53MiTzNWOVaj+10/pP8LumVCKv4kNx7EnVak2ufQs0srD0KnMqCq PyCvrfw1ZctuO5UW6x+l4s4i3FgRbkyp2Hi+Me6tDR3YL8SfEy/yZDn9jFyUEqZqI52fSC F1rj0c05SjXe4yewoMZxPyml7ZNifgfduLt8k1f/efx5Pxhlh4FaKCm2GlpKPA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624569685; a=rsa-sha256; cv=none; b=nmkGavkptW7sVwfyVKK8x8vS+Oi+aaRnpYfVh7PS8QFYtDivbOER247BcR4kZ/i8lfags6 uea0IXfxtFEx+EsvIcg081lfzV3ruaISW36aMWKezNS7avm+H3yUauduSaLv0EnPMiTIeN owiqFxf384nbMPA1JL0lEyNvdSQnzGJVRaR+Et9uXqmPvSW/frncohpp8c7TAhJmUaAB/Z CX8fUT2J6Z5aNmIXh3flp4voUd1NijFOe0r8pTjHpdlNDCazUjCdt8friz1TsgKAw9DWJZ reTPaguQeaXIW8lzTCuQ9/pzPTe2mmJYPvX/jac7BwtUd3DNVR/kVv3OBIsTTA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=OVooE8O1; 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.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=OVooE8O1; dmarc=pass (policy=none) header.from=gnu.org; 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: 2ADBB11E9D X-Spam-Score: -2.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: 1ZMDLQIr0CF1 Sarah Morgensen writes: > > // When updating replace rules, make sure to also update the rules in integration/client/go.mod > replace ( > // prevent transitional dependencies due to containerd having a circular > // dependency on itself through plugins. see .empty-mod/go.mod for details > github.com/containerd/containerd => ./.empty-mod/ > github.com/gogo/googleapis => github.com/gogo/googleapis v1.3.2 > // urfave/cli must be <= v1.22.1 due to a regression: https://github.com/urfave/cli/issues/1092 > github.com/urfave/cli => github.com/urfave/cli v1.22.1 > google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63 > ) > > Based on the trace it seems like it's treating the k8s.io/utils require > as a replace directive, but I have no idea why. > Looking at this again, I realize I misread the code: the "k8s.io/utils" etc. is actually the head of the already-parsed requirements list. Instead, when the error is thrown, we are in replace-directive, which is called by in-replace... --8<---------------cut here---------------start------------->8--- (define (in-replace requirements replaced) (let ((line (read-line))) (cond ((eof-object? line) ;; this should never happen here but we ignore silently (values requirements replaced)) ((string=? line ")") ;; end of block, coming back to toplevel (toplevel requirements replaced)) (#t (call-with-values (lambda () (replace-directive requirements replaced line)) in-replace))))) --8<---------------cut here---------------end--------------->8--- ...which does not handle comments. (Even the top-level parser doesn't explicitly handle comments, it just discards any line that does not start with "require" or "replace.") Looks like the parser could use a little more robustness! :) Hope that helps, Sarah