From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aG6xBD/WTmcP8wAA62LTzQ:P1 (envelope-from ) for ; Tue, 03 Dec 2024 09:58:23 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id aG6xBD/WTmcP8wAA62LTzQ (envelope-from ) for ; Tue, 03 Dec 2024 10:58:23 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=XynRHXI7; dkim=fail ("headers rsa verify failed") header.d=xn--no-cja.eu header.s=ds202402 header.b="b G6ZTeY"; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1733219902; 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: 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:dkim-signature; bh=xFmN1rR8dlr2juBSrJ5E5P6oGCpqVcX7eE3JdtzDv9I=; b=FVoIyNaXx469HK45/9+MpZ/LGZEIGJCooMEwlbEXHNP45hR53mUKoTV00KNETGbBuT7j8A 5HlPVw8ZQHRFSreNAiVAcMSk0yowz9GJH5r6vx8IqJwDa4nOljtzjLC+MExJEhDv/pAgqm wJTJAcXK0VL8IkXJk6XuxVf0iZtUh8cglH00GrEqqK4HREpzLsjmdvHKDQ7JZWYC9YTSBf 1XVTG/rVB9suHUDksRT/5Vg/W01EXibvpURa+v/IIH7+4LiUFTjLbRV2wsbZfjcup4diXa RjPMqoeR1sq69EiU1IQAoR1+DWlQleKg7mdwSE+2s1XLxrn13D9H3lvLQxDX4w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=XynRHXI7; dkim=fail ("headers rsa verify failed") header.d=xn--no-cja.eu header.s=ds202402 header.b="b G6ZTeY"; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1733219902; a=rsa-sha256; cv=none; b=llXKSCYq2oSodD9j8bsMGAvYkff9+tbVoP2p09ZpYcm8OQjEIrF1y5PGUJhRF8HeZPeYDZ qq87brQxmD+7lSOhs2coWbk5OGwyxjymq+2ZO3d7dSGy6TUYsM3Kc40jFh6bHHEbXVO/yl IWzbtgopMK0FsTeWJBErXYkw5OtrDaNkaWskbiNLJnQ1pu45b9l7XRV7jTfLIjaTomwoQC tF+JmB5ReYFD37NKpa7FfApSndMmbXidI9Nm27T5p2xI8lYW6CtEewLdCvmM82+nga9G28 qFzeerF3xMittCkVFJn20UKp1Slug3tVCPRuqQBU30Bq3Vk2DZtxyad6Ag5UXg== 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 99A927A2AB for ; Tue, 03 Dec 2024 10:58:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIPfS-00072c-60; Tue, 03 Dec 2024 04:58:06 -0500 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 1tIPfO-000728-Qm for bug-guix@gnu.org; Tue, 03 Dec 2024 04:58:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIPfO-0006pM-I5 for bug-guix@gnu.org; Tue, 03 Dec 2024 04:58:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=xFmN1rR8dlr2juBSrJ5E5P6oGCpqVcX7eE3JdtzDv9I=; b=XynRHXI7gPJWf8p4KCaq5ZOsLG6HImhO0C8YOzuFlACbtwpWzrXoaAErlgdTMx332i+N/oxrSGgnLkifOjTp8YajZoImxo2slo4hRWT+N1bUBBELkPak4G1yqS1r6nHshV2T/CyUavcs98mU8tdM3ENLk0wXDE9Qtd3FaY5kvgOOwTHj7DJeQlqqrRfURZo4AMlrEdPuJMRoEujXnQge9c2adk4iSOClcY64963fBxbmrrgkUHy4ZHIH7mSyKMhG6uOixRfcGLTbhrwrEKSbg3SqaxqKxcDqRsiWK8wi6tlvGe+3csS9zIBUkoDlcnmhzglpIDrB3tG5wWaPF1vOlQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tIPfO-0004Wk-3C for bug-guix@gnu.org; Tue, 03 Dec 2024 04:58:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#74656: [wip-zig-bootstrap] zig cache is not updated for dependencies of dependencies Resent-From: =?UTF-8?Q?No=C3=A9?= Lopez Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 03 Dec 2024 09:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74656 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Hilton Chain Cc: Ekaitz Zarraga , 74656@debbugs.gnu.org Received: via spool by 74656-submit@debbugs.gnu.org id=B74656.173321984017334 (code B ref 74656); Tue, 03 Dec 2024 09:58:02 +0000 Received: (at 74656) by debbugs.gnu.org; 3 Dec 2024 09:57:20 +0000 Received: from localhost ([127.0.0.1]:58337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIPeh-0004VW-N3 for submit@debbugs.gnu.org; Tue, 03 Dec 2024 04:57:20 -0500 Received: from smtp.domeneshop.no ([194.63.252.55]:43357) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIPee-0004VA-Dz for 74656@debbugs.gnu.org; Tue, 03 Dec 2024 04:57:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xn--no-cja.eu; s=ds202402; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=xFmN1rR8dlr2juBSrJ5E5P6oGCpqVcX7eE3JdtzDv9I=; b=b G6ZTeYu27KazsZO6GS+2COlWPx9DQm3IwRJhqsoSZEbS/hx0OdD8OVIk5WscRMn4O/lZPu4kv5sh3 kB1UBDAuJAm0kte4CLz6CSTl3VfmjxdbeJ3x0I3TpPLjIPbbRfMz7ZGn4okxxoWdLmZIX2soczMUk 0B0Gx6wC0yOj/WRosgcxLSGhkcOID9uS+bIieFJMiRVrWIIfu2KGPktOkxZsFywyOjEAS4T18GxhA EzwnOpXP3oTxSb0m6iMZuwxIIDRqOKKt2K3pcdiMtzeWWn14M8ws3Q+dlxEu14qfRFTBi3g6DhuEq 2AMRDujIaQ/MyT6mspqgM9AXkSAg+jryg==; Received: from smtp by smtp.domeneshop.no with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) id 1tIPcR-004JRz-Cs; Tue, 03 Dec 2024 10:54:59 +0100 In-Reply-To: <875xo11tr6.wl-hako@ultrarare.space> References: <87ed2p7pmn.fsf@xn--no-cja.eu> <875xo11tr6.wl-hako@ultrarare.space> Date: Tue, 03 Dec 2024 10:56:13 +0100 Message-ID: <87zfldxf7m.fsf@xn--no-cja.eu> 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: , Reply-to: =?UTF-8?Q?No=C3=A9?= Lopez From: =?UTF-8?Q?No=C3=A9?= Lopez via Bug reports for GNU Guix Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -2.65 X-Spam-Score: -2.65 X-Migadu-Queue-Id: 99A927A2AB X-TUID: iWWwl8GXXyoO Hi, Its working well with your changes, do you plan on keeping the snippet syntax for every package? It seems like a lot of boilerplate. Personally I like the #:zig-inputs syntax better, why not keep it and do the snippet in zig-build-system ? Thanks, No=C3=A9 Hilton Chain writes: > Hi No=C3=A9, > > On Tue, 03 Dec 2024 05:15:44 +0800, > No=C3=A9 Lopez wrote: >> >> [1 ] >> Hi, >> >> I got my hands on packaging liskvork, a gomoku server. The build fails >> because dependencies of dependencies are not added to the zig cache, and= so >> can=E2=80=99t be found correctly by the zig build system. >> >> I attached a patch that reproduces this, a workaround when reproducing t= he >> steps in a local checkout is to call =E2=80=9Czig fetch=E2=80=9D on the = missing dependencies: >> >> $ zig fetch /gnu/store/j0x1vl6w2vgr3fz60l4jgyx5gx53af61-zig-httpz-0-0.7d= 2ddae/src/zig-httpz-0-0.7d2ddae --save=3Dhttpz >> warning: overwriting existing dependency named 'httpz' >> $ zig build --summary all >> /home/noe/.cache/zig/p/1220476906a8f57d6cbaaaeb05d44a41311a5bb6ca74bb86b= c3aa1467506c241b29b/build.zig.zon:7:20: error: invalid URI: UnexpectedChara= cter >> $ zig fetch /gnu/store/59w4s1g1y4vy4gw3mwn9fjsfcqc5454i-zig-metrics-0-0.= fcf9e94/src/zig-metrics-0-0.fcf9e94 --save=3Dmetrics >> $ zig fetch /gnu/store/izxqkxplp7alrh0n3c8j8cv277nqa04a-zig-websocket-0-= 0.cf89cb8/src/zig-websocket-0-0.cf89cb8 --save=3Dwebsocket >> $ zig build --summary all >> Build Summary: 5/5 steps succeeded >> install success >> +- install liskvork success >> +- zig build-exe liskvork Debug native-native success 3s MaxRSS:276M >> +- options cached >> +- options cached >> >> This has the issue of adding the packages to build.zig.zon, so a better >> solution is required. >> >> I=E2=80=99m attaching the patch with the liskvork package and dependenci= es. The error >> can be reproduced with =E2=80=9C./pre-inst-env guix build liskvork=E2=80= =9D. >> >> Have a nice day, >> No=C3=A9 > > Good example, that's the current limitation of #:zig-inputs, and I'm plan= ning to > remove it. > > Please apply the attached patch onto your change. > > Thanks > diff --git a/gnu/packages/zig-xyz.scm b/gnu/packages/zig-xyz.scm > index 027377fa1b..b98a160e27 100644 > --- a/gnu/packages/zig-xyz.scm > +++ b/gnu/packages/zig-xyz.scm > @@ -186,11 +186,20 @@ (define-public zig-logz > (file-name (git-file-name name version)) > (sha256 > (base32 > - "01xihyvyx3rpv0kvjh6mg1b99d6agq683q4iyn39nwqb6ma0i0sz"= )))) > + "01xihyvyx3rpv0kvjh6mg1b99d6agq683q4iyn39nwqb6ma0i0sz"= )) > + (modules '((guix build utils))) > + (snippet > + #~(for-each > + (lambda (dep) > + (substitute* "build.zig" > + (((string-append "(b\\.dependency.\")" (car dep)= ) _ prefix) > + (string-append prefix (cdr dep)))) > + (substitute* "build.zig.zon" > + (((string-append "\\." (car dep))) > + (format #f ".@\"~a\"" (cdr dep))))) > + '(("metrics" . "zig-metrics")))))) > (build-system zig-build-system) > - (arguments > - (list > - #:zig-inputs `(("metrics" ,zig-metrics)))) > + (propagated-inputs (list zig-metrics)) > (home-page "https://github.com/karlseguin/log.zig") > (synopsis "Structured Logging for Zig") > (description "logz is an opinionated structured logger that output= s to stdout, > @@ -265,12 +274,21 @@ (define-public zig-httpz > (file-name (git-file-name name version)) > (sha256 > (base32 > - "02hixvyx1r04lg0nzvhkyrqwcwm8m8rs8hm01n2nzw6jv935frh8"))= )) > + "02hixvyx1r04lg0nzvhkyrqwcwm8m8rs8hm01n2nzw6jv935frh8")) > + (modules '((guix build utils))) > + (snippet > + #~(for-each > + (lambda (dep) > + (substitute* "build.zig" > + (((string-append "(b\\.dependency.\")" (car dep)) = _ prefix) > + (string-append prefix (cdr dep)))) > + (substitute* "build.zig.zon" > + (((string-append "\\." (car dep))) > + (format #f ".@\"~a\"" (cdr dep))))) > + '(("metrics" . "zig-metrics") > + ("websocket" . "zig-websocket")))))) > (build-system zig-build-system) > - (arguments > - (list #:zig-inputs > - `(("metrics" ,zig-metrics) > - ("websocket" ,zig-websocket)))) > + (propagated-inputs (list zig-metrics zig-websocket)) > (home-page "https://github.com/karlseguin/http.zig") > (synopsis "HTTP/1.1 server for Zig") > (description "") > @@ -288,16 +306,26 @@ (define-public liskvork > (file-name (git-file-name name version)) > (sha256 > (base32 > - "1x7cif9wpaq7mk1pqmixq3flymrradb6zpx5qnmiihw699zr2xhw"))= )) > + "1x7cif9wpaq7mk1pqmixq3flymrradb6zpx5qnmiihw699zr2xhw")) > + (modules '((guix build utils))) > + (snippet > + #~(for-each > + (lambda (dep) > + (substitute* "build.zig" > + (((string-append "(b\\.dependency.\")" (car dep)) = _ prefix) > + (string-append prefix (cdr dep)))) > + (substitute* "build.zig.zon" > + (((string-append "\\." (car dep))) > + (format #f ".@\"~a\"" (cdr dep))))) > + '(("ini" . "zig-ini") > + ("logz" . "zig-logz") > + ("zul" . "zig-zul") > + ("httpz" . "zig-httpz")))))) > (build-system zig-build-system) > (arguments > (list #:install-source? #f > - #:zig-release-type "safe" > - #:zig-inputs > - `(("ini" ,zig-ini) > - ("logz" ,zig-logz) > - ("zul" ,zig-zul) > - ("httpz" ,zig-httpz)))) > + #:zig-release-type "safe")) > + (inputs (list zig-httpz zig-ini zig-logz zig-zul)) > (home-page "https://liskvork.org") > (synopsis "Modern multi-platform gomoku game server.") > (description "liskvork is a modern Gomoku game server that is purpos= e-built for