From unknown Thu Sep 18 20:59:02 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#49868 <49868@debbugs.gnu.org> To: bug#49868 <49868@debbugs.gnu.org> Subject: Status: [PATCH 0/2] guix: dune-build-system: Add a profile parameter. Reply-To: bug#49868 <49868@debbugs.gnu.org> Date: Fri, 19 Sep 2025 03:59:02 +0000 retitle 49868 [PATCH 0/2] guix: dune-build-system: Add a profile parameter. reassign 49868 guix-patches submitter 49868 pukkamustard severity 49868 normal tag 49868 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 04 04:04:51 2021 Received: (at submit) by debbugs.gnu.org; 4 Aug 2021 08:04:52 +0000 Received: from localhost ([127.0.0.1]:42581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBBtT-000086-Jh for submit@debbugs.gnu.org; Wed, 04 Aug 2021 04:04:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:56288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBBtR-00007v-NM for submit@debbugs.gnu.org; Wed, 04 Aug 2021 04:04:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBBtR-0001mx-Hz for guix-patches@gnu.org; Wed, 04 Aug 2021 04:04:49 -0400 Received: from mout02.posteo.de ([185.67.36.66]:44733) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBBtP-00043U-16 for guix-patches@gnu.org; Wed, 04 Aug 2021 04:04:49 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id EC172240105 for ; Wed, 4 Aug 2021 10:04:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1628064284; bh=sAMaTA5PBH5Or/VK6IJAbGYd/A0IBKqt7+njwetcCww=; h=From:To:Cc:Subject:Date:From; b=OaVGFcQx51Ib9CNqrsiyMCySLd3mGQI+ay4uc+nIBNk2t+yiH7Byg39MFyGn5nJjQ pF3mo23ujtgQSXPY641iPHHzooDnHvpChRme4+yOnBwD0+F5dVQYyh4OaM2ROI/zBC eMoJ5Y56NlVKzNg8NRc3jLT7rQHdRtwu4uvs8u8XN/2ssy0XSy+aaDI6U3B2fYb/Cq UtxzWIy9a1W8R5dOtriR+E1XL777fAQbCWt/Fd6Cx0XolpW5t0HvTEV7WBHCaNWeky YJtK920eqfNe8O4UYWOZZSnEPK2jmyF9mxxL2BFAKMUtsW4BNwLZGw8zpWZO5DoiF9 CrTXxTE3MLEew== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GfkmW16jCz9rxS; Wed, 4 Aug 2021 10:04:42 +0200 (CEST) From: pukkamustard To: guix-patches@gnu.org Subject: [PATCH 0/2] guix: dune-build-system: Add a profile parameter. Date: Wed, 4 Aug 2021 08:04:23 +0000 Message-Id: <20210804080423.3533-1-pukkamustard@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.67.36.66; envelope-from=pukkamustard@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: pukkamustard X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, This adds a profile parameter to the dune-build-system and sets it to "release" by default. The exact effects of the "release" profile are not clearly documented in dune [1]. But it seems to be the default when installing packages with OPAM [2]. I think it should also be the default in Guix. Some OCaml packages had set the profile to "release" manually by specifiying it in the build flags. This has been removed. This patch will probably require a rebuild of almost all OCaml packages. A second patch is attached that removes unnecessary arguments from the ocaml4.07-base packages. This is a more intrusive change to the package, so I've kept it in a separate commit. -pukkamustard [1] https://github.com/ocaml/dune/issues/3359 [2] https://dune.readthedocs.io/en/stable/faq.html#how-to-make-warnings-non-fatal pukkamustard (2): guix: dune-build-system: Add a profile parameter. gnu: ocaml4.07-base: Remove unnecessary arguments. doc/guix.texi | 7 +++++++ gnu/packages/ocaml.scm | 27 ++++++--------------------- guix/build-system/dune.scm | 3 +++ guix/build/dune-build-system.scm | 8 ++++++-- 4 files changed, 22 insertions(+), 23 deletions(-) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 04 04:08:50 2021 Received: (at 49868) by debbugs.gnu.org; 4 Aug 2021 08:08:50 +0000 Received: from localhost ([127.0.0.1]:42602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBBxJ-0000Fw-L5 for submit@debbugs.gnu.org; Wed, 04 Aug 2021 04:08:50 -0400 Received: from mout02.posteo.de ([185.67.36.66]:41539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBBxH-0000Fa-HK for 49868@debbugs.gnu.org; Wed, 04 Aug 2021 04:08:48 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 255C1240109 for <49868@debbugs.gnu.org>; Wed, 4 Aug 2021 10:08:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1628064521; bh=pjdckNwoFSjbOuNn3/kyrzXny0P5MI0bU55dFhJRqB4=; h=From:To:Cc:Subject:Date:From; b=gcZw8IHqwFJTJUXI67xgcixhb+usGIDt0Bc7A2PoWSk2Ik0sRXJZXiaRZfcI3YOZA qwORaijMNj6gwrV82h2JxstSKLmevhfN+UKnsV4Oei9vHUaT8Xc2+CAwqxQCDjVJk6 H/WE+uqPsH9+51M0/dlPJusqliwF82wgApeE0zVTNzrrGYWrINYJmzbyJ+9OGdYN5w OIRajTvpED5Gi6F7eb9LIxOmjyKr4IZ9ya72gWTGlHflr6yQ9ZHoUjKik6dhUZ36w0 YYQNjDJ9hXhZZXgZj9EeCyRFRoUhWosgxWQwWrbvBPORE6o9A0SjrYD3OI3GaNLeZc CrWwbDEK8Ggvg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Gfks43K7sz9rxV; Wed, 4 Aug 2021 10:08:40 +0200 (CEST) From: pukkamustard To: 49868@debbugs.gnu.org Subject: [PATCH 1/2] guix: dune-build-system: Add a profile parameter. Date: Wed, 4 Aug 2021 08:08:29 +0000 Message-Id: <20210804080830.3928-1-pukkamustard@posteo.net> In-Reply-To: <20210804080423.3533-1-pukkamustard@posteo.net> References: <20210804080423.3533-1-pukkamustard@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49868 Cc: pukkamustard X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * guix/build-system/dune.scm: Add a profile parameter. * guix/build/dune-build-system.scm (build): Use it. * doc/guix.texi: Document it. * gnu/packages/ocaml.scm: Remove profile being set from build flags. --- doc/guix.texi | 7 +++++++ gnu/packages/ocaml.scm | 17 ++++++----------- guix/build-system/dune.scm | 3 +++ guix/build/dune-build-system.scm | 8 ++++++-- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 9a9c85678c..2ba2edeb72 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -94,6 +94,7 @@ Copyright @copyright{} 2021 Xinglu Chen@* Copyright @copyright{} 2021 Raghav Gururajan@* Copyright @copyright{} 2021 Domagoj Stolfa@* Copyright @copyright{} 2021 Hui Lu@* +Copyright @copyright{} 2021 pukkamustard@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -7731,6 +7732,12 @@ The @code{#:package} parameter can be passed to specify a package name, which is useful when a package contains multiple packages and you want to build only one of them. This is equivalent to passing the @code{-p} argument to @code{dune}. + +The @code{#:profile} parameter can be passed to specify the +@uref{https://dune.readthedocs.io/en/stable/dune-files.html#profil, dune +build profile}. This is equivalent to passing the @code{--profile} +argument to @code{dune}. Its default value is @code{"release"}. + @end defvr @defvr {Scheme Variable} go-build-system diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index bf9242410d..547b905317 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -2854,8 +2854,7 @@ without a complete in-memory representation of the data.") "1dvcl108ir9nqkk4mjm9xhhj4p9dx9bmg8bnms54fizs1x3x8ar3")))) (build-system dune-build-system) (arguments - `(#:test-target "tests" - #:build-flags (list "--profile=release"))) + `(#:test-target "tests")) (propagated-inputs `(("ocaml-cmdliner" ,ocaml-cmdliner))) (home-page "https://www.typerex.org/ocp-indent.html") @@ -3273,8 +3272,7 @@ build system and allows external tools to analyse your project easily.") "1smcc0l6fh2n0y6bp96c69j5nw755jja99w0b206wx3yb2m4w2hs")))) (build-system dune-build-system) (arguments - `(#:tests? #f - #:build-flags (list "--profile" "release"))) + `(#:tests? #f)) (native-inputs `(("ocamlbuild" ,ocamlbuild))) (home-page "https://github.com/mjambon/cppo") @@ -3342,8 +3340,7 @@ standard iterator type starting from 4.07.") (base32 "07ycb103mr4mrkxfd63cwlsn023xvcjp0ra0k7n2gwrg0mwxmfss")))) (build-system dune-build-system) (arguments - `(#:tests? #f - #:build-flags (list "--profile" "release"))) + `(#:tests? #f)) (propagated-inputs `(("ocaml-seq" ,ocaml-seq))) (native-inputs @@ -3820,9 +3817,8 @@ the plugins facilitate extensibility, and the frontends serve as entry points.") "0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h")))) (build-system dune-build-system) (arguments - `(#:build-flags (list "--profile" "release") - #:test-target "camomile-test" - #:tests? #f; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82 + `(#:test-target "camomile-test" + #:tests? #f ; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82 #:phases (modify-phases %standard-phases (add-before 'build 'fix-usr-share @@ -3913,8 +3909,7 @@ connect an engine to your inputs and rendering functions to get an editor.") (base32 "0zcjy6fvf0d3i2ssz96asl889n3r6bplyzk7xvb2s3dkxbgcisyy")))) (build-system dune-build-system) (arguments - `(#:build-flags (list "--profile" "release") - #:tests? #f + `(#:tests? #f #:ocaml ,ocaml-4.07 #:findlib ,ocaml4.07-findlib #:dune ,ocaml4.07-dune)) diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm index 6a2f3d16de..1a64cf9b75 100644 --- a/guix/build-system/dune.scm +++ b/guix/build-system/dune.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017, 2018 Julien Lepiller ;;; Copyright © 2017 Ben Woodcroft +;;; Copyright © 2021 pukkamustard ;;; ;;; This file is part of GNU Guix. ;;; @@ -88,6 +89,7 @@ (out-of-source? #t) (jbuild? #f) (package #f) + (profile "release") (tests? #t) (test-flags ''()) (test-target "test") @@ -127,6 +129,7 @@ provides a 'setup.ml' file as its build system." #:out-of-source? ,out-of-source? #:jbuild? ,jbuild? #:package ,package + #:profile ,profile #:tests? ,tests? #:test-target ,test-target #:install-target ,install-target diff --git a/guix/build/dune-build-system.scm b/guix/build/dune-build-system.scm index 7e2ec1e3e1..6a0c2593ac 100644 --- a/guix/build/dune-build-system.scm +++ b/guix/build/dune-build-system.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Julien Lepiller ;;; Copyright © 2019 Gabriel Hondet +;;; Copyright © 2021 pukkamustard ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,11 +32,14 @@ ;; Code: (define* (build #:key (build-flags '()) (jbuild? #f) - (use-make? #f) (package #f) #:allow-other-keys) + (use-make? #f) (package #f) + (profile "release") #:allow-other-keys) "Build the given package." (let ((program (if jbuild? "jbuilder" "dune"))) (apply invoke program "build" "@install" - (append (if package (list "-p" package) '()) build-flags))) + (append (if package (list "-p" package) '()) + `("--profile" ,profile) + build-flags))) #t) (define* (check #:key (test-flags '()) (test-target "test") tests? -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 04 04:09:06 2021 Received: (at 49868) by debbugs.gnu.org; 4 Aug 2021 08:09:06 +0000 Received: from localhost ([127.0.0.1]:42610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBBxa-0000HL-3a for submit@debbugs.gnu.org; Wed, 04 Aug 2021 04:09:06 -0400 Received: from mout01.posteo.de ([185.67.36.65]:59031) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBBxY-0000GG-SE for 49868@debbugs.gnu.org; Wed, 04 Aug 2021 04:09:05 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id E5AEC240026 for <49868@debbugs.gnu.org>; Wed, 4 Aug 2021 10:08:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1628064538; bh=zDHOWetfIpcTKwEJ66mEcFlAeQOR4hI+Yc+4fwgOYjE=; h=From:To:Cc:Subject:Date:From; b=L976cckkXJv4eUZbDzTQ+3tBj8udiT1IxXTXahKmRvA3XELpXyrZoQKAMoWV0WR5D KtUl7DgtNa/4c6h1NSKtUi2N2f6NYkhpZd+TrbRtf/Q52ZZG9oT6+Y2Lq4eXdyNXJk n9rh+HNAPsNdDbkNM7W4P0LiS1X+5zVRVuHl9wwB1bzYJnnIMmp3WmA4xJWwsCYUlm X+pASBWHAJCIO1j46UfgIhI/rP5yvp3KA4oeqcKnHdLXsQ3hfa4o782aMUJpQZnvJ1 NqTx4KSMvP+0HdLlJNu+jAFC5Fk74N6vLT8KExl+MM5j+Mi5WgK/Zk9yPmLVP3ds1l V2OZHWxG2lnFA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GfksQ1Mnmz9rxk; Wed, 4 Aug 2021 10:08:58 +0200 (CEST) From: pukkamustard To: 49868@debbugs.gnu.org Subject: [PATCH 2/2] gnu: ocaml4.07-base: Remove unnecessary arguments. Date: Wed, 4 Aug 2021 08:08:30 +0000 Message-Id: <20210804080830.3928-2-pukkamustard@posteo.net> In-Reply-To: <20210804080830.3928-1-pukkamustard@posteo.net> References: <20210804080423.3533-1-pukkamustard@posteo.net> <20210804080830.3928-1-pukkamustard@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49868 Cc: pukkamustard X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/ocaml.scm (ocaml4.07-base): Remove unnecessary arguments. --- gnu/packages/ocaml.scm | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 547b905317..39ed60088e 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -4925,16 +4925,6 @@ provided by companion libraries such as (sha256 (base32 "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir")))) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'build - ;; make warnings non fatal (jbuilder behaviour) - (lambda _ - (invoke "dune" "build" "@install" "--profile=release")))) - #:ocaml ,ocaml-4.07 - #:findlib ,ocaml4.07-findlib - #:dune ,ocaml4.07-dune)) (properties '())))) (define-public ocaml-compiler-libs -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 08 22:18:09 2021 Received: (at 49868) by debbugs.gnu.org; 9 Aug 2021 02:18:09 +0000 Received: from localhost ([127.0.0.1]:55125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCurh-0004rw-3n for submit@debbugs.gnu.org; Sun, 08 Aug 2021 22:18:09 -0400 Received: from lepiller.eu ([89.234.186.109]:54644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCure-0004rh-92 for 49868@debbugs.gnu.org; Sun, 08 Aug 2021 22:18:08 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 55672bde; Mon, 9 Aug 2021 02:18:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=eZ/EJwIbIB9e HQzEpFYcwglXJCc5LhZW+X2V0f2fezE=; b=jVUiGicaLQmsRJA7DPMMd6vtV5gJ kBhqkUdU4J1jIs7fTWJeuP3sxiwLcYitS2/B8pz17T97E1r8C84o0EILPe8rtdWt G7ps1ccCSxGFwieAAX3JQIlyYM1hAYYJ5GhEoJDFMJeXoezDE9vQhluJ9yXrsEPI vdgKPsSlcNsRkExGjOHBMwltWOp2+9+jKEEss7IqmzGdxIsowG3hV1Apb7MPVTvR hYPHGHLA9Aec1Y9fI4obJTub3DmLa6bSK20J6MTLVmb27AkLjyL2KNTCMp58N75N S191OPOJoNBj7FbAsCJ1aG2ZPk3cdV5gougLGh+aPAVafHaMOTj/CkiKgA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 9f499e6c (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Mon, 9 Aug 2021 02:18:04 +0000 (UTC) Date: Mon, 9 Aug 2021 04:17:58 +0200 From: Julien Lepiller To: pukkamustard Subject: Re: [bug#49868] [PATCH 0/2] guix: dune-build-system: Add a profile parameter. Message-ID: <20210809041758.5b2d939e@tachikoma.lepiller.eu> In-Reply-To: <20210804080423.3533-1-pukkamustard@posteo.net> References: <20210804080423.3533-1-pukkamustard@posteo.net> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 49868 Cc: 49868@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Thanks for the patches! They LGTM, but since they're changing all our ocaml packages (which can go to master), I thought I could sneak in a small dune update. That needed an opam update and it was not as smooth as expected. I'd like to wait until I get reviews on https://issues.guix.gnu.org/49950, so we can push our patches together, if that's ok with you? Also, note that the link in the doc is incorrect, the anchor should be #profile, not #profil :) From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 09 03:17:47 2021 Received: (at 49868) by debbugs.gnu.org; 9 Aug 2021 07:17:47 +0000 Received: from localhost ([127.0.0.1]:55575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCzXf-000483-1O for submit@debbugs.gnu.org; Mon, 09 Aug 2021 03:17:47 -0400 Received: from mout02.posteo.de ([185.67.36.66]:53991) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCzXc-00047l-9L for 49868@debbugs.gnu.org; Mon, 09 Aug 2021 03:17:45 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id BEAD9240105 for <49868@debbugs.gnu.org>; Mon, 9 Aug 2021 09:17:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1628493456; bh=pa9fuj2BSoO3OfR5O6/oMFzGVsbJ+nrG7zAVGc14S18=; h=From:To:Cc:Subject:Date:From; b=fYeOZZLmn+qxh28XPPgNU3zjZt6986FnpXvJ2IbD1/MfYle7PPqYb465Ihq/QIgya vXUvE+aOpZIlwo9Lh1kuNk3hqhQNoqBS7GATHPE93eU1ISusB70amE1EurR5MXvsKI 8VxOI5o/whhU/3f/jK1vi7opA0M0AUUuohUqerjK82l5HAoY2r7+QD4CUV/G/VKBlm c1GVjIAnTmb6qHPlSju7DrEzrdQVomr8P1JnHms0FaE1R9QJdm9ShyE61h2k6oFtGX VxsbUAvaUfJQcooV9y7nVE/bo8YvP4DrPUnBSsW4LdWM/YQDv1Jxn8pptQf02mdEr7 ghe158QmOhEiw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GjnTp6hXdz6tmK; Mon, 9 Aug 2021 09:17:34 +0200 (CEST) References: <20210804080423.3533-1-pukkamustard@posteo.net> <20210809041758.5b2d939e@tachikoma.lepiller.eu> From: pukkamustard To: Julien Lepiller Subject: Re: [bug#49868] [PATCH 0/2] guix: dune-build-system: Add a profile parameter. In-reply-to: <20210809041758.5b2d939e@tachikoma.lepiller.eu> Date: Mon, 09 Aug 2021 07:17:31 +0000 Message-ID: <86mtpr5bp0.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49868 Cc: 49868@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Julien Lepiller writes: > Thanks for the patches! They LGTM, but since they're changing > all our > ocaml packages (which can go to master), I thought I could sneak > in a > small dune update. That needed an opam update and it was not as > smooth > as expected. I'd like to wait until I get reviews on > https://issues.guix.gnu.org/49950, so we can push our patches > together, > if that's ok with you? Sounds good to me! Will try and checkout #49950 today. > Also, note that the link in the doc is incorrect, the anchor > should be > #profile, not #profil :) Oops. Fixed in v2. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 09 03:19:25 2021 Received: (at 49868) by debbugs.gnu.org; 9 Aug 2021 07:19:25 +0000 Received: from localhost ([127.0.0.1]:55581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCzZF-0004B9-Cv for submit@debbugs.gnu.org; Mon, 09 Aug 2021 03:19:25 -0400 Received: from mout02.posteo.de ([185.67.36.66]:54335) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCzZE-0004At-4B for 49868@debbugs.gnu.org; Mon, 09 Aug 2021 03:19:24 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 2B43E240101 for <49868@debbugs.gnu.org>; Mon, 9 Aug 2021 09:19:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1628493558; bh=J+bjhMQJdTBbsly9wcidnGD5RGX3HHsrhGDbTwjqSd8=; h=From:To:Cc:Subject:Date:From; b=Sn06oiB4+ZqoqOcXdGiWZ856tKvKhyfnoXAKrRZz8+Nc7ZozCEVQvtwga9hqRWs/j Afm7gwvxwvqNBWTnL7zlyg/CQXYeYmS11tPB2b8hhjDg1x8HFJxGUJR7Q8IaYtuQX3 qPyco1NVImI9rh2FIITMn3TiM2bjr1wpdRInzMGJYnVLAFmEPEruD/c3loHoSSq+iL jqsFL+58tjjMDjYUraLonywUWYBQ+ZpqFTU4cnRfq75ode+Q9gvJgOAX5Rbr2/icb+ dofF+wFvP+MHrKp0Bp1smZm5uPsxMMkAQ9OF0gTx7L3T4EVVuIIA7tmF87QSAy2PFl yN5m2cu8y0iuQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GjnWm6ng0z9rxR; Mon, 9 Aug 2021 09:19:16 +0200 (CEST) From: pukkamustard To: 49868@debbugs.gnu.org Subject: [PATCH v2 1/2] guix: dune-build-system: Add a profile parameter. Date: Mon, 9 Aug 2021 07:19:03 +0000 Message-Id: <20210809071904.27334-1-pukkamustard@posteo.net> In-Reply-To: <20210804080423.3533-1-pukkamustard@posteo.net> References: <20210804080423.3533-1-pukkamustard@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49868 Cc: pukkamustard X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * guix/build-system/dune.scm: Add a profile parameter. * guix/build/dune-build-system.scm (build): Use it. * doc/guix.texi: Document it. * gnu/packages/ocaml.scm: Remove profile being set from build flags. --- doc/guix.texi | 7 +++++++ gnu/packages/ocaml.scm | 17 ++++++----------- guix/build-system/dune.scm | 3 +++ guix/build/dune-build-system.scm | 8 ++++++-- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 9a9c85678c..15b0ed7534 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -94,6 +94,7 @@ Copyright @copyright{} 2021 Xinglu Chen@* Copyright @copyright{} 2021 Raghav Gururajan@* Copyright @copyright{} 2021 Domagoj Stolfa@* Copyright @copyright{} 2021 Hui Lu@* +Copyright @copyright{} 2021 pukkamustard@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -7731,6 +7732,12 @@ The @code{#:package} parameter can be passed to specify a package name, which is useful when a package contains multiple packages and you want to build only one of them. This is equivalent to passing the @code{-p} argument to @code{dune}. + +The @code{#:profile} parameter can be passed to specify the +@uref{https://dune.readthedocs.io/en/stable/dune-files.html#profile, +dune build profile}. This is equivalent to passing the @code{--profile} +argument to @code{dune}. Its default value is @code{"release"}. + @end defvr @defvr {Scheme Variable} go-build-system diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index bf9242410d..547b905317 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -2854,8 +2854,7 @@ without a complete in-memory representation of the data.") "1dvcl108ir9nqkk4mjm9xhhj4p9dx9bmg8bnms54fizs1x3x8ar3")))) (build-system dune-build-system) (arguments - `(#:test-target "tests" - #:build-flags (list "--profile=release"))) + `(#:test-target "tests")) (propagated-inputs `(("ocaml-cmdliner" ,ocaml-cmdliner))) (home-page "https://www.typerex.org/ocp-indent.html") @@ -3273,8 +3272,7 @@ build system and allows external tools to analyse your project easily.") "1smcc0l6fh2n0y6bp96c69j5nw755jja99w0b206wx3yb2m4w2hs")))) (build-system dune-build-system) (arguments - `(#:tests? #f - #:build-flags (list "--profile" "release"))) + `(#:tests? #f)) (native-inputs `(("ocamlbuild" ,ocamlbuild))) (home-page "https://github.com/mjambon/cppo") @@ -3342,8 +3340,7 @@ standard iterator type starting from 4.07.") (base32 "07ycb103mr4mrkxfd63cwlsn023xvcjp0ra0k7n2gwrg0mwxmfss")))) (build-system dune-build-system) (arguments - `(#:tests? #f - #:build-flags (list "--profile" "release"))) + `(#:tests? #f)) (propagated-inputs `(("ocaml-seq" ,ocaml-seq))) (native-inputs @@ -3820,9 +3817,8 @@ the plugins facilitate extensibility, and the frontends serve as entry points.") "0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h")))) (build-system dune-build-system) (arguments - `(#:build-flags (list "--profile" "release") - #:test-target "camomile-test" - #:tests? #f; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82 + `(#:test-target "camomile-test" + #:tests? #f ; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82 #:phases (modify-phases %standard-phases (add-before 'build 'fix-usr-share @@ -3913,8 +3909,7 @@ connect an engine to your inputs and rendering functions to get an editor.") (base32 "0zcjy6fvf0d3i2ssz96asl889n3r6bplyzk7xvb2s3dkxbgcisyy")))) (build-system dune-build-system) (arguments - `(#:build-flags (list "--profile" "release") - #:tests? #f + `(#:tests? #f #:ocaml ,ocaml-4.07 #:findlib ,ocaml4.07-findlib #:dune ,ocaml4.07-dune)) diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm index 6a2f3d16de..1a64cf9b75 100644 --- a/guix/build-system/dune.scm +++ b/guix/build-system/dune.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017, 2018 Julien Lepiller ;;; Copyright © 2017 Ben Woodcroft +;;; Copyright © 2021 pukkamustard ;;; ;;; This file is part of GNU Guix. ;;; @@ -88,6 +89,7 @@ (out-of-source? #t) (jbuild? #f) (package #f) + (profile "release") (tests? #t) (test-flags ''()) (test-target "test") @@ -127,6 +129,7 @@ provides a 'setup.ml' file as its build system." #:out-of-source? ,out-of-source? #:jbuild? ,jbuild? #:package ,package + #:profile ,profile #:tests? ,tests? #:test-target ,test-target #:install-target ,install-target diff --git a/guix/build/dune-build-system.scm b/guix/build/dune-build-system.scm index 7e2ec1e3e1..6a0c2593ac 100644 --- a/guix/build/dune-build-system.scm +++ b/guix/build/dune-build-system.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Julien Lepiller ;;; Copyright © 2019 Gabriel Hondet +;;; Copyright © 2021 pukkamustard ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,11 +32,14 @@ ;; Code: (define* (build #:key (build-flags '()) (jbuild? #f) - (use-make? #f) (package #f) #:allow-other-keys) + (use-make? #f) (package #f) + (profile "release") #:allow-other-keys) "Build the given package." (let ((program (if jbuild? "jbuilder" "dune"))) (apply invoke program "build" "@install" - (append (if package (list "-p" package) '()) build-flags))) + (append (if package (list "-p" package) '()) + `("--profile" ,profile) + build-flags))) #t) (define* (check #:key (test-flags '()) (test-target "test") tests? -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 09 03:19:29 2021 Received: (at 49868) by debbugs.gnu.org; 9 Aug 2021 07:19:29 +0000 Received: from localhost ([127.0.0.1]:55584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCzZI-0004BR-S0 for submit@debbugs.gnu.org; Mon, 09 Aug 2021 03:19:29 -0400 Received: from mout02.posteo.de ([185.67.36.66]:49351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCzZF-0004Ay-RX for 49868@debbugs.gnu.org; Mon, 09 Aug 2021 03:19:26 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 47BF9240101 for <49868@debbugs.gnu.org>; Mon, 9 Aug 2021 09:19:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1628493560; bh=zDHOWetfIpcTKwEJ66mEcFlAeQOR4hI+Yc+4fwgOYjE=; h=From:To:Cc:Subject:Date:From; b=gi66R0CHD+3XvsscfNInjgtVWVVk+xSNRZ4IxluVT+THmN7CzRZW2k+2SY5z1xkp5 FQJmeSDAQL3NXsB7uq4sTvq8h6eR9W8Pl/ZHin1vJkQtpn4JYNmCl5ISbln1QgEl3R 9P/11wFPSeIhHI+Iz5U9OvJ9x3YjlqKvdRbqWgV6/iz43lUqZgTNNNjlxB4Ex9EQ2j qppe6nHsHgacQeWc+VPh7SBBSdZ0x/M43cOi65mMpV+i0asdpti5JMYu8UVAWAIGKb zAcjxWVRKeWBm8CdQIOWNG09tWUO/zPk0hkx7d9bY73yU4vfsV8eF5SoFkM4s7OoyW qz7N5I7I7jkqQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GjnWq5vQ2z9rxT; Mon, 9 Aug 2021 09:19:19 +0200 (CEST) From: pukkamustard To: 49868@debbugs.gnu.org Subject: [PATCH v2 2/2] gnu: ocaml4.07-base: Remove unnecessary arguments. Date: Mon, 9 Aug 2021 07:19:04 +0000 Message-Id: <20210809071904.27334-2-pukkamustard@posteo.net> In-Reply-To: <20210809071904.27334-1-pukkamustard@posteo.net> References: <20210804080423.3533-1-pukkamustard@posteo.net> <20210809071904.27334-1-pukkamustard@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49868 Cc: pukkamustard X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/ocaml.scm (ocaml4.07-base): Remove unnecessary arguments. --- gnu/packages/ocaml.scm | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 547b905317..39ed60088e 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -4925,16 +4925,6 @@ provided by companion libraries such as (sha256 (base32 "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir")))) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'build - ;; make warnings non fatal (jbuilder behaviour) - (lambda _ - (invoke "dune" "build" "@install" "--profile=release")))) - #:ocaml ,ocaml-4.07 - #:findlib ,ocaml4.07-findlib - #:dune ,ocaml4.07-dune)) (properties '())))) (define-public ocaml-compiler-libs -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 18:09:33 2021 Received: (at 49868-done) by debbugs.gnu.org; 20 Aug 2021 22:09:33 +0000 Received: from localhost ([127.0.0.1]:35650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHChg-0002Ph-VT for submit@debbugs.gnu.org; Fri, 20 Aug 2021 18:09:33 -0400 Received: from lepiller.eu ([89.234.186.109]:55560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHChg-0002PZ-3E for 49868-done@debbugs.gnu.org; Fri, 20 Aug 2021 18:09:32 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id ab9058e6; Fri, 20 Aug 2021 22:09:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=7IYVsNKY7cQp ou3B6sWyEjcMF3EHBvwSJNOZ21bOXfw=; b=WOZ55I8eePIlqGmCoAhe0nPft25N uv2EY6IcvUPJhNo/F2YB9QMHDGGTRDGEQ5Qn3LZrO+xyK3L9LBCJXH6LcC2rH/+k Chqf6kq957t8XNhFrQJJIEymndLKgjNFj0Xu8/D6fa7ZvbxtUC+g43y+4xycVpZT PEt8HTNKzA1H8iSSzW+jCWJkhKodHO6RJZIbbYg+egOmtGomWjbylvtjkC/6qRHK C5bmeRpVmNIu7z+JDpjFZTUPAcJnaj3iN2AC+MfoLunIknrsbarismgysJeHsvMv RIFW6C+9xFH+r19LCLZt+Yh2uq3Kx4RwPM5+mJFSI2PVuS/QQN3eCBg0/w== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 2f796f17 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 20 Aug 2021 22:09:31 +0000 (UTC) Date: Sat, 21 Aug 2021 00:09:26 +0200 From: Julien Lepiller To: pukkamustard Subject: Re: [bug#49868] [PATCH 0/2] guix: dune-build-system: Add a profile parameter. Message-ID: <20210821000926.00deacf3@tachikoma.lepiller.eu> In-Reply-To: <20210804080423.3533-1-pukkamustard@posteo.net> References: <20210804080423.3533-1-pukkamustard@posteo.net> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 49868-done Cc: 49868-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Pushed to master as 777ce1485749cc3dbe178fcc1e0654a7e74900c5 and 33a1ec29fa0ad72c61cef13c8af08c847eb399c1, thanks! From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 24 02:53:21 2021 Received: (at 49868) by debbugs.gnu.org; 24 Aug 2021 06:53:21 +0000 Received: from localhost ([127.0.0.1]:42981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIQJA-0002jB-Nk for submit@debbugs.gnu.org; Tue, 24 Aug 2021 02:53:21 -0400 Received: from mout01.posteo.de ([185.67.36.65]:60911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIQJ5-0002ip-4m for 49868@debbugs.gnu.org; Tue, 24 Aug 2021 02:53:15 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id B2CA6240027 for <49868@debbugs.gnu.org>; Tue, 24 Aug 2021 08:53:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1629787984; bh=bZnDRZWjBI1bBuAYt9AAeAXhR88gVGHbqB+CEOFDxZo=; h=From:To:Cc:Subject:Date:From; b=cqNc3M8Y65rGtC8AmwUKfAoR+rimAlvG55oac00igQz93mHR5TBkjtAFBvAny+syr 5THz9Cj1RhxnJhGwO5QD5mEo1CiGfHu/TgmWg/lRN/fz6a6oWd6+9AsOUlJUwtwyYF vTcbLi7GPeTRa/6Icl/jA11XO1sJ2khhYD1qV2BlVw3NENLGd2+jNiAjfa7RmQOPt+ Z9F1DGd1Z57N73zeuYAvTbbbKo7/JhErJJS5jEaIWw7PLD3SACWBZDADLSZB3xV94H 0soo6w7ylroVWpaKC08x+m1XwZMt8uu5Qs4fzkcUT3+GE4pMYG8w7ojNWw5IWXeAbS SVjQUlyxN4LEQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Gv0Db5FDYz6tmG; Tue, 24 Aug 2021 08:53:03 +0200 (CEST) References: <20210804080423.3533-1-pukkamustard@posteo.net> <20210821000926.00deacf3@tachikoma.lepiller.eu> From: pukkamustard To: Julien Lepiller Subject: Re: [bug#49868] [PATCH 0/2] guix: dune-build-system: Add a profile parameter. In-reply-to: <20210821000926.00deacf3@tachikoma.lepiller.eu> Date: Tue, 24 Aug 2021 06:52:56 +0000 Message-ID: <868s0r72rb.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49868 Cc: 49868@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Julien Lepiller writes: > Pushed to master as 777ce1485749cc3dbe178fcc1e0654a7e74900c5 and > 33a1ec29fa0ad72c61cef13c8af08c847eb399c1, thanks! Hi, I think this is causing trouble and maybe we should revert the commits. Setting the dune "--profile" argument to "release" without using "-p" seems to cause broken builds. For example ocaml-ppxlib builds properly but seems to be broken. Anything depending on ocaml-ppxlib fails with the errors: ``` Error: Files /gnu/store/4rxccc7d9qxfp8ggv0b3ais1r22yf46l-ocaml-ppx-compare-0.14.0/lib/ocaml/site-lib/ppx_compare/expander/ppx_compare_expander.cmxa and /gnu/store/dvrvy7b6d318ifg5n698x1667776alwg-ocaml-ppxlib-0.22.1/lib/ocaml/site-lib/ppxlib/ppxlib.cmxa make inconsistent assumptions over interface Ppxlib Error: The files /gnu/store/dvrvy7b6d318ifg5n698x1667776alwg-ocaml-ppxlib-0.22.1/lib/ocaml/site-lib/ppxlib/ppxlib.cmi and /gnu/store/4rxccc7d9qxfp8ggv0b3ais1r22yf46l-ocaml-ppx-compare-0.14.0/lib/ocaml/site-lib/ppx_compare/expander/ppx_compare_expander.cmi make inconsistent assumptions over interface Ppxlib ```` See also https://issues.guix.gnu.org/49867#96 where the same thing happens for ocaml-eqaf. -pukkamustard From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 24 03:13:55 2021 Received: (at 49868) by debbugs.gnu.org; 24 Aug 2021 07:13:55 +0000 Received: from localhost ([127.0.0.1]:43002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIQd5-0005P2-I4 for submit@debbugs.gnu.org; Tue, 24 Aug 2021 03:13:55 -0400 Received: from mout01.posteo.de ([185.67.36.65]:33053) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIQcy-0005Oi-Vd for 49868@debbugs.gnu.org; Tue, 24 Aug 2021 03:13:49 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 3FE38240028 for <49868@debbugs.gnu.org>; Tue, 24 Aug 2021 09:13:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1629789218; bh=leLpheMH/VQNnAjFB0sl2UayUmP+iYUImyPf9xIesz0=; h=From:To:Subject:CC:Date:From; b=AdlGI1H2ST0OYj/pe8jCVYWnqAqE4BKtSgPuUsMKT26u/zUrdiEcEedbeK7gehsoc zfS9dOUSj85C5cKB7ESQa7QKYknyeXYdxQU7DnGlN51t9WnG6Mj4dIVx+vmQ5q97qS tULs1MwsD/esUWK51tW62CfLoW6jTCut2UFnbXLdjbp8ahBhvId95MzNQU+p8uzCAU t8Jky+cFetglagLHBhMtjIYiMlTFWW0AmnZx5wsIHvHH3ZgB4XXIC/dFMeDRm5f9Tj 44cPq9rE+oGoZvW3SLMYdTuGevnlZfdxoJpAXgoKJhzJn4/IdXiaRXxMXOblpeWZUi ALLwssy9sj7fw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Gv0hK2CC0z6tmQ; Tue, 24 Aug 2021 09:13:36 +0200 (CEST) References: <20210804080423.3533-1-pukkamustard@posteo.net> <20210821000926.00deacf3@tachikoma.lepiller.eu> <868s0r72rb.fsf@posteo.net> From: pukkamustard To: Julien Lepiller Subject: Re: [bug#49868] [PATCH 0/2] guix: dune-build-system: Add a profile parameter. In-reply-to: <868s0r72rb.fsf@posteo.net> Date: Tue, 24 Aug 2021 07:13:35 +0000 Message-ID: <865yvv71sw.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49868 Cc: 49868@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) pukkamustard writes: > For example ocaml-ppxlib builds properly but seems to be broken. Anything depending on ocaml-ppxlib fails with the errors: This is not true. ocaml-ppx-hash fails to build. But other things depending on ocaml-ppxlib seem to build fine (e.g. ocaml-ppx-optional, ocaml-ppx-assert). From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 24 03:51:42 2021 Received: (at 49868) by debbugs.gnu.org; 24 Aug 2021 07:51:42 +0000 Received: from localhost ([127.0.0.1]:43050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIRDi-0006T2-Kx for submit@debbugs.gnu.org; Tue, 24 Aug 2021 03:51:42 -0400 Received: from mout02.posteo.de ([185.67.36.66]:38801) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIRDf-0006Sl-Lq for 49868@debbugs.gnu.org; Tue, 24 Aug 2021 03:51:41 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id D3F90240104 for <49868@debbugs.gnu.org>; Tue, 24 Aug 2021 09:51:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1629791491; bh=mTNK1sCSQLNV/TLv54+1wtIzQKVQGIC0W+MgsrujyyM=; h=From:To:Cc:Subject:Date:From; b=JeIqUU5hpDSpzUVibPoOPAGxPA6a7Et4GLw+CLHq+e3ZL3Co+ouL7oNPXyAvd+UZb naYCyP8QGNBnl9TIYUFyZrSZ6SP30/0Xm7mDvTcYC5JYDuhK6khJyZkXUtF5t92D/4 Jy268XTdds6GRyPIRipgb/iR/PbUtY4IC4VdEChd0DK+I1TfKiQ+YG+FXlFgfZs1X4 kjTITqYVyzqVIYONiEkCVl3FhhudvyUPK7e1fzVhnMrKOCICStjLhBaaO5o0LWunWX n29+o5MSkF8WObBB2zae+A9xuanbhj2uL2shxMWBsm9w3sGXvvpb0kM223acPrco20 l/quJgOC+UBhw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Gv1X30YYdz6tmN; Tue, 24 Aug 2021 09:51:30 +0200 (CEST) References: <20210804080423.3533-1-pukkamustard@posteo.net> <20210821000926.00deacf3@tachikoma.lepiller.eu> <868s0r72rb.fsf@posteo.net> <865yvv71sw.fsf@posteo.net> From: pukkamustard To: Julien Lepiller Subject: Re: [bug#49868] [PATCH 0/2] guix: dune-build-system: Add a profile parameter. In-reply-to: <865yvv71sw.fsf@posteo.net> Date: Tue, 24 Aug 2021 07:51:25 +0000 Message-ID: <86zgt75lhe.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49868 Cc: 49868@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) I submitted #50180 to fix builds of ocaml-ppx-hash. The impact of this seems to be smaller than I feared. Maybe reverting is not necessary. Still I don't really understand what's going on. I will try and find a concise example and ask the Dune people. pukkamustard writes: > pukkamustard writes: > >> For example ocaml-ppxlib builds properly but seems to be broken. Anything depending on ocaml-ppxlib fails with the errors: > > This is not true. ocaml-ppx-hash fails to build. But other things depending on ocaml-ppxlib seem to build fine (e.g. ocaml-ppx-optional, ocaml-ppx-assert). From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 07 05:48:40 2021 Received: (at 49868) by debbugs.gnu.org; 7 Sep 2021 09:48:40 +0000 Received: from localhost ([127.0.0.1]:55428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNXiZ-0003jb-VO for submit@debbugs.gnu.org; Tue, 07 Sep 2021 05:48:40 -0400 Received: from mout02.posteo.de ([185.67.36.66]:53903) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNXiX-0003jK-JZ for 49868@debbugs.gnu.org; Tue, 07 Sep 2021 05:48:38 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id D6513240105 for <49868@debbugs.gnu.org>; Tue, 7 Sep 2021 11:48:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1631008110; bh=kQaD8UEklz+lHJ+ISR/7P41VfAP+AIrqDGIxkSmOOGc=; h=From:To:Cc:Subject:Date:From; b=WA3dt/sjlbeu/Lo41UjEIOdXUfrBIUAQ6aoiwBKFMU1pYYara/n5gNf30LNg6wEkt Hk0BA5fSuPG08YyYmKMuPYzY2JboxDbnwYW1QdE+bMbgJBnvnO4JSmbrlljKMznRAR sYOOzRiTRIm2n+1gJuGIsfGYPq5PD19bFff25WXRWVWI59ReKpTMjxwHFFhmiYXhXu AHeOh5ZW5m3h7PAVgpDdFTzbU7h0KhRR9LVQgJGTerCj1qs+bHXZ5wxdeFxH2VxTB7 gk96TpOMmG4jp4sDqEl53x0G70CgqCWdsXMilkQ7XOfsOpzR7JyEGbNKMy8DcEG09u pyXGfKTguQ5GQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4H3gSY4S6Hz9rxL; Tue, 7 Sep 2021 11:48:29 +0200 (CEST) References: <20210804080423.3533-1-pukkamustard@posteo.net> <20210821000926.00deacf3@tachikoma.lepiller.eu> <868s0r72rb.fsf@posteo.net> <865yvv71sw.fsf@posteo.net> <86zgt75lhe.fsf@posteo.net> From: pukkamustard To: 49868@debbugs.gnu.org Subject: Re: [bug#49868] [PATCH 0/2] guix: dune-build-system: Add a profile parameter. Date: Tue, 07 Sep 2021 09:33:39 +0000 In-reply-to: <86zgt75lhe.fsf@posteo.net> Message-ID: <86y288yavn.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49868 Cc: Julien Lepiller X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain I suggest reverting commit 33a1ec29fa0ad72c61cef13c8af08c847eb399c1 ('guix: dune-build-system: Add a profile parameter.') and instead applying attached patch. The attached patch sets the '--release' flag instead of '--profile release'. From 'dune --help': --8<---------------cut here---------------start------------->8--- --release Put dune into a reproducible release mode. This is in fact a shorthand for --root . --ignore-promoted-rules --no-config --profile release --always-show-command-line --promote-install-files --default-target @install. You should use this option for release builds. For instance, you must use this option in your .opam files. Except if you already use -p, as -p implies this option. --8<---------------cut here---------------end--------------->8--- I think this is what we want. Setting '--profile release' was not enough and was causing inconsistencies with packages that were building with the '-p' flag. -pukkamustard --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-guix-dune-build-system-Put-dune-into-a-reproducible-.patch Content-Transfer-Encoding: quoted-printable >From 31bf546f87e90d108003b6ddef4756bf2ef04db7 Mon Sep 17 00:00:00 2001 From: pukkamustard Date: Tue, 7 Sep 2021 11:24:41 +0200 Subject: [PATCH 1/2] guix: dune-build-system: Put dune into a reproducible release mode. * guix/build/dune-build-system.scm (build,check): Use the release flag. * gnu/packages/ocaml.scm: Remove profile being set to release from build fl= ags. --- gnu/packages/ocaml.scm | 15 +++++---------- guix/build/dune-build-system.scm | 5 +++-- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index bdd52d2940..657eed2e62 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -2876,8 +2876,7 @@ without a complete in-memory representation of the da= ta.") "1dvcl108ir9nqkk4mjm9xhhj4p9dx9bmg8bnms54fizs1x3x8ar3")))) (build-system dune-build-system) (arguments - `(#:test-target "tests" - #:build-flags (list "--profile=3Drelease"))) + `(#:test-target "tests")) (propagated-inputs `(("ocaml-cmdliner" ,ocaml-cmdliner))) (home-page "https://www.typerex.org/ocp-indent.html") @@ -3295,8 +3294,7 @@ build system and allows external tools to analyse you= r project easily.") "1smcc0l6fh2n0y6bp96c69j5nw755jja99w0b206wx3yb2m4w2hs"))= )) (build-system dune-build-system) (arguments - `(#:tests? #f - #:build-flags (list "--profile" "release"))) + `(#:tests? #f)) (native-inputs `(("ocamlbuild" ,ocamlbuild))) (home-page "https://github.com/mjambon/cppo") @@ -3364,8 +3362,7 @@ standard iterator type starting from 4.07.") (base32 "07ycb103mr4mrkxfd63cwlsn023xvcjp0ra0k7n2gwrg0mwxmfss")))) (build-system dune-build-system) (arguments - `(#:tests? #f - #:build-flags (list "--profile" "release"))) + `(#:tests? #f)) (propagated-inputs `(("ocaml-seq" ,ocaml-seq))) (native-inputs @@ -3842,8 +3839,7 @@ the plugins facilitate extensibility, and the fronten= ds serve as entry points.") "0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h")))) (build-system dune-build-system) (arguments - `(#:build-flags (list "--profile" "release") - #:test-target "camomile-test" + `(#:test-target "camomile-test" #:tests? #f; Tests fail, see https://github.com/yoriyuki/Camomile/i= ssues/82 #:phases (modify-phases %standard-phases @@ -3935,8 +3931,7 @@ connect an engine to your inputs and rendering functi= ons to get an editor.") (base32 "0zcjy6fvf0d3i2ssz96asl889n3r6bplyzk7xvb2s3dkxbgcisyy")))) (build-system dune-build-system) (arguments - `(#:build-flags (list "--profile" "release") - #:tests? #f + `(#:tests? #f #:ocaml ,ocaml-4.07 #:findlib ,ocaml4.07-findlib #:dune ,ocaml4.07-dune)) diff --git a/guix/build/dune-build-system.scm b/guix/build/dune-build-syste= m.scm index 7e2ec1e3e1..da93899e7f 100644 --- a/guix/build/dune-build-system.scm +++ b/guix/build/dune-build-system.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2018 Julien Lepiller ;;; Copyright =C2=A9 2019 Gabriel Hondet +;;; Copyright =C2=A9 2021 pukkamustard ;;; ;;; This file is part of GNU Guix. ;;; @@ -35,7 +36,7 @@ "Build the given package." (let ((program (if jbuild? "jbuilder" "dune"))) (apply invoke program "build" "@install" - (append (if package (list "-p" package) '()) build-flags))) + (append (if package (list "-p" package) '("--release")) build-f= lags))) #t) =20 (define* (check #:key (test-flags '()) (test-target "test") tests? @@ -44,7 +45,7 @@ (when tests? (let ((program (if jbuild? "jbuilder" "dune"))) (apply invoke program "runtest" test-target - (append (if package (list "-p" package) '()) test-flags)))) + (append (if package (list "-p" package) '("--release")) test-= flags)))) #t) =20 (define* (install #:key outputs (install-target "install") (jbuild? #f) --=20 2.33.0 --=-=-= Content-Type: text/plain pukkamustard writes: > I submitted #50180 to fix builds of ocaml-ppx-hash. > > The impact of this seems to be smaller than I feared. Maybe reverting is not necessary. > > Still I don't really understand what's going on. I will try and find a concise example and ask the Dune people. > > pukkamustard writes: > >> pukkamustard writes: >> >>> For example ocaml-ppxlib builds properly but seems to be broken. Anything depending on ocaml-ppxlib fails with the errors: >> >> This is not true. ocaml-ppx-hash fails to build. But other things depending on ocaml-ppxlib seem to build fine (e.g. ocaml-ppx-optional, ocaml-ppx-assert). --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 07 07:06:34 2021 Received: (at 49868) by debbugs.gnu.org; 7 Sep 2021 11:06:34 +0000 Received: from localhost ([127.0.0.1]:55470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNYvy-0005vE-GQ for submit@debbugs.gnu.org; Tue, 07 Sep 2021 07:06:34 -0400 Received: from lepiller.eu ([89.234.186.109]:57484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNYvv-0005v1-JN for 49868@debbugs.gnu.org; Tue, 07 Sep 2021 07:06:32 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 01890a7b; Tue, 7 Sep 2021 11:06:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:in-reply-to:references:message-id:mime-version :content-type:content-transfer-encoding; s=dkim; bh=g5bi7j3hUdVN ++EXqL44DJkushVVzsKGgjvX6BCuPpA=; b=gsNiY4RqSANNT8mHmlAE2PHfueyL 4M8FtAXo/L3uDRC2VbFSIlInkiC8pFGzD2Erj6L73lwjUWuYD1D0vnx9R8/NC4dX oDohPg8vxiOJ37Co2KeFutSGZcz8ITNwqSFNXuuRBoq6rPo0tV39YLyHm0UrTyG4 bRxTkdjee8aCQJKxXGjNexig0jl/xt/PetJ9bxIH60VlmkKF8UqRAVqGZMFID38J lsLoXcWc5M3cxWe75r8w1IPlnkklwqAwOudJrSXEN15qY6qh3ZOs8Litu7oyFUJS 7yFBRxc5bQIcurN1cwONnY14n60d7epQqOTx8pMNVIByvTpn1qOVLepyVA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 94ead31d (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Tue, 7 Sep 2021 11:06:28 +0000 (UTC) Date: Tue, 07 Sep 2021 07:06:20 -0400 From: Julien Lepiller To: pukkamustard , 49868@debbugs.gnu.org Subject: =?US-ASCII?Q?Re=3A_=5Bbug=2349868=5D_=5BPATCH_0/2=5D_guix=3A_dune?= =?US-ASCII?Q?-build-system=3A_Add_a_profile_parameter=2E?= User-Agent: K-9 Mail for Android In-Reply-To: <86y288yavn.fsf@posteo.net> References: <20210804080423.3533-1-pukkamustard@posteo.net> <20210821000926.00deacf3@tachikoma.lepiller.eu> <868s0r72rb.fsf@posteo.net> <865yvv71sw.fsf@posteo.net> <86zgt75lhe.fsf@posteo.net> <86y288yavn.fsf@posteo.net> Message-ID: <36A316B4-720C-4753-AFFC-DBC68DBE5EF4@lepiller.eu> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=----X3X72SSCPY93DG2OUK7EV6ZJWXEES3 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 49868 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) ------X3X72SSCPY93DG2OUK7EV6ZJWXEES3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Instead of reverting, coull you senl a patch on top of master, that simply = replaces the flag? Le 7 septembre 2021 05:33:39 GMT-04:00, pukkamustard a =C3=A9crit=C2=A0: > >I suggest reverting commit 33a1ec29fa0ad72c61cef13c8af08c847eb399c1 >('guix: dune-build-system: Add a profile parameter=2E') and instead >applying attached patch=2E > >The attached patch sets the '--release' flag instead of '--profile >release'=2E From 'dune --help': > >--8<---------------cut here---------------start------------->8--- >--release > Put dune into a reproducible release mode=2E This is in fact a > shorthand for --root =2E --ignore-promoted-rules --no-config > --profile release --always-show-command-line > --promote-install-files --default-target @install=2E You should use > this option for release builds=2E For instance, you must use this > option in your =2Eopam files=2E Except if you already use -p, > as -p implies this option=2E >--8<---------------cut here---------------end--------------->8--- > >I think this is what we want=2E > >Setting '--profile release' was not enough and was causing >inconsistencies with packages that were building with the '-p' flag=2E > >-pukkamustard > ------X3X72SSCPY93DG2OUK7EV6ZJWXEES3 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Instead of reverting, coull you senl a patch on to= p of master, that simply replaces the flag?

