From mboxrd@z Thu Jan 1 00:00:00 1970 From: "pelzflorian (Florian Pelz)" Subject: bug#35861: [wishlist] Improve packaging error handling and tooling Date: Wed, 22 May 2019 23:54:49 +0200 Message-ID: <20190522215449.3nuif65jogi537c7@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:43562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTZDR-0002F3-Gq for bug-guix@gnu.org; Wed, 22 May 2019 17:56:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTZDP-0001Bl-IW for bug-guix@gnu.org; Wed, 22 May 2019 17:56:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57913) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hTZDN-0001BG-UJ for bug-guix@gnu.org; Wed, 22 May 2019 17:56:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hTZDN-0008Oz-SW for bug-guix@gnu.org; Wed, 22 May 2019 17:56:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:43369) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTZCH-0001l8-Pd for bug-guix@gnu.org; Wed, 22 May 2019 17:54:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTZCG-0000dG-Jv for bug-guix@gnu.org; Wed, 22 May 2019 17:54:53 -0400 Received: from pelzflorian.de ([5.45.111.108]:60012 helo=mail.pelzflorian.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hTZCF-0000c1-Ot for bug-guix@gnu.org; Wed, 22 May 2019 17:54:52 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 5D42E36003D for ; Wed, 22 May 2019 23:54:49 +0200 (CEST) Content-Disposition: inline List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 35861@debbugs.gnu.org I believe for package definitions * known triggers for unhelpful error messages should get more graceful error messages, * there should be no fixed truncation of error messages and * there could perhaps be more tooling like single-stepping through the build process. For example in I got an unhelpful error message: [ 11%] LOAD guix/scripts/search.scm [ 11%] LOAD guix/scripts/gc.scm [ 11%] LOAD guix/scripts/hash.scm [ 11%] LOAD guix/scripts/pack.scm Backtrace: In ice-9/boot-9.scm: 222:29 19 (map1 (((guix utils)) ((guix store)) ((guix #) # (#)) =E2=80= =A6)) 222:29 18 (map1 (((guix store)) ((guix status) #:select (#)) (#) =E2=80= =A6)) 222:29 17 (map1 (((guix status) #:select (#)) ((guix grafts)) # =E2=80= =A6)) 222:29 16 (map1 (((guix grafts)) ((guix monads)) ((guix #)) (#) =E2=80= =A6)) 222:29 15 (map1 (((guix monads)) ((guix modules)) ((guix #)) (#) =E2=80= =A6)) 222:29 14 (map1 (((guix modules)) ((guix packages)) ((guix #)) # =E2=80= =A6)) 222:29 13 (map1 (((guix packages)) ((guix profiles)) ((guix #)) =E2=80= =A6)) 222:29 12 (map1 (((guix profiles)) ((guix describe)) ((guix #)) =E2=80= =A6)) 222:29 11 (map1 (((guix describe)) ((guix derivations)) ((# #)) =E2=80= =A6)) 222:29 10 (map1 (((guix derivations)) ((guix search-paths)) (#) =E2=80= =A6)) 222:29 9 (map1 (((guix search-paths)) ((guix build-system #)) # =E2=80= =A6)) 222:29 8 (map1 (((guix build-system gnu)) ((guix scripts #)) # =E2=80= =A6)) 222:29 7 (map1 (((guix scripts build)) ((guix self) #:select =E2=80=A6= ) =E2=80=A6)) 222:29 6 (map1 (((guix self) #:select (make-config.scm)) ((=E2=80=A6)= ) =E2=80=A6)) 222:29 5 (map1 (((gnu packages)) ((gnu packages bootstrap)) (=E2=80=A6= ) =E2=80=A6)) 222:29 4 (map1 (((gnu packages bootstrap)) ((gnu packages =E2=80=A6) = =E2=80=A6) =E2=80=A6)) 222:17 3 (map1 (((gnu packages compression) #:hide (zip)) ((=E2=80=A6= )) =E2=80=A6)) 2830:10 2 (resolve-interface (gnu packages compression) #:select _ =E2= =80=A6) 260:13 1 (for-each # =E2=80=A6) In unknown file: 0 (scm-error misc-error #f "~A" ("no binding `zip' to h=E2=80=A6= ") =E2=80=A6) ERROR: In procedure scm-error: no binding `zip' to hide in module (gnu packages compression) I wished it had been possible to step (or reverse-step) through the build process like in gdb for C programs, but I presume this might be too difficult to realize for now (?). Then the following was a non-obvious error I got when building an earlier revision of usb-modeswitch-data because I used #:modules (=E2=80=A6 (guix packages)) in the arguments to the trivial-build-system of usb-modeswitch-data. florian@florianmacbook ~/git/guix [env]$ bzcat /var/log/guix/drvs/pz/z8vj= c5ba6slfry3jipczlvv84ww5j3-module-import-compiled.drv.bz2 Backtrace: In system/base/compile.scm: 152:6 19 (compile-file "/gnu/store/6mww1gn4l70m4j4psj5966w0jdsi?" ?) 43:4 18 (call-once _) In ice-9/boot-9.scm: 841:4 17 (with-throw-handler _ _ _) In system/base/compile.scm: 59:11 16 (_) 155:11 15 (_ #) 235:18 14 (read-and-compile # ?) 183:32 13 (compile-fold (#) ?) In ice-9/boot-9.scm: 2312:4 12 (save-module-excursion #) In language/scheme/compile-tree-il.scm: 31:15 11 (_) In ice-9/psyntax.scm: 1235:36 10 (expand-top-sequence ((define-module (guix #) # (?) ?)) ?) 1182:24 9 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?) 285:10 8 (parse _ (("placeholder" placeholder)) (()) _ c&e (# #) #) In ice-9/eval.scm: 293:34 7 (_ #) In ice-9/boot-9.scm: 2874:4 6 (define-module* _ #:filename _ #:pure _ #:version _ # _ ?) 2071:24 5 (call-with-deferred-observers #) 2887:24 4 (_) 222:17 3 (map1 (((guix utils)) ((guix records)) ((guix store)) ?)) 2803:6 2 (resolve-interface _ #:select _ #:hide _ #:prefix _ # _ ?) In unknown file: 1 (scm-error misc-error #f "~A ~S" ("no code for modu?" ?) ?) In ice-9/boot-9.scm: 752:25 0 (dispatch-exception _ _ _) ice-9/boot-9.scm:752:25: In procedure dispatch-exception: no code for module (guix utils) When I did `./pre-inst-env guix lint usb-modeswitch-data`, it did not find the error either. Regards, Florian