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

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


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


[-- Attachment #2: 0001-guix-dune-build-system-Put-dune-into-a-reproducible-.patch --]
[-- Type: text/x-patch, Size: 4240 bytes --]

From 31bf546f87e90d108003b6ddef4756bf2ef04db7 Mon Sep 17 00:00:00 2001
From: pukkamustard <pukkamustard@posteo.net>
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 flags.
---
 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 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")
@@ -3295,8 +3294,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")
@@ -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 frontends 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/issues/82
        #:phases
        (modify-phases %standard-phases
@@ -3935,8 +3931,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/dune-build-system.scm b/guix/build/dune-build-system.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 © 2018 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2019 Gabriel Hondet <gabrielhondet@gmail.com>
+;;; Copyright © 2021 pukkamustard <pukkamustard@posteo.net>
 ;;;
 ;;; 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-flags)))
   #t)
 
 (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)
 
 (define* (install #:key outputs (install-target "install") (jbuild? #f)
-- 
2.33.0


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



pukkamustard <pukkamustard@posteo.net> 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 <pukkamustard@posteo.net> writes:
>
>> pukkamustard <pukkamustard@posteo.net> 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).


  reply	other threads:[~2021-09-07  9:49 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 [this message]
2021-09-07 11:06           ` Julien Lepiller
2021-09-07 11:46             ` pukkamustard
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=86y288yavn.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).