Message ID | 20231102151725.31362-1-ngraves@ngraves.fr |
---|---|
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5883A27BBE2; Thu, 2 Nov 2023 15:19:47 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 96F4527BBE9 for <patchwork@mira.cbaines.net>; Thu, 2 Nov 2023 15:19:42 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1qyZSm-0008Vy-JX; Thu, 02 Nov 2023 11:18:28 -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 <Debian-debbugs@debbugs.gnu.org>) id 1qyZSk-0008VZ-R8 for guix-patches@gnu.org; Thu, 02 Nov 2023 11:18:26 -0400 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 <Debian-debbugs@debbugs.gnu.org>) id 1qyZSk-0003pL-JR for guix-patches@gnu.org; Thu, 02 Nov 2023 11:18:26 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1qyZTJ-0006bL-IF for guix-patches@gnu.org; Thu, 02 Nov 2023 11:19:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42338] [PATCH v5 0/9] Composer build-system References: <20200713002055.1553f136@tachikoma.lepiller.eu> In-Reply-To: <20200713002055.1553f136@tachikoma.lepiller.eu> Resent-From: Nicolas Graves <ngraves@ngraves.fr> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 02 Nov 2023 15:19:01 +0000 Resent-Message-ID: <handler.42338.B42338.169893829125192@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42338 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42338@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 42338-submit@debbugs.gnu.org id=B42338.169893829125192 (code B ref 42338); Thu, 02 Nov 2023 15:19:01 +0000 Received: (at 42338) by debbugs.gnu.org; 2 Nov 2023 15:18:11 +0000 Received: from localhost ([127.0.0.1]:55766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1qyZSU-0006YG-HW for submit@debbugs.gnu.org; Thu, 02 Nov 2023 11:18:10 -0400 Received: from 3.mo582.mail-out.ovh.net ([178.33.253.26]:52565) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ngraves@ngraves.fr>) id 1qyZSS-0006Y6-KD for 42338@debbugs.gnu.org; Thu, 02 Nov 2023 11:18:09 -0400 Received: from director4.ghost.mail-out.ovh.net (unknown [10.109.138.16]) by mo582.mail-out.ovh.net (Postfix) with ESMTP id 6460E28342 for <42338@debbugs.gnu.org>; Thu, 2 Nov 2023 15:17:32 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-z6wpr (unknown [10.110.208.100]) by director4.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 0A0921FE62; Thu, 2 Nov 2023 15:17:31 +0000 (UTC) Received: from ngraves.fr ([37.59.142.108]) by ghost-submission-6684bf9d7b-z6wpr with ESMTPSA id 0KlEOYu9Q2XU2AAAYRCRfQ (envelope-from <ngraves@ngraves.fr>); Thu, 02 Nov 2023 15:17:31 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-108S002cf8ddfa8-4286-460a-bfd5-2bd344a1eaa0, 1761E107A7246F2314AE904A186E6A889A3776EC) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 87.88.157.103 Date: Thu, 2 Nov 2023 16:16:47 +0100 Message-ID: <20231102151725.31362-1-ngraves@ngraves.fr> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 13658291771180901090 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedruddtiedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepkeffgeetfffgffejgeejvdffgfdtvdeuueetgfefuedvjeegvdegjeejveeuueevnecukfhppeduvdejrddtrddtrddupdekjedrkeekrdduheejrddutdefpdefjedrheelrddugedvrddutdeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeegvdeffeekseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkedvpdhmohguvgepshhmthhpohhuth X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Reply-to: Nicolas Graves <ngraves@ngraves.fr> X-ACL-Warn: , Nicolas Graves via Guix-patches <guix-patches@gnu.org> From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
Composer build-system
|
|
Message
Nicolas Graves
Nov. 2, 2023, 3:16 p.m. UTC
This is the result of my further rework of the composer import and build-system. The `guix: import: composer` commits can be squashed easily. This is now tested on 94 php packages with all testing enabled except for 3 packages. I will submit these packages as a whole in the alphabetical order (the bootstrap order is not worth it IMO) in a new guix issue. Before accepting it, I also would like to propose a change of names. If me make an analogy with python: tool: pip <-> composer package hub: pypi <-> packagist build-system: python/pyproject <-> php Since we only take about 90 lines of real composer code, I would rather call the build-system php-build-system. Same thing: instead of `guix import composer` we should rather call `guix import packagist`. If that's OK, I'll change it with the next (and hopefully last!) version of this build system. Nicolas Graves (9): guix: import: Add composer importer. gnu: Add composer-classloader. guix: Add composer-build-system. guix: import: composer: Use memoization. guix: import: composer: Fix json->require. guix: import: composer: More robust string->license. guix: import: composer: Modern inputs formatting. guix: import: composer: Full rewrite composer-fetch. gnu: composer-build-system: Full check phase rewrite. Makefile.am | 6 + doc/guix.texi | 34 +++ gnu/local.mk | 1 + gnu/packages/aux-files/findclass.php | 125 +++++++++++ gnu/packages/php-xyz.scm | 60 ++++++ guix/build-system/composer.scm | 164 +++++++++++++++ guix/build/composer-build-system.scm | 300 +++++++++++++++++++++++++++ guix/import/composer.scm | 267 ++++++++++++++++++++++++ guix/scripts/import.scm | 2 +- guix/scripts/import/composer.scm | 107 ++++++++++ tests/composer.scm | 88 ++++++++ 11 files changed, 1153 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/aux-files/findclass.php create mode 100644 gnu/packages/php-xyz.scm create mode 100644 guix/build-system/composer.scm create mode 100644 guix/build/composer-build-system.scm create mode 100644 guix/import/composer.scm create mode 100644 guix/scripts/import/composer.scm create mode 100644 tests/composer.scm
Comments
Hi, Nicolas Graves <ngraves@ngraves.fr> skribis: > This is the result of my further rework of the composer import and > build-system. The `guix: import: composer` commits can be squashed > easily. > > This is now tested on 94 php packages with all testing enabled except > for 3 packages. I will submit these packages as a whole in the > alphabetical order (the bootstrap order is not worth it IMO) in a new > guix issue. > > Before accepting it, I also would like to propose a change of > names. If me make an analogy with python: > tool: pip <-> composer > package hub: pypi <-> packagist > build-system: python/pyproject <-> php > > Since we only take about 90 lines of real composer code, I would > rather call the build-system php-build-system. > Same thing: instead of `guix import composer` we should rather call > `guix import packagist`. > > If that's OK, I'll change it with the next (and hopefully last!) > version of this build system. > > Nicolas Graves (9): > guix: import: Add composer importer. > gnu: Add composer-classloader. > guix: Add composer-build-system. > guix: import: composer: Use memoization. > guix: import: composer: Fix json->require. > guix: import: composer: More robust string->license. > guix: import: composer: Modern inputs formatting. > guix: import: composer: Full rewrite composer-fetch. > gnu: composer-build-system: Full check phase rewrite. In the interest of moving forward, I pushed this: 6454788a5c build-system/composer: Do not import host-side Guile-JSON modules. 9dab758791 build-system: Add ‘composer-build-system’. e8fd78d54e gnu: Add composer-classloader. b7e3945283 guix: import: Add composer importer. I squashed the importer commits. However, I also add to make way too many fixes to my taste: adding missing #:use-module, fixing unbound variables (guessing…), fixing typos, untangling and build system commit that was fixing things in the importer, fixing ‘tests/composer.scm’ which wouldn’t pass, fixing a case where the importer would return a single value instead of two (breaking recursive imports), and probably others that I forgot. Not great. Could you please take a closer look and see whether anything is amiss at this point? Next, which PHP packages do we add? Julien initially submitted 30ish of them, should we take those? Or are you planning to submit a separate set? It would also be nice if the updater would fill in the ‘inputs’ fields of <upstream-source>: that would allow ‘guix refresh -u’ to automatically update inputs. Thanks in advance! Ludo’.
On 2023-12-18 23:33, Ludovic Courtès wrote: > Hi, > > Nicolas Graves <ngraves@ngraves.fr> skribis: > >> This is the result of my further rework of the composer import and >> build-system. The `guix: import: composer` commits can be squashed >> easily. >> >> This is now tested on 94 php packages with all testing enabled except >> for 3 packages. I will submit these packages as a whole in the >> alphabetical order (the bootstrap order is not worth it IMO) in a new >> guix issue. >> >> Before accepting it, I also would like to propose a change of >> names. If me make an analogy with python: >> tool: pip <-> composer >> package hub: pypi <-> packagist >> build-system: python/pyproject <-> php >> >> Since we only take about 90 lines of real composer code, I would >> rather call the build-system php-build-system. >> Same thing: instead of `guix import composer` we should rather call >> `guix import packagist`. Do you have an opinion on this? I guess now that's in the code, we can keep it as is, but that's sad we didn't get to discuss on this. >> >> If that's OK, I'll change it with the next (and hopefully last!) >> version of this build system. >> >> Nicolas Graves (9): >> guix: import: Add composer importer. >> gnu: Add composer-classloader. >> guix: Add composer-build-system. >> guix: import: composer: Use memoization. >> guix: import: composer: Fix json->require. >> guix: import: composer: More robust string->license. >> guix: import: composer: Modern inputs formatting. >> guix: import: composer: Full rewrite composer-fetch. >> gnu: composer-build-system: Full check phase rewrite. > > In the interest of moving forward, I pushed this: > > 6454788a5c build-system/composer: Do not import host-side Guile-JSON modules. > 9dab758791 build-system: Add ‘composer-build-system’. > e8fd78d54e gnu: Add composer-classloader. > b7e3945283 guix: import: Add composer importer. > > I squashed the importer commits. > > However, I also add to make way too many fixes to my taste: adding > missing #:use-module, fixing unbound variables (guessing…), fixing > typos, untangling and build system commit that was fixing things in the > importer, fixing ‘tests/composer.scm’ which wouldn’t pass, fixing a case > where the importer would return a single value instead of two (breaking > recursive imports), and probably others that I forgot. Not great. > > Could you please take a closer look and see whether anything is amiss at > this point? Not great indeed, seemed to work fine on my end, will take a look. I hope I didn't send a different patch series than intended. > > Next, which PHP packages do we add? Julien initially submitted 30ish of > them, should we take those? Or are you planning to submit a separate > set? I have a set of 94-97 packages, I've sent them in an email to you and Julien (an email from ngraves@ngraves.fr on november 2nd), these should work with this set of commits. Will cut that in commits and submit them quickly. > > It would also be nice if the updater would fill in the ‘inputs’ fields > of <upstream-source>: that would allow ‘guix refresh -u’ to > automatically update inputs. I will first focus on fixes and packages. > > Thanks in advance! > > Ludo’.