Message ID | 20231219134708.18227-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 6DCFB27BBE9; Tue, 19 Dec 2023 13:48:10 +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 autolearn=unavailable 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 5BE5C27BBE2 for <patchwork@mira.cbaines.net>; Tue, 19 Dec 2023 13:48:09 +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 1rFaS2-00080u-CJ; Tue, 19 Dec 2023 08:48:02 -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 <Debian-debbugs@debbugs.gnu.org>) id 1rFaS0-00080V-Fv for guix-patches@gnu.org; Tue, 19 Dec 2023 08:48:00 -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 <Debian-debbugs@debbugs.gnu.org>) id 1rFaS0-00011U-2V for guix-patches@gnu.org; Tue, 19 Dec 2023 08:48:00 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rFaS2-0000ph-IC for guix-patches@gnu.org; Tue, 19 Dec 2023 08:48:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67902] [PATCH 00/95] PHP package chain. 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: Tue, 19 Dec 2023 13:48:02 +0000 Resent-Message-ID: <handler.67902.B.17029936543023@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67902 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67902@debbugs.gnu.org Cc: ludo@gnu.org, ngraves@ngraves.fr X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17029936543023 (code B ref -1); Tue, 19 Dec 2023 13:48:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Dec 2023 13:47:34 +0000 Received: from localhost ([127.0.0.1]:34663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1rFaRZ-0000mf-GE for submit@debbugs.gnu.org; Tue, 19 Dec 2023 08:47:34 -0500 Received: from lists.gnu.org ([2001:470:142::17]:42922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ngraves@ngraves.fr>) id 1rFaRX-0000mN-DD for submit@debbugs.gnu.org; Tue, 19 Dec 2023 08:47:32 -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 <ngraves@ngraves.fr>) id 1rFaRP-0007vK-AP for guix-patches@gnu.org; Tue, 19 Dec 2023 08:47:23 -0500 Received: from 19.mo561.mail-out.ovh.net ([178.32.98.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ngraves@ngraves.fr>) id 1rFaRN-0000s3-Hl for guix-patches@gnu.org; Tue, 19 Dec 2023 08:47:23 -0500 Received: from director1.ghost.mail-out.ovh.net (unknown [10.109.148.20]) by mo561.mail-out.ovh.net (Postfix) with ESMTP id 98DCC26AC4 for <guix-patches@gnu.org>; Tue, 19 Dec 2023 13:47:16 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-vdtsf (unknown [10.110.178.131]) by director1.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 35D3D1FEAB; Tue, 19 Dec 2023 13:47:16 +0000 (UTC) Received: from ngraves.fr ([37.59.142.110]) by ghost-submission-6684bf9d7b-vdtsf with ESMTPSA id ut0JCeSegWWr0wAAnsNIfA (envelope-from <ngraves@ngraves.fr>); Tue, 19 Dec 2023 13:47:16 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-110S0041353e079-0962-46a3-8a59-10075ece2db7, 0A183DEDD9F7D7733B4F13041BD52F66DC821FED) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.140.142 Date: Tue, 19 Dec 2023 14:42:25 +0100 Message-ID: <20231219134708.18227-1-ngraves@ngraves.fr> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 11449276154230137565 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrvddutddgheeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepkeffgeetfffgffejgeejvdffgfdtvdeuueetgfefuedvjeegvdegjeejveeuueevnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugedtrddugedvpdefjedrheelrddugedvrdduuddtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopehguhhigidqphgrthgthhgvshesghhnuhdrohhrghdpoffvtefjohhsthepmhhoheeiuddpmhhouggvpehsmhhtphhouhht Received-SPF: pass client-ip=178.32.98.231; envelope-from=ngraves@ngraves.fr; helo=19.mo561.mail-out.ovh.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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 |
PHP package chain.
|
|
Message
Nicolas Graves
Dec. 19, 2023, 1:42 p.m. UTC
This patch series introduces a PHP package chain able to build phpunit and test the vast majority of this chain's packages. phpunit is the standard tool to test php packages. Note that this patch series has to be applied as a whole, packages are added in the order from the file, and not in the order required to build a the subset of previous packages. Nicolas Graves (95): gnu: Add abnfgen. gnu: php-xyz: Add copyright and useful modules. gnu: Add php-cache-tag-interop. gnu: Add php-doctrine-collections. gnu: Add php-doctrine-common. gnu: Add php-doctrine-deprecations. gnu: Add php-doctrine-event-manager. gnu: Add php-doctrine-instantiator. gnu: Add php-doctrine-lexer. gnu: Add php-doctrine-persistence. gnu: Add php-dms-phpunit-arraysubset-asserts. gnu: Add php-egulias-email-validator. gnu: Add php-fig-log-test. gnu: Add php-hamcrest-hamcrest-php. gnu: Add php-mockery-mockery. gnu: Add php-myclabs-deep-copy. gnu: Add php-nikic-php-parser. gnu: Add php-phar-io-manifest. gnu: Add php-phar-io-version. gnu: Add php-phpdocumentor-reflection-common. gnu: Add php-phpdocumentor-reflection-docblock. gnu: Add php-phpdocumentor-type-resolver. gnu: Add php-phpspec-prophecy. gnu: Add php-phpstan-phpdoc-parser. gnu: Add php-phpunit-php-code-coverage. gnu: Add php-phpunit-php-file-iterator. gnu: Add php-phpunit-php-invoker. gnu: Add php-phpunit-php-timer. gnu: Add php-phpunit-php-text-template. gnu: Add php-phpunit-php-token-stream. gnu: Add php-predis-predis. gnu: Add php-psr-log. gnu: Add php-psr-cache. gnu: Add php-psr-cache-1. gnu: Add php-psr-container. gnu: Add php-psr-event-dispatcher. gnu: Add php-psr-simple-cache. gnu: Add php-sebastian-cli-parser. gnu: Add php-sebastian-code-unit. gnu: Add php-sebastian-code-unit-reverse-lookup. gnu: Add php-sebastian-comparator. gnu: Add php-sebastian-complexity. gnu: Add php-sebastian-diff. gnu: Add php-sebastian-environment. gnu: Add php-sebastian-exporter. gnu: Add php-sebastian-global-state. gnu: Add php-sebastian-lines-of-code. gnu: Add php-sebastian-object-enumerator. gnu: Add php-sebastian-object-reflector. gnu: Add php-sebastian-recursion-context. gnu: Add php-sebastian-resource-operations. gnu: Add php-sebastian-type. gnu: Add php-sebastian-version. gnu: Add php-symfony-cache. gnu: Add php-cache-integration-tests. gnu: Add php-symfony-cache-contracts. gnu: Add php-symfony-config. gnu: Add php-symfony-console. gnu: Add php-symfony-dependency-injection. gnu: Add php-symfony-deprecation-contracts. gnu: Add php-symfony-error-handler. gnu: Add php-symfony-event-dispatcher. gnu: Add php-symfony-event-dispatcher-contracts. gnu: Add php-symfony-expression-language. gnu: Add php-symfony-filesystem. gnu: Add php-symfony-finder. gnu: Add php-symfony-http-foundation. gnu: Add php-symfony-http-kernel. gnu: Add php-symfony-intl. gnu: Add php-symfony-lock. gnu: Add php-symfony-mime. gnu: Add php-symfony-phpunit-bridge. gnu: Add php-symfony-process. gnu: Add php-symfony-property-info. gnu: Add php-symfony-polyfill-ctype. gnu: Add php-symfony-polyfill-intl-grapheme. gnu: Add php-symfony-polyfill-intl-idn. gnu: Add php-symfony-polyfill-intl-normalizer. gnu: Add php-symfony-polyfill-mbstring. gnu: Add php-symfony-polyfill-uuid. gnu: Add php-symfony-service-contracts. gnu: Add php-symfony-stopwatch. gnu: Add php-symfony-string. gnu: Add php-symfony-translation-contracts. gnu: Add php-symfony-uid. gnu: Add php-symfony-var-dumper. gnu: Add php-symfony-var-exporter. gnu: Add php-symfony-yaml. gnu: Add php-doctrine-cache. gnu: Add php-doctrine-annotations. gnu: Add php-doctrine-dbal. gnu: Add php-theseer-tokenizer. gnu: Add php-twig-twig. gnu: Add php-webmozart-assert. gnu: Add php-phpunit-phpunit. gnu/packages/check.scm | 24 + ...t-hamcrest-php-phpunit-compatibility.patch | 190 ++ ...ymfony-phpunit-bridge-getVendors-fix.patch | 46 + gnu/packages/php-xyz.scm | 2588 ++++++++++++++++- 4 files changed, 2845 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/php-hamcrest-hamcrest-php-phpunit-compatibility.patch create mode 100644 gnu/packages/patches/php-symfony-phpunit-bridge-getVendors-fix.patch
Comments
Hi Nicolas, I applied v1 of the patchset and the one patch of v2 locally, which worked pretty well. Patch 01/95 introducing abfngen got rejected, so I manually applied the changes: #+begin_src ~/devel/guix [env]$ cat gnu/packages/check.scm.rej diff a/gnu/packages/check.scm b/gnu/packages/check.scm (rejected hunks) @@ -109,6 +109,30 @@ (define-module (gnu packages check) #:use-module (guix deprecation) #:use-module (srfi srfi-1)) +(define-public abnfgen + (package + (name "abnfgen") + (version "0.21") + (source + (origin + (method url-fetch) + (uri "https://www.quut.com/abnfgen/abnfgen-0.21.tar.gz") + (sha256 + (base32 "0vjkbsgr193r0fz0f29sljkw28djwavk51m1izinfjqb07k89xsv")))) + (build-system gnu-build-system) + (home-page "https://www.quut.com/abnfgen") + (synopsis "Generate random documents matching an ABNF grammar.") + (description + "Given an Augmented Backus-Naur form (ABNF) grammar (RFC 4234), +this package provides a binary to quickly generate lots of random documents +that match that grammar. That is useful for +@itemize +@item verifying an ABNF grammar's syntactical correctness +@item illustrating a grammar with non-obvious examples +@item testing software that is supposed to consume documents described by a grammar +@end itemize") + (license license:expat))) + (define-public pict (package (name "pict") #+end_src However I cannot get phpunit to be build successfully as one dependency php-doctrine-instantiator seems to be faulty. I'm not too familiar with guixes composer/php build system, but as far as I can see it fails while creating the autoload_conf.php: #+begin_src error: in phase 'install': uncaught exception: wrong-type-arg "delete-duplicates" "Wrong type argument in position ~A: ~S" (2 ()) (()) Backtrace: 11 (primitive-load "/gnu/store/2rwq2xc8dcnacns2maqwlkcx85i…") In guix/build/gnu-build-system.scm: 908:2 10 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #) In ice-9/boot-9.scm: 1752:10 9 (with-exception-handler _ _ #:unwind? _ # _) In srfi/srfi-1.scm: 634:9 8 (for-each #<procedure 7ffff777eac0 at guix/build/gnu-b…> …) In ice-9/boot-9.scm: 1752:10 7 (with-exception-handler _ _ #:unwind? _ # _) In guix/build/gnu-build-system.scm: 929:23 6 (_) In ice-9/ports.scm: 433:17 5 (call-with-output-file _ _ #:binary _ #:encoding _) 476:4 4 (_ _) In guix/build/composer-build-system.scm: 194:9 3 (_) In unknown file: 2 (delete-duplicates (("Doctrine\\Instantiator\\" . "s…")) …) In ice-9/boot-9.scm: 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure delete-duplicates: Wrong type argument in position 2: () builder for `/gnu/store/23dv5mprah2xiz2skzf806cybn96zyv1-php-doctrine-instantiator-2.0.0.drv' failed with exit code 1 build of /gnu/store/23dv5mprah2xiz2skzf806cybn96zyv1-php-doctrine-instantiator-2.0.0.drv failed View build log at '/var/log/guix/drvs/23/dv5mprah2xiz2skzf806cybn96zyv1-php-doctrine-instantiator-2.0.0.drv.gz'. cannot build derivation `/gnu/store/aflr3m81hpaj4y1m62gnz171z3wnbflj-phpunit-9.6.10.drv': 1 dependencies couldn't be built guix build: error: build of `/gnu/store/aflr3m81hpaj4y1m62gnz171z3wnbflj-phpunit-9.6.10.drv' failed #+end_src Maybe I'll find some time to debug this further/figure out what the compose-build-system is trying there and why exactly it fails so I can fix it myself; but just in case this wasn't already known I wanted to document the issue here. Thanks for the extensive package set and as far as git log tells me for the composer-build-system as well! :)
Hey Nicolas, Wilko Meyer <w@wmeyer.eu> skribis: > I applied v1 of the patchset and the one patch of v2 locally, which > worked pretty well. Patch 01/95 introducing abfngen got rejected, so I > manually applied the changes: [...] > However I cannot get phpunit to be build successfully as one dependency > php-doctrine-instantiator seems to be faulty. I'm not too familiar > with guixes composer/php build system, but as far as I can see it fails > while creating the autoload_conf.php: Could you look into these issues? I know nothing about PHP but I’m happy to apply the patch series when the two of you tell me it’s ready. Thanks, Ludo’.
On 2024-04-05 22:12, Ludovic Courtès wrote: > Hey Nicolas, > > Wilko Meyer <w@wmeyer.eu> skribis: > >> I applied v1 of the patchset and the one patch of v2 locally, which >> worked pretty well. Patch 01/95 introducing abfngen got rejected, so I >> manually applied the changes: > > [...] > >> However I cannot get phpunit to be build successfully as one dependency >> php-doctrine-instantiator seems to be faulty. I'm not too familiar >> with guixes composer/php build system, but as far as I can see it fails >> while creating the autoload_conf.php: > > Could you look into these issues? Hi Ludo, As far as I remember, it did work on my side after the patches I sent on 19th December. Most likely these remaining errors come from those faulty parts, so I'll suggest reviewing them and confirming that phpunit indeed builds rather than further investigating from there. These were the patches concerned : - "first" here is 67895 - "second" here is 67898 v2 - the packages are in 67902, only with the 02/95 patch in a v2. >>>> 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'll try to give it a look now. This is now done in 67906. I've seen the review in 67898 which I'll address in a v3. IIRC, 67898 depends on 67895. > > I know nothing about PHP but I’m happy to apply the patch series when > the two of you tell me it’s ready. > > Thanks, > Ludo’.
Hi all, Are people still interested in working on this? Could you send a v3, if so for review? I can review it.
Hi,
jgart <jgart@dismail.de> writes:
> Are people still interested in working on this?
I don't know what the state of this patch series and the adjacent patch
series are, but could offer to try to build this patch series again and
see if I'm able to build phpunit from it this time. Having phpunit in
Guix would certainly help to be able to package other php libraries, so
it may be a good thing to have.
Nicolas offered some suggestions that may fix the build errors I've
encountered some time ago. So I'll try that and send feedback
afterwards.
If there's something else I can assist with, let me know.
Wilko Meyer <w@wmeyer.eu> writes: > Nicolas offered some suggestions that may fix the build errors I've > encountered some time ago. So I'll try that and send feedback > afterwards. Found time to do so a few hours later and was able to build phpunit succesfully from it: (~/devel/guix) λ ./pre-inst-env guix shell phpunit wilko@optiplex ~/devel/guix [env]$ phpunit --version PHPUnit 9.6.10 by Sebastian Bergmann and contributors. Tried building a few other packages from this series, e.g. php-doctrine-common, as well: successfully built /gnu/store/fq0z825ng9hkfz834b80kjvyv74q3pag-php-doctrine-common-3.4.3.drv /gnu/store/4kan2qn6n7qnsiirrpmkx2f0p8qv9sf9-php-doctrine-common-3.4.3 Another one, php-symfony-console can be build when tests for its dependency on php-symfony-error-handler are skipped: (~/devel/guix) λ ./pre-inst-env guix build --without-tests=php-symfony-error-handler php-symfony-console successfully built /gnu/store/9bl3c2m2rsv9qqn0n4pcxxhhgmpygr9p-php-symfony-console-6.3.2.drv /gnu/store/wgsqpj2qgxmjp6zv8rnmy55r07c47hvx-php-symfony-console-6.3.2 for php-symfony-error-handler only one out of 5 tests fail, and the one failing test seems to fail because it throws a deprecation warning which isn't expected, it could probably be skipped for now, the affected test is: /tmp/guix-build-php-symfony-error-handler-6.0.19.drv-0/source/Tests/phpt/fatal_with_nested_handlers.phpt I don't know how feasible it is to invest time in testing other packages from this patch series (maybe nudging ci.guix.gnu.org into doing this could be beneficial here?), but as phpunit works it could very well be that the series is mostly fine?
> from this patch series (maybe nudging ci.guix.gnu.org into doing this > > could be beneficial here?), but as phpunit works it could very well be > > that the series is mostly fine? > Hi, If you can send a latest updated patch set for merge consideration that you think I should review, I can schedule time to review it. all best, jgart