Le 7 septembre 2021 05:33:39 GMT-04:00, pukkamustard <pukkamustard@po= steo=2Enet> a =C3=A9crit=C2=A0:

I suggest reverting commit 33a1ec29= fa0ad72c61cef13c8af08c847eb399c1
('guix: dune-build-system: Add a profil= e parameter=2E') and instead
applying attached patch=2E

The attac= hed patch sets the '--release' flag instead of '--profile
release'=2E Fr= om 'dune --help':

--8<---------------cut here---------------start= ------------->8---
--release
Put dune into a reproducible relea= se mode=2E This is in fact a
shorthand for --root =2E --ignore-promot= ed-rules --no-config
--profile release --always-show-command-line
= --promote-install-files --default-target @install=2E You should use
= this option for release builds=2E For instance, you must use this
o= ption in your <package>=2Eopam files=2E Except if you already use -p,=
as -p implies this option=2E
--8<---------------cut here------= ---------end--------------->8---

I think this is what we want=2E<= br>
Setting '--profile release' was not enough and was causing
incons= istencies with packages that were building with the '-p' flag=2E

-pu= kkamustard

------X3X72SSCPY93DG2OUK7EV6ZJWXEES3-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 07 07:56:21 2021 Received: (at 49868) by debbugs.gnu.org; 7 Sep 2021 11:56:21 +0000 Received: from localhost ([127.0.0.1]:55501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNZi9-0000p1-9k for submit@debbugs.gnu.org; Tue, 07 Sep 2021 07:56:21 -0400 Received: from mout01.posteo.de ([185.67.36.65]:40273) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNZi6-0000oj-En for 49868@debbugs.gnu.org; Tue, 07 Sep 2021 07:56:19 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id EB991240026 for <49868@debbugs.gnu.org>; Tue, 7 Sep 2021 13:56:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1631015772; bh=6hqQeAxlEXd2PDwxnLaesCZsBthJ8sszftECTFw3VgI=; h=From:To:Cc:Subject:Date:From; b=osvy9PNwOCkn526uLxyhQxLcBub/7F2KWStsTS4eiv8KqbOirWBJwldRPU/xqkXHQ Uh9S9ktpXg0G9ZSlFCYpNiB7qhKsG80Kb3/91b25roT7C/Q0yp5MO9InGYfCkfXl30 axfigzXz2ix++5/788Z7sR+ewFsR0TNrGKJ1rCKlATdBrhtLHR3eg7cP46tSyFSymw blTAFWY1dRSydigkHEmMsiUQpj2GrqClIkWTpeC3vlFmNmDysiGLXlaI5hJP0VJziF kd3dZ2ylmPdXhegWgIo5C1hel8vyhU4pIPAnoMHaj+SP3M58KYcGQHeQU6GTbW/12N fosManEhwfH+A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4H3kHv07sbz9rxX; Tue, 7 Sep 2021 13:56:10 +0200 (CEST) References: <20210804080423.3533-1-pukkamustard@posteo.net> <20210821000926.00deacf3@tachikoma.lepiller.eu> <868s0r72rb.fsf@posteo.net> <865yvv71sw.fsf@posteo.net> <86zgt75lhe.fsf@posteo.net> <86y288yavn.fsf@posteo.net> <36A316B4-720C-4753-AFFC-DBC68DBE5EF4@lepiller.eu> From: pukkamustard To: Julien Lepiller Subject: Re: [bug#49868] [PATCH 0/2] guix: dune-build-system: Add a profile parameter. Date: Tue, 07 Sep 2021 11:46:01 +0000 In-reply-to: <36A316B4-720C-4753-AFFC-DBC68DBE5EF4@lepiller.eu> Message-ID: <86pmtky4yu.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49868 Cc: 49868@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Attached a patch on top of master that replaces the profile parameter with the release flag. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-guix-dune-build-system-Put-dune-into-a-reproducible-.patch >From 8616439f8331d7d8fc089a83bc91e3c2ebc25935 Mon Sep 17 00:00:00 2001 From: pukkamustard Date: Tue, 7 Sep 2021 13:41:12 +0200 Subject: [PATCH] guix: dune-build-system: Put dune into a reproducible release mode. * guix/build/dune-build-system.scm (build,check): Remove the profile parameter and use the release flag. * guix/build-system/dune.scm: Remove the profile parameter. * doc/guix.texi: Remove paragraph on profile parameter. --- doc/guix.texi | 5 ----- guix/build-system/dune.scm | 2 -- guix/build/dune-build-system.scm | 9 ++++----- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 36a0c7f5ec..a056edc192 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -7735,11 +7735,6 @@ is useful when a package contains multiple packages and you want to build only one of them. This is equivalent to passing the @code{-p} argument to @code{dune}. -The @code{#:profile} parameter can be passed to specify the -@uref{https://dune.readthedocs.io/en/stable/dune-files.html#profile, -dune build profile}. This is equivalent to passing the @code{--profile} -argument to @code{dune}. Its default value is @code{"release"}. - @end defvr @defvr {Scheme Variable} go-build-system diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm index 1a64cf9b75..8f17519c2f 100644 --- a/guix/build-system/dune.scm +++ b/guix/build-system/dune.scm @@ -89,7 +89,6 @@ (out-of-source? #t) (jbuild? #f) (package #f) - (profile "release") (tests? #t) (test-flags ''()) (test-target "test") @@ -129,7 +128,6 @@ provides a 'setup.ml' file as its build system." #:out-of-source? ,out-of-source? #:jbuild? ,jbuild? #:package ,package - #:profile ,profile #:tests? ,tests? #:test-target ,test-target #:install-target ,install-target diff --git a/guix/build/dune-build-system.scm b/guix/build/dune-build-system.scm index 6a0c2593ac..70094d2544 100644 --- a/guix/build/dune-build-system.scm +++ b/guix/build/dune-build-system.scm @@ -32,13 +32,11 @@ ;; Code: (define* (build #:key (build-flags '()) (jbuild? #f) - (use-make? #f) (package #f) - (profile "release") #:allow-other-keys) + (use-make? #f) (package #f) #:allow-other-keys) "Build the given package." (let ((program (if jbuild? "jbuilder" "dune"))) (apply invoke program "build" "@install" - (append (if package (list "-p" package) '()) - `("--profile" ,profile) + (append (if package (list "-p" package) '("--release")) build-flags))) #t) @@ -48,7 +46,8 @@ (when tests? (let ((program (if jbuild? "jbuilder" "dune"))) (apply invoke program "runtest" test-target - (append (if package (list "-p" package) '()) test-flags)))) + (append (if package (list "-p" package) '("--release")) + test-flags)))) #t) (define* (install #:key outputs (install-target "install") (jbuild? #f) -- 2.33.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Julien Lepiller writes: > Instead of reverting, coull you senl a patch on top of master, that simpl= y replaces the flag? > > Le 7 septembre 2021 05:33:39 GMT-04:00, pukkamustard a =C3=A9crit : > > I suggest reverting commit 33a1ec29fa0ad72c61cef13c8af08c847eb399c1 > ('guix: dune-build-system: Add a profile parameter.') and instead > applying attached patch. > > The attached patch sets the '--release' flag instead of '--profile > release'. From 'dune --help': > > --8<---------------cut here---------------start------------->8--- > --release > Put dune into a reproducible release mode. This is in fact a > shorthand for --root . --ignore-promoted-rules --no-config > --profile release --always-show-command-line > --promote-install-files --default-target @install. You should use > this option for release builds. For instance, you must use this > option in your .opam files. Except if you already use -p, > as -p implies this option. > --8<---------------cut here---------------end--------------->8--- > > I think this is what we want. > > Setting '--profile release' was not enough and was causing > inconsistencies with packages that were building with the '-p' flag. > > -pukkamustard --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 07 09:03:41 2021 Received: (at 49868) by debbugs.gnu.org; 7 Sep 2021 13:03:42 +0000 Received: from localhost ([127.0.0.1]:55596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNalJ-0002fg-MY for submit@debbugs.gnu.org; Tue, 07 Sep 2021 09:03:41 -0400 Received: from lepiller.eu ([89.234.186.109]:57506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNalH-0002fX-J0 for 49868@debbugs.gnu.org; Tue, 07 Sep 2021 09:03:41 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id e8198172; Tue, 7 Sep 2021 13:03:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=JmGOxIgebkU0 d7aOEXvlW3GsAMzEVzpjc4dM+G3Tbbg=; b=MsRLQ67moVyFhJajoT1fFvwzmXCB YYFSLXLqcGW6ZjXoHOPfl+y3PnfZQh22q2mQWG9OpFPaItc0wEE57sfODU4ix2qy /GwNSsrpBxGo0d4L4La5lPRv88Fk0w9r/Ive3QFQGUYohkoSwDdc1/edkD64o1RO DPaqPbZGb3+4DoJspS5tOSUfmD2XemPhdhrlI8zb50mUpMoNm+JFvQ+VVdzlCZ+8 KiRnYY4hqhSF9c8pzYn4O0hpFX+Z3B/C8/iGkBM0SMjw2PHUb0GVfVhqlcEh3n0b ncn/l/I0lYxleTfuF8rNtJx5wUWJiAIC1f8fxZ+3bCrf3+gpyEzsdm88kQ== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id b7535ff4 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Tue, 7 Sep 2021 13:03:36 +0000 (UTC) Date: Tue, 7 Sep 2021 15:03:30 +0200 From: Julien Lepiller To: pukkamustard Subject: Re: [bug#49868] [PATCH 0/2] guix: dune-build-system: Add a profile parameter. Message-ID: <20210907150330.31124799@tachikoma.lepiller.eu> In-Reply-To: <86pmtky4yu.fsf@posteo.net> References: <20210804080423.3533-1-pukkamustard@posteo.net> <20210821000926.00deacf3@tachikoma.lepiller.eu> <868s0r72rb.fsf@posteo.net> <865yvv71sw.fsf@posteo.net> <86zgt75lhe.fsf@posteo.net> <86y288yavn.fsf@posteo.net> <36A316B4-720C-4753-AFFC-DBC68DBE5EF4@lepiller.eu> <86pmtky4yu.fsf@posteo.net> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 49868 Cc: 49868@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Le Tue, 07 Sep 2021 11:46:01 +0000, pukkamustard a =C3=A9crit : > Attached a patch on top of master that replaces the profile parameter > with the release flag. >=20 Unfortunately, this is breaking our ocaml4.07-* packages, because the --release flag doesn't exist in the version we use for ocaml4.07-dune. I think the easiest would be to add a flag #:release? and set it to #f in package-with-ocaml4.07. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 07 16:03:04 2021 Received: (at 49868) by debbugs.gnu.org; 7 Sep 2021 20:03:04 +0000 Received: from localhost ([127.0.0.1]:57878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNhJA-0002Zy-D8 for submit@debbugs.gnu.org; Tue, 07 Sep 2021 16:03:04 -0400 Received: from mout01.posteo.de ([185.67.36.65]:56819) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNhJ8-0002ZQ-8j for 49868@debbugs.gnu.org; Tue, 07 Sep 2021 16:03:03 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 8069824006C for <49868@debbugs.gnu.org>; Tue, 7 Sep 2021 22:02:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1631044975; bh=UqiDtOGreKltfDa9w8C0n4SePL2kJ07HEAJmLWyIOuE=; h=From:To:Cc:Subject:Date:From; b=pYPN+Nvti4qy9OJJy5Ft2fruWGdMeGm6pWwG9acm/Q3EYGhqSlXmkNdplrABuaGRe 4MGVfX1+oALK+dedDUkq5+N0fmbOXAHvoUB2G0/EFhTMzsDl3ZfS6AmUitysFfzEev vdaNGSEXtV1grSEpT1NMZL7SC7snGIJ/R8sooJQEwco+nygm7Gof3RUCOcMbl/v6Ow JnBLXRcI9Mr3CQIHnf7PHCCXSAbNmfORmipdjtHTGoFlJJiAKoBEkZAL1IlUu6bgM0 D7ZYoNWilbCZJuNHwJgmE85rZTjNj5xyiN3pFB48Lq51N3PopdqFQCOESdu1rgytSn NwF5EHK3sAzWw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4H3x5T6FmNz9rxT; Tue, 7 Sep 2021 22:02:53 +0200 (CEST) References: <20210804080423.3533-1-pukkamustard@posteo.net> <20210821000926.00deacf3@tachikoma.lepiller.eu> <868s0r72rb.fsf@posteo.net> <865yvv71sw.fsf@posteo.net> <86zgt75lhe.fsf@posteo.net> <86y288yavn.fsf@posteo.net> <36A316B4-720C-4753-AFFC-DBC68DBE5EF4@lepiller.eu> <86pmtky4yu.fsf@posteo.net> <20210907150330.31124799@tachikoma.lepiller.eu> From: pukkamustard To: Julien Lepiller Subject: Re: [bug#49868] [PATCH 0/2] guix: dune-build-system: Add a profile parameter. Date: Tue, 07 Sep 2021 18:11:24 +0000 In-reply-to: <20210907150330.31124799@tachikoma.lepiller.eu> Message-ID: <86lf48xifn.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49868 Cc: 49868@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Julien Lepiller writes: > Unfortunately, this is breaking our ocaml4.07-* packages, because the > --release flag doesn't exist in the version we use for ocaml4.07-dune. Whoops. Seems like the --release flag was only added in dune 2.5.0 (https://github.com/ocaml/dune/blob/main/CHANGES.md#250-09042020; ocaml4.07-dune is at 1.11.3). > I think the easiest would be to add a flag #:release? and set it to #f > in package-with-ocaml4.07. That would work. But I think it would be better if we built everything in release mode. Unfortunately the way to do that with old dune is by expclity with '-p PACKAGE1,PACKAGE2'. That means we need to rename the #:package argument to #:packages, allow it to take a list and add explicit packages to all OCaml4.07 packages. Another way would be to write-out the flags for which -p and --release are short-hand for. Unfortunately this is different in dune 2.9.0 and 1.11.3 (taken from the --help): 2.9.0: --8<---------------cut here---------------start------------->8--- --root . --ignore-promoted-rules --no-config --profile release --always-show-command-line --promote-install-files --default-target @install --8<---------------cut here---------------end--------------->8--- 1.11.3: --8<---------------cut here---------------start------------->8--- --root . --ignore-promoted-rules --no-config ----profile release --8<---------------cut here---------------end--------------->8--- Can we check the version of dune in dune-build-system and either use --release or the set of 1.11.3 flags? I just tried doing this in (guix build dune-build-system). Didn't work as I couldn't use (guix package). After reading up, I guess this needs to be done in (guix build-system dune) and lowered down as an argument - maybe as 'dune-release-flags'? Would that be ok? From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 07 18:03:32 2021 Received: (at 49868) by debbugs.gnu.org; 7 Sep 2021 22:03:32 +0000 Received: from localhost ([127.0.0.1]:57979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNjBk-0005fs-GM for submit@debbugs.gnu.org; Tue, 07 Sep 2021 18:03:32 -0400 Received: from lepiller.eu ([89.234.186.109]:57528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNjBh-0005fh-OX for 49868@debbugs.gnu.org; Tue, 07 Sep 2021 18:03:31 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id dab6c63d; Tue, 7 Sep 2021 22:03:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=enj+pVjsCZU/ Kd4cH5iieZjkcx+F+C58X9sYCFmcXsY=; b=T/J7GjbDTdptKpcg+zhQm6l5LAru mnXs33fsU6I2mYxHPvlNMPTtt3ssqbcLIQTv9DddRlliCUFQYhk87MasRWfSaDZ1 sWdqFtVGoBwC3IMlD5o9Cp5Rf/YT7YCJv2Z2f+fAJ5DhwappimkHRTAsxl9aofq9 DfLs/YTY6Eb/VPUL+RN3wd+5Ox/ulr9WqVujrDL50oHWKjQFEv1Adv15Ve1D7FyI sHirM4iZCkuRl3mwdOIC9dOAclufCWZLNS0enLpoXQePymYZW8JXrYMir3yBnmzd AzA2rdHiSCZ33q18sQkjDAdyv98/CpCBWi0u4BIUrEeHOdQ0r93kcAhy+Q== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id bf486cfb (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Tue, 7 Sep 2021 22:03:27 +0000 (UTC) Date: Wed, 8 Sep 2021 00:03:21 +0200 From: Julien Lepiller To: pukkamustard Subject: Re: [bug#49868] [PATCH 0/2] guix: dune-build-system: Add a profile parameter. Message-ID: <20210908000321.662876ee@tachikoma.lepiller.eu> In-Reply-To: <86lf48xifn.fsf@posteo.net> References: <20210804080423.3533-1-pukkamustard@posteo.net> <20210821000926.00deacf3@tachikoma.lepiller.eu> <868s0r72rb.fsf@posteo.net> <865yvv71sw.fsf@posteo.net> <86zgt75lhe.fsf@posteo.net> <86y288yavn.fsf@posteo.net> <36A316B4-720C-4753-AFFC-DBC68DBE5EF4@lepiller.eu> <86pmtky4yu.fsf@posteo.net> <20210907150330.31124799@tachikoma.lepiller.eu> <86lf48xifn.fsf@posteo.net> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 49868 Cc: 49868@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Le Tue, 07 Sep 2021 18:11:24 +0000, pukkamustard a =C3=A9crit : > Julien Lepiller writes: >=20 > > Unfortunately, this is breaking our ocaml4.07-* packages, because > > the --release flag doesn't exist in the version we use for > > ocaml4.07-dune. =20 >=20 > Whoops. Seems like the --release flag was only added in dune 2.5.0 > (https://github.com/ocaml/dune/blob/main/CHANGES.md#250-09042020; > ocaml4.07-dune is at 1.11.3). >=20 > > I think the easiest would be to add a flag #:release? and set it to > > #f in package-with-ocaml4.07. =20 >=20 > That would work. But I think it would be better if we built everything > in release mode. >=20 > Unfortunately the way to do that with old dune is by expclity with '-p > PACKAGE1,PACKAGE2'. That means we need to rename the #:package > argument to #:packages, allow it to take a list and add explicit > packages to all OCaml4.07 packages. >=20 > Another way would be to write-out the flags for which -p and --release > are short-hand for. Unfortunately this is different in dune 2.9.0 and > 1.11.3 (taken from the --help): >=20 > 2.9.0: > --8<---------------cut here---------------start------------->8--- > --root . --ignore-promoted-rules --no-config --profile release > --always-show-command-line --promote-install-files --default-target > @install > --8<---------------cut here---------------end--------------->8--- >=20 > 1.11.3: > --8<---------------cut here---------------start------------->8--- > --root . --ignore-promoted-rules --no-config ----profile release > --8<---------------cut here---------------end--------------->8--- I suppose these additional flags are not available in dune 1.11? >=20 > Can we check the version of dune in dune-build-system and either use > --release or the set of 1.11.3 flags? >=20 > I just tried doing this in (guix build dune-build-system). Didn't work > as I couldn't use (guix package). After reading up, I guess this needs > to be done in (guix build-system dune) and lowered down as an > argument - maybe as 'dune-release-flags'? Would that be ok? Yeah, that sounds good. Another solution would be to get rid of ocaml4.07, but that's our future bootstrap path (as this is the only bootstrapped version currently), so we will need it anyway... From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 08 04:30:06 2021 Received: (at 49868) by debbugs.gnu.org; 8 Sep 2021 08:30:06 +0000 Received: from localhost ([127.0.0.1]:58541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNsy5-00073o-Ge for submit@debbugs.gnu.org; Wed, 08 Sep 2021 04:30:06 -0400 Received: from mout01.posteo.de ([185.67.36.65]:42095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNsy2-00072b-Vv for 49868@debbugs.gnu.org; Wed, 08 Sep 2021 04:30:04 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id AE56B240026 for <49868@debbugs.gnu.org>; Wed, 8 Sep 2021 10:29:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1631089796; bh=Z23REpMHfjnR6QfSHA8uy+QyGX40KmNXiCLjwln3iR0=; h=From:To:Cc:Subject:Date:From; b=H6nCfKbrHVYzJFr1OtIWGVsmvwaePCJVjHTxm91lg8NkLXXgaTSO2WwHiF82uC/NP EqKCPV+KsXjy2phCvLZDFJ7DjjtK+u8v3gRIjqs/QbbdzyujRHOylU25PwRYMqT7uE co41kSkIqFNn6QShY8UX3vPEcsM67hOeSh7Q/ySrrIW3Y6gpQkyC5X+xo/uFmdqJZo 63hBKjohJ16V93ULE2bwkTGPhKv5kd4kA3Um2nkBr/XUPF7gGSPVHAcmxkQxFnFmus lbNKnhR5cnPUTwFVN0CpOM6b2i8YBtRY8NEU+eBe93P5ugK/00AEW9t9X9bd7l/MvU 6foJIK7LOmADA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4H4FgR4ZZWz6tmP; Wed, 8 Sep 2021 10:29:55 +0200 (CEST) References: <20210804080423.3533-1-pukkamustard@posteo.net> <20210821000926.00deacf3@tachikoma.lepiller.eu> <868s0r72rb.fsf@posteo.net> <865yvv71sw.fsf@posteo.net> <86zgt75lhe.fsf@posteo.net> <86y288yavn.fsf@posteo.net> <36A316B4-720C-4753-AFFC-DBC68DBE5EF4@lepiller.eu> <86pmtky4yu.fsf@posteo.net> <20210907150330.31124799@tachikoma.lepiller.eu> <86lf48xifn.fsf@posteo.net> <20210908000321.662876ee@tachikoma.lepiller.eu> From: pukkamustard To: Julien Lepiller Subject: Re: [bug#49868] [PATCH 0/2] guix: dune-build-system: Add a profile parameter. Date: Wed, 08 Sep 2021 08:24:19 +0000 In-reply-to: <20210908000321.662876ee@tachikoma.lepiller.eu> Message-ID: <86h7evxyf2.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49868 Cc: 49868@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Julien Lepiller writes: >> >> 2.9.0: >> --8<---------------cut here---------------start------------->8--- >> --root . --ignore-promoted-rules --no-config --profile release >> --always-show-command-line --promote-install-files --default-target >> @install >> --8<---------------cut here---------------end--------------->8--- >> >> 1.11.3: >> --8<---------------cut here---------------start------------->8--- >> --root . --ignore-promoted-rules --no-config ----profile release >> --8<---------------cut here---------------end--------------->8--- > > I suppose these additional flags are not available in dune 1.11? > No, unfortunately the flags are not available in 1.11. We need to check version and use appropriate flags. >> >> Can we check the version of dune in dune-build-system and either use >> --release or the set of 1.11.3 flags? >> >> I just tried doing this in (guix build dune-build-system). Didn't work >> as I couldn't use (guix package). After reading up, I guess this needs >> to be done in (guix build-system dune) and lowered down as an >> argument - maybe as 'dune-release-flags'? Would that be ok? > > Yeah, that sounds good. Attached a patch that does that. ocaml4.07 packages are building again. Unsure about the double quote things and if there is a better way to check versions. > Another solution would be to get rid of > ocaml4.07, but that's our future bootstrap path (as this is the only > bootstrapped version currently), so we will need it anyway... Yup, good to keep it. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-guix-dune-build-system-Put-dune-into-a-reproducible-.patch >From bb6bf9e12b81165405da6d5872c18f63e425742d Mon Sep 17 00:00:00 2001 From: pukkamustard Date: Tue, 7 Sep 2021 13:41:12 +0200 Subject: [PATCH] guix: dune-build-system: Put dune into a reproducible release mode. * guix/build/dune-build-system.scm (build,check): Remove the profile parameter and use the release flag. * guix/build-system/dune.scm: Remove the profile parameter. * doc/guix.texi: Remove paragraph on profile parameter. --- doc/guix.texi | 5 ----- guix/build-system/dune.scm | 17 ++++++++++++++--- guix/build/dune-build-system.scm | 15 +++++++++------ 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 36a0c7f5ec..a056edc192 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -7735,11 +7735,6 @@ is useful when a package contains multiple packages and you want to build only one of them. This is equivalent to passing the @code{-p} argument to @code{dune}. -The @code{#:profile} parameter can be passed to specify the -@uref{https://dune.readthedocs.io/en/stable/dune-files.html#profile, -dune build profile}. This is equivalent to passing the @code{--profile} -argument to @code{dune}. Its default value is @code{"release"}. - @end defvr @defvr {Scheme Variable} go-build-system diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm index 1a64cf9b75..f52bbd0257 100644 --- a/guix/build-system/dune.scm +++ b/guix/build-system/dune.scm @@ -60,6 +60,15 @@ #:allow-other-keys #:rest arguments) "Return a bag for NAME." + + ;; Flags that put dune into reproducible build mode. + (define dune-release-flags + (if (equal? (package-version dune) "1.11.3") + ''("--root" "." "--ignore-promoted-rules" "--no-config" + "--profile" "release") + ;; For dune >= 2.5.0 this is just --release. + ''("--release"))) + (define private-keywords '(#:source #:target #:dune #:findlib #:ocaml #:inputs #:native-inputs)) @@ -79,7 +88,9 @@ (build-inputs `(("dune" ,dune) ,@(bag-build-inputs base))) (build dune-build) - (arguments (strip-keyword-arguments private-keywords arguments)))))) + (arguments (append + `(#:dune-release-flags ,dune-release-flags) + (strip-keyword-arguments private-keywords arguments))))))) (define* (dune-build store name inputs #:key (guile #f) @@ -89,7 +100,7 @@ (out-of-source? #t) (jbuild? #f) (package #f) - (profile "release") + (dune-release-flags ''()) (tests? #t) (test-flags ''()) (test-target "test") @@ -129,7 +140,7 @@ provides a 'setup.ml' file as its build system." #:out-of-source? ,out-of-source? #:jbuild? ,jbuild? #:package ,package - #:profile ,profile + #:dune-release-flags ,dune-release-flags #:tests? ,tests? #:test-target ,test-target #:install-target ,install-target diff --git a/guix/build/dune-build-system.scm b/guix/build/dune-build-system.scm index 6a0c2593ac..e9ccc71057 100644 --- a/guix/build/dune-build-system.scm +++ b/guix/build/dune-build-system.scm @@ -32,23 +32,26 @@ ;; Code: (define* (build #:key (build-flags '()) (jbuild? #f) - (use-make? #f) (package #f) - (profile "release") #:allow-other-keys) + (use-make? #f) (package #f) (dune-release-flags '()) + #:allow-other-keys) "Build the given package." (let ((program (if jbuild? "jbuilder" "dune"))) (apply invoke program "build" "@install" - (append (if package (list "-p" package) '()) - `("--profile" ,profile) + (append (if package (list "-p" package) + dune-release-flags) build-flags))) #t) (define* (check #:key (test-flags '()) (test-target "test") tests? - (jbuild? #f) (package #f) #:allow-other-keys) + (jbuild? #f) (package #f) (dune-release-flags '()) + #:allow-other-keys) "Test the given package." (when tests? (let ((program (if jbuild? "jbuilder" "dune"))) (apply invoke program "runtest" test-target - (append (if package (list "-p" package) '()) test-flags)))) + (append (if package (list "-p" package) + dune-release-flags) + test-flags)))) #t) (define* (install #:key outputs (install-target "install") (jbuild? #f) -- 2.33.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 08 07:45:40 2021 Received: (at 49868-done) by debbugs.gnu.org; 8 Sep 2021 11:45:40 +0000 Received: from localhost ([127.0.0.1]:58813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNw1M-0000Ej-CL for submit@debbugs.gnu.org; Wed, 08 Sep 2021 07:45:40 -0400 Received: from lepiller.eu ([89.234.186.109]:57574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNw1I-0000ET-FB for 49868-done@debbugs.gnu.org; Wed, 08 Sep 2021 07:45:38 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 84799bd9; Wed, 8 Sep 2021 11:45:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=p2OPRRn++iAv 4LzSZjydOFgwEmefbbmQqFxjU2RT/M8=; b=Sw0qlUSLPnnZ+tc5XJgRy+tot0D/ RgXh3OWaAup0PBLGmlwY77j8L3bIsOrVV0+sumIegCLrSuECVnyIzM/1eRUYKWHT gi1tyR60eDMrDI3brMmsg4r8vxhdKD4T9Qv+XXQlFOIF0sgYQh8RXU2Wej28fBtw pwBjh406WbNhzx5gIokWCqPyrjyv7bBmj1aaP9MjCaVQdFrq7Rcp1EdTeG/5PNV8 JembzTK085un0W4SWYCR168N+BRWBbDNVTyPfdndf6L2wuPp56d5B25rYHG6+OTl QOZLcIwHxt47+UWMB61fBHPJFryRs0F9bog3TThaFmD44PViKdqsAi5CbQ== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 543ac097 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Wed, 8 Sep 2021 11:45:33 +0000 (UTC) Date: Wed, 8 Sep 2021 13:45:21 +0200 From: Julien Lepiller To: pukkamustard Subject: Re: [bug#49868] [PATCH 0/2] guix: dune-build-system: Add a profile parameter. Message-ID: <20210908134521.5eba3dd3@tachikoma.lepiller.eu> In-Reply-To: <86h7evxyf2.fsf@posteo.net> References: <20210804080423.3533-1-pukkamustard@posteo.net> <20210821000926.00deacf3@tachikoma.lepiller.eu> <868s0r72rb.fsf@posteo.net> <865yvv71sw.fsf@posteo.net> <86zgt75lhe.fsf@posteo.net> <86y288yavn.fsf@posteo.net> <36A316B4-720C-4753-AFFC-DBC68DBE5EF4@lepiller.eu> <86pmtky4yu.fsf@posteo.net> <20210907150330.31124799@tachikoma.lepiller.eu> <86lf48xifn.fsf@posteo.net> <20210908000321.662876ee@tachikoma.lepiller.eu> <86h7evxyf2.fsf@posteo.net> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 49868-done Cc: 49868-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Le Wed, 08 Sep 2021 08:24:19 +0000, pukkamustard a =C3=A9crit : >=20 > Attached a patch that does that. ocaml4.07 packages are building > again. >=20 > Unsure about the double quote things and if there is a better way to > check versions. >=20 > > Another solution would be to get rid of > > ocaml4.07, but that's our future bootstrap path (as this is the only > > bootstrapped version currently), so we will need it anyway... >=20 > Yup, good to keep it. >=20 Pushed as f8f94cc5446753b37ab3ddd23e21919efd006769, thanks! I made an adjustment to the commit message and used version>=3D in (guix build-system dune) instead of comparing to the exact version, in case someone wants to use a different version, older that 2.5.0. Otherwise unchanged. Thanks again! From unknown Thu Sep 18 20:59:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 07 Oct 2021 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator