From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 8M9EFLKrSGQEWwAASxT56A (envelope-from ) for ; Wed, 26 Apr 2023 06:42:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 0FZmE7KrSGQgrQAAG6o9tA (envelope-from ) for ; Wed, 26 Apr 2023 06:42:26 +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 02EA72CEAF for ; Wed, 26 Apr 2023 06:42:26 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prWyk-0005CS-Bi; Wed, 26 Apr 2023 00:42:06 -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 1prWyg-0005Bt-PL for guix-patches@gnu.org; Wed, 26 Apr 2023 00:42:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1prWyg-00068d-H1 for guix-patches@gnu.org; Wed, 26 Apr 2023 00:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1prWyg-0007ns-0K for guix-patches@gnu.org; Wed, 26 Apr 2023 00:42:02 -0400 Subject: bug#57280: [PATCH 0/3] Add documentation-files argument to emacs build system. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Wed, 26 Apr 2023 04:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 57280 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler Cc: 57280-done@debbugs.gnu.org Mail-Followup-To: 57280@debbugs.gnu.org, andrew@trop.in, andrew@trop.in Received: via spool by 57280-done@debbugs.gnu.org id=D57280.168248406829909 (code D ref 57280); Wed, 26 Apr 2023 04:42:01 +0000 Received: (at 57280-done) by debbugs.gnu.org; 26 Apr 2023 04:41:08 +0000 Received: from localhost ([127.0.0.1]:53955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prWxo-0007mL-9E for submit@debbugs.gnu.org; Wed, 26 Apr 2023 00:41:08 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:46027) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prWxm-0007lf-LM for 57280-done@debbugs.gnu.org; Wed, 26 Apr 2023 00:41:07 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id EA8D620002; Wed, 26 Apr 2023 04:40:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1682484060; 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=WJzn35PMw0BOeGksgnrB/d55hy8MSNGhuL25EZ22RMM=; b=T7WBnx562lvVpanYv+hEFKIqzItM8PZGKFRu7jiIfq33jpFCJi9Ce+ck6HkpPmG7StXgiC 8z5bxN5tzA69QQw1a7unO2FCfiXpLyaT2I3K7tT4R337UzRMM/MzSxPVNx+rloMThN/2Ze VmrGz8M5jW7Se/mOYsiYgVVxjSy0TsiUAT71x9salLkg4wZ6u8NBdqxQeHSRS6Q0PIWs7a p7Ch8sh/gQk3WPcfBWdYG5OEaN9wqGcmjQ0cQgbvLVjFa5r2aI+n9e0uYsBOY/n/PwuCTh 3096ETZerqnLMflIb3F9ftXQS5KWKWAgCB90o4LKyMzfl7MLpRSyP7sWTUwwDw== From: Andrew Tropin In-Reply-To: References: <87v8q8u54p.fsf@trop.in> <64cd6f7171047bfe95ba9621c4616b9288b7dba9.camel@gmail.com> <87czcd3md9.fsf@trop.in> Date: Wed, 26 Apr 2023 08:40:56 +0400 Message-ID: <87ildjdzmv.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682484146; a=rsa-sha256; cv=none; b=tii4uZr6L1LSpWjlJmpgxR5u8RV4FAdd930jOQkVC4CV1FB6dCCEjFayBVjQFlfEUd83Fc rGXby4heN4FJep1TzdNr/Hc2MdSXTk+MnL5DLHtkE4QTeLVhV5acZfEMf654QalZu3QTor Pd1uswji2lFuW6E9wPa4oVTQN2lmSY5VO6sk17O8ZaFnXlASYM+/yaXTxaObeEhBrdqsAy p/Xn9d4Bta5m9Xc7Dze1/yXPtzBz4ToDrHVfmBwEr7jM3YcsReV4E+rJwOB/cBVPnV4ozd v+2ooNGA55NTpFQEdJMgNLJN+59jkSletndFnGATT6QKd5LDZzZwGIW1gEq2Ag== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=T7WBnx56; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682484146; 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:resent-to: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=WJzn35PMw0BOeGksgnrB/d55hy8MSNGhuL25EZ22RMM=; b=CDqTdnX42z8FLCc/RXlFMUBWH5x9bybAm2/EnS1ayCFWhU9JPMq/TwEZkQfUSPqKwEZ60B WfKOmRYHT3T1nXwByHd8Y5sna6copwSgSi9EOjNHTYDRiJPUO6V++ZCpQnZd4SVUPqg6pn d8RY3QkUbV4tsRzVsQYDpWVSJ34U5A+EOJkh5Vl5YsrgvcMVvw2DUCIvTNthL4HKa2qY0v UmVdvBL3KbVtICUIxCmq2ps3Czqbi8Tcw2de6N1l3iHuEa58qqsJDlKNyH1Nn7aaiO0wOQ TmeVe+Xq0PzDLTgt4yzx0/DwlkwtfehPs03HP0s8LBT8Q08OAnE3wSlX04ztnQ== X-Migadu-Spam-Score: -3.21 X-Spam-Score: -3.21 X-Migadu-Queue-Id: 02EA72CEAF X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=T7WBnx56; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-TUID: DlWY5CD4dX7E --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-09-02 16:52, Liliana Marie Prikler wrote: > Hi, > > Am Freitag, dem 02.09.2022 um 17:02 +0300 schrieb Andrew Tropin: >> Picked (guix build emacs-utils) for now, it's done to avoid huge >> rebuilds, while testing, later we can move it to (guix build utils). >>=20 >> Also, temporary added pandoc and texinfo to native-inputs for >> emacs-build-system, otherwise I would need to update inputs for >> almost every emacs-* package.=C2=A0 Need to figure out what to do with >> this. > I still don't like that we need pandoc and texinfo as implicit inputs. > There ought to be a better solution than this. > >> >=20 >> > > Attaching the latest version of the documentation-files patch I >> > > have >> > Looking at this patch, perhaps we'd also have to allow customizing >> > command line options.=C2=A0 Also, as for installing, I think this shou= ld >> > be >> > handled by the install phase, which already has includes >> > "^[^/]*\\.info$" and "^doc/.*\\.info$" by default.=C2=A0 Thus, you only >> > need >> > to build documentation before the install phase. >>=20 >> That's right, but in the new iteration (v3) of build-documentation >> phase I use find-root-library-file, which expects to be executed when >> elpa directory is already available, so I can't do it before install >> phase and need to manually install info files. >>=20 >> Also, current build phases order is a little confusing, a lot of >> builds happens after install phase, directly in output directory: >>=20 >> `set-SOURCE-DATE-EPOCH' >> `set-paths' >> `install-locale' >> `unpack' >> `expand-load-path' >> `patch-usr-bin-file' >> `patch-source-shebangs' >> `patch-generated-file-shebangs' >> `check' >> `install' >> `make-autoloads' >> `enable-autoloads-compilation' >> `patch-el-files' >> `ensure-package-description' >> `build' >> `validate-compiled-autoloads' >> `build-documentation' >> `move-doc' >> `patch-shebangs' >> `strip' >> `validate-runpath' >> `validate-documentation-location' >> `delete-info-dir-file' >> `patch-dot-desktop-files' >> `make-dynamic-linker-cache' >> `install-license-files' >> `reset-gzip-timestamps' >> `compress-documentation' >>=20 >> What if instead of install phase we will use create-tmp-lisp-and- >> documentation-directories phase (or something >> more meaningful) to make a temporary directory, where we will build >> all the stuff and after that, at the end of the build process will >> install everything from this temporary directory to the store?=C2=A0 This >> way emacs-build-system will become more usual and easier to >> understand andpredict. > I don't think we would need to do staged installations. As for why we > don't build in the temporary directory, I do not know, I merely > inherited that code. > >> +(define* (build-documentation-texinfo >> + #:key >> + (files '()) >> + (command '("makeinfo" "--no-split"))) >> + "Don't forget to add texinfo into list of inputs for the package." >> + (lambda* (#:key outputs #:allow-other-keys) >> + (for-each (lambda (f) (apply invoke (append command (list f)))) >> files))) > This is hardly specific to emacs, is it? > Also, append is usually a code smell. Can't we (apply invoke > "makeinfo" file options)? > >> +(define* (convert-documentation >> + #:key >> + (mapping '()) >> + (command '("pandoc"))) >> + "Don't forget to add pandoc into list of inputs for the package." >> + (lambda* (#:key outputs #:allow-other-keys) >> + (for-each (lambda (p) (apply invoke >> + (append command >> + (list (car p) "-o" (cdr >> p))))) >> + mapping))) > As above. > >> +(define* (build-documentation-org >> + #:key >> + (files '())) > This one is emacs-specific due to emacs-batch-script and can remain > there. > >> + (add-after 'validate-compiled-autoloads 'move-doc move-doc) >> + (add-before 'move-doc 'build-documentation >> build-documentation))) > I don't think that we'll have to add this phase once we've added the > helpers. And as previously discussed, we'd have to build the > documentation before install. > > Cheers I think we can consider this patch series as an thought experiment. Manually adding documentation build phases works good enough and probably there is no need to do something more generic like this. Closing the ticket without merging. Liliana, thank you for you time! =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmRIq1gACgkQIgjSCVjB 3rDnLA//dEBB23NM2qItvGWzM9FMJ0bFWqeyD9TkMEYL537AFpAMBmQQrVo8EdbQ obWltIzntSsGkjVWTs8HkCecLkTCo9ryjGkkns+FU21YLJE2HdhiPnubiWDM8UY/ HVVsCbol/MtRxWUSqcMkJygcMwlHSc9hZG8zj+7+HUz+gqvQMDnNfc2VKCx0QihX 7VcuUdwsUXgTaRkjUF2xnulFn8QfUEwTPzg9O3FNRJpnwO31eYmztYxnZgJlETEB e9RetJ2Xaw1yaeV10xerSMXsvBLK/zCNVL+fQ///1TbGHEce+ujdb0N138wMOoaO 8lHa7GpVCd5lkuSnN5xGwfM/rm3dfNjVOBQNRs57X2HjAo+5BTVsSzSIgkk0/7np HAYfSHHJCUQyzXN3XELY0Fc7R3R2cds/tenisiArnP8S6VojklhWn/MG5eIY2Wme ARzxyhZ4COx+LglBxToKCI0YZhdPxRrgmkAEDHGfY3qheIqEpjNfacttBVKro8hC f+pXvIFhPku35+XBIV7dsUQU0wP8Oh8XN/QjnA6/kPh82tzl41g7ABE4iW5Ja44a BMyLb/vVQwleLyuBtY2HQbrRDyOGHmojzZ8e2nessPRl/G5lpdRWXA/MC1rxwbv6 fTD7GM4L6QWcy5iNyClUIdhn7toajzC/MS9gsFnnjssRUIRO83I= =jfIL -----END PGP SIGNATURE----- --=-=-=--