unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: pukkamustard <pukkamustard@posteo.net>
To: Julien Lepiller <julien@lepiller.eu>
Cc: 49868@debbugs.gnu.org
Subject: [bug#49868] [PATCH 0/2] guix: dune-build-system: Add a profile parameter.
Date: Tue, 07 Sep 2021 11:46:01 +0000	[thread overview]
Message-ID: <86pmtky4yu.fsf@posteo.net> (raw)
In-Reply-To: <36A316B4-720C-4753-AFFC-DBC68DBE5EF4@lepiller.eu>

[-- Attachment #1: Type: text/plain, Size: 95 bytes --]


Attached a patch on top of master that replaces the profile parameter
with the release flag.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-guix-dune-build-system-Put-dune-into-a-reproducible-.patch --]
[-- Type: text/x-patch, Size: 3322 bytes --]

From 8616439f8331d7d8fc089a83bc91e3c2ebc25935 Mon Sep 17 00:00:00 2001
From: pukkamustard <pukkamustard@posteo.net>
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


[-- Attachment #3: Type: text/plain, Size: 1303 bytes --]



Julien Lepiller <julien@lepiller.eu> writes:

> 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 <pukkamustard@posteo.net> a écrit :
>
>  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 <package>.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


  reply	other threads:[~2021-09-07 11:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04  8:04 [bug#49868] [PATCH 0/2] guix: dune-build-system: Add a profile parameter pukkamustard
2021-08-04  8:08 ` [bug#49868] [PATCH 1/2] " pukkamustard
2021-08-04  8:08   ` [bug#49868] [PATCH 2/2] gnu: ocaml4.07-base: Remove unnecessary arguments pukkamustard
2021-08-09  2:17 ` [bug#49868] [PATCH 0/2] guix: dune-build-system: Add a profile parameter Julien Lepiller
2021-08-09  7:17   ` pukkamustard
2021-08-09  7:19 ` [bug#49868] [PATCH v2 1/2] " pukkamustard
2021-08-09  7:19   ` [bug#49868] [PATCH v2 2/2] gnu: ocaml4.07-base: Remove unnecessary arguments pukkamustard
2021-08-20 22:09 ` bug#49868: [PATCH 0/2] guix: dune-build-system: Add a profile parameter Julien Lepiller
2021-08-24  6:52   ` [bug#49868] " pukkamustard
2021-08-24  7:13     ` pukkamustard
2021-08-24  7:51       ` pukkamustard
2021-09-07  9:33         ` pukkamustard
2021-09-07 11:06           ` Julien Lepiller
2021-09-07 11:46             ` pukkamustard [this message]
2021-09-07 13:03               ` Julien Lepiller
2021-09-07 18:11                 ` pukkamustard
2021-09-07 22:03                   ` Julien Lepiller
2021-09-08  8:24                     ` pukkamustard
2021-09-08 11:45                       ` Julien Lepiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86pmtky4yu.fsf@posteo.net \
    --to=pukkamustard@posteo.net \
    --cc=49868@debbugs.gnu.org \
    --cc=julien@lepiller.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).