From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 05 19:31:01 2020 Received: (at submit) by debbugs.gnu.org; 5 Oct 2020 23:31:01 +0000 Received: from localhost ([127.0.0.1]:50789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPZwb-0000Tv-5N for submit@debbugs.gnu.org; Mon, 05 Oct 2020 19:31:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:38922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPZwY-0000Tm-VY for submit@debbugs.gnu.org; Mon, 05 Oct 2020 19:30:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39780) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPZwX-0005tD-Fn for bug-guix@gnu.org; Mon, 05 Oct 2020 19:30:58 -0400 Received: from tobias.gr ([2a02:c205:2020:6054::1]:58090) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPZwV-00072o-7R for bug-guix@gnu.org; Mon, 05 Oct 2020 19:30:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobias.gr; s=2018; bh=jdSRJB73iCEqUssXEwijkWNKxcj94RMS6cY/btSH+6I=; h=date:subject:to: from; b=a11KvHMCQqUmW+BumDflUJoZrxxacE0C32wAcW+yMGovLYPbxexaJrq6F18Ryb PygN1TIqLgq7iNXTdZZrYioR6jRG0s0z7t0x2puz8KM3qOwxN3ltv4nGDEVsyd4N8GcedJ 3Tdpycwv8l4ragsEVhzGZDRjbKO5nXa2gN9vQmZluquOtWTvJP0NrRRqyczNma3if1GL7c 3TXpLDiH6pRUXlE7YROBIHQa1aKcdLrqSVJTdUV4xwW+uCKyULtk5N9cy1wBV9aH6v1rBd zcAU3a4OLj4OMtYXsDnXT0tGkzpCUbGq2IZxCMMdR649oWNKG/PRjiLo89FSrkj6P/a51g == Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 0edeb0ec (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO); Mon, 5 Oct 2020 23:31:00 +0000 (UTC) BIMI-Selector: v=BIMI1; s=default; From: Tobias Geerinckx-Rice To: bug-guix@gnu.org, Ryan Prior Subject: Vlang REPL broken Date: Tue, 06 Oct 2020 01:30:50 +0200 Message-ID: <87k0w48d3p.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@tobias.gr; helo=tobias.gr X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 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, PDS_BTC_ID=0.498, PDS_BTC_MSGID=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: submit 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.9 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Guix, Commit 84fa2ced47e16de66674ca169845a6f08cb5ef6c broke the vlang=20 REPL (=E2=80=98v repl=E2=80=99 or simply =E2=80=98v=E2=80=99 without argume= nts) in a new way: --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable ~ =CE=BB v For usage information, quit V REPL and run `v help` cannot compile=20 `/gnu/store/zf80y1bfdvpc6s3lrs33vlc6d1d745la-vlang-0.1.29/bin/cmd/tools/vre= pl.v`:=20 builder error: folder=20 `/gnu/store/zf80y1bfdvpc6s3lrs33vlc6d1d745la-vlang-0.1.29/bin/cmd/tools`=20 is not writable --=-=-= Content-Type: text/plain; format=flowed The compiler works fine. The REPL didn't work before so this isn't a regression per se, but it still needs to be fixed. --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable =CE=BB guix install vlang The following package will be downgraded: vlang 0.1.29 =E2=86=92 0.1.27 [...] ~ =CE=BB v For usage information, quit V REPL using `exit` and use `v help` cannot compile=20 =E2=80=98/gnu/store/1f5nzwf1jhn5iikhfpxjdxcbmj24zdf5-vlang-0.1.27/bin/cmd/t= ools/vrepl.v:=20 /gnu/store/1f5nzwf1jhn5iikhfpxjdxcbmj24zdf5-vlang-0.1.27/bin/cmd/tools/vrep= l.v:64:1:=20 warning: function `repl_help` in module main cannot be declared=20 public=20 62 | } 63 |=20 64 | pub fn repl_help() { | ~~~~~~~~~~~~~~~~~~ 65 | println(util.full_v_version()) 66 | println(' /gnu/store/1f5nzwf1jhn5iikhfpxjdxcbmj24zdf5-vlang-0.1.27/bin/cmd/tools/vrep= l.v:73:1:=20 warning: function `run_repl` in module main cannot be declared=20 public=20 71 | } 72 |=20 73 | pub fn run_repl(workdir string, vrepl_prefix string)=20 []string { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 74 | println(util.full_v_version()) 75 | println('Use Ctrl-C or `exit` to exit') /gnu/store/1f5nzwf1jhn5iikhfpxjdxcbmj24zdf5-vlang-0.1.27/bin/cmd/tools/vrep= l.v:240:1:=20 warning: function `rerror` in module main cannot be declared=20 public=20 238 | } 239 |=20 240 | pub fn rerror(s string) { | ~~~~~~~~~~~~~~~~~~~~~~~ 241 | println('V repl error: $s') 242 | os.flush() builder error: C compiler error, while attempting to run:=20 =2D---------------------------------------------------------- cc -std=3Dgnu11 -Wall -Wextra -Wno-unused-variable=20 =2DWno-unused-parameter -Wno-unused-result -Wno-unused-function=20 =2DWno-missing-braces -Wno-unused-label=20 =2DWerror=3Dimplicit-function-declaration -o=20 "/gnu/store/1f5nzwf1jhn5iikhfpxjdxcbmj24zdf5-vlang-0.1.27/bin/cmd/tools/vre= pl"=20 "/home/nckx/.cache/v/vrepl.tmp.c" -lm -lpthread -ldl =2D---------------------------------------------------------- Probably your C compiler is missing.=20 Please reinstall it, or make it available in your PATH. On Debian/Ubuntu, run `sudo apt install build-essential`=E2=80=98 --=-=-= Content-Type: text/plain; format=flowed Kind regards, T G-R --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCX3usqw0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15C1QBAImm31pyLNYzdgdYils+3QsQBrxcTPMpm+7EQ2O3 fJRBAQD9w/45chPOeBoqJEJuwIuXUGTlSojxmGpxTO/TvHh3Dg== =nRSH -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 06 01:03:44 2020 Received: (at 43821) by debbugs.gnu.org; 6 Oct 2020 05:03:44 +0000 Received: from localhost ([127.0.0.1]:51186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPf8a-0002Jd-GW for submit@debbugs.gnu.org; Tue, 06 Oct 2020 01:03:44 -0400 Received: from mail1.protonmail.ch ([185.70.40.18]:38284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPf8Y-0002J7-MZ for 43821@debbugs.gnu.org; Tue, 06 Oct 2020 01:03:43 -0400 Date: Tue, 06 Oct 2020 05:03:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1601960616; bh=h5DafVBnjWRgGIZpgqX8epkYLydkGYsfWKsXFfrmaPQ=; h=Date:To:From:Reply-To:Subject:From; b=pMOkw+ob8tEJqCtpWnCufke3Ty827Cw9S9gn37QDdKN8QI6Oatp2oGAQNP4KF1I/o AMwPuIe5qhDX6KNKi072By2B5HYKPxPn9iOhS0XAdhJMUfbcMP9d4Za4uX4cNSROnd zSO+IQN2hCGsENaWQn0pWWtpgmgg10mVEIno8K7Q= To: 43821@debbugs.gnu.org From: Ryan Prior Subject: [PATCH 0/1] Progress improving vlang package Message-ID: <20201006050329.6648-1-rprior@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 43821 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: , Reply-To: Ryan Prior Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) One of the challenges of packaging v is that its install script assumes tha= t you'll install it in a mutable folder, and uses that assumption to lazily= build the included tools as they're needed instead of eagerly building eve= rything up-front. There's an included command for eagerly building these tools, which we shou= ld invoke in order to make sure that the repl &c are available at package i= nstallation time and the user won't need write access to the v directory. This patch presents progress in that direction, but it has a ways to go. Li= ke golang, the v build system resolves dependencies on git repos as it goes= , so once I run `v build-tools` it wants to go and fetch the vlang/markdown= repo. So we'll probably need to package that ahead of time. That, however, raises the chicken-and-egg problem. Do we create a vlang-boo= tstrap package that we use to compile the deps (like vlang/markdown) and th= en in turn use those as inputs to the "real" v package which also builds al= l the tools? Do we include those deps as explicit source-only native-inputs= of the v package? I don't know which strategy I prefer yet, I'd be interes= ted to hear any input from others. So in the spirit of progress here's my work-in-progress patch! Cheers, Ryan Ryan Prior (1): gnu: vlang: Build included tools at package time. gnu/packages/vlang.scm | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) --=20 2.17.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 06 01:03:52 2020 Received: (at 43821) by debbugs.gnu.org; 6 Oct 2020 05:03:52 +0000 Received: from localhost ([127.0.0.1]:51191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPf8h-0002K8-RC for submit@debbugs.gnu.org; Tue, 06 Oct 2020 01:03:52 -0400 Received: from mail-40136.protonmail.ch ([185.70.40.136]:31848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPf8g-0002Jk-Lg for 43821@debbugs.gnu.org; Tue, 06 Oct 2020 01:03:51 -0400 Date: Tue, 06 Oct 2020 05:03:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1601960624; bh=FFoquIWU/XnYChtJKXBnvmdMFP8Q4eJxA+uooFSG1ZU=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=fK1y8IyJ0ajI+0r8PNkC+nbzVRMRXcJm70DwUQ9fyHETIb+EVzTyizT8SroyPnsgL Oa/mJ2sN4EGVcmn5DqeGgCf9LI7ZWG1cmm4M+ae++ORLDAet9B1RnnOesUzQaNUVNw sRIlm68mSX4+KqVyqQZjyldaq2r+dLXXR6/6UEv4= To: 43821@debbugs.gnu.org From: Ryan Prior Subject: [PATCH 1/1] gnu: vlang: Build included tools at package time. Message-ID: <20201006050329.6648-2-rprior@protonmail.com> In-Reply-To: <20201006050329.6648-1-rprior@protonmail.com> References: <20201006050329.6648-1-rprior@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 43821 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: , Reply-To: Ryan Prior Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/vlang.scm (vlang): Updates build stages. - Moves the cc-patching logic out of check into an explicit "patch-cc" st= age - Adds "build-tools" stage to pre-build the included tools --- gnu/packages/vlang.scm | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm index 6f6aa79ce5..47060934d4 100644 --- a/gnu/packages/vlang.scm +++ b/gnu/packages/vlang.scm @@ -22,6 +22,7 @@ #:use-module (gnu packages node) #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) + #:use-module (gnu packages version-control) #:use-module (gnu packages xorg) #:use-module (guix build-system gnu) #:use-module (guix git-download) @@ -61,6 +62,18 @@ (("rm -rf") "true") (("v self") "v -cc gcc cmd/v")) #t)) + (add-after 'build 'patch-cc + (lambda _ + (let* ((bin "tmp/bin") + (gcc (which "gcc"))) + (mkdir-p bin) + (symlink gcc (string-append bin "/cc")) + (setenv "PATH" (string-append bin ":" (getenv "PATH"))) + #t))) + (add-after 'patch-cc 'build-tools + (lambda _ + (invoke "./v" "build-tools" "-v") + #t)) (add-before 'check 'delete-failing-tests ;; XXX As always, these should eventually be fixed and run. (lambda _ @@ -74,13 +87,8 @@ #t)) (replace 'check (lambda* (#:key tests? #:allow-other-keys) - (let* ((bin "tmp/bin") - (gcc (which "gcc"))) - (when tests? - (mkdir-p bin) - (symlink gcc (string-append bin "/cc")) - (setenv "PATH" (string-append bin ":" (getenv "PATH"))) - (invoke "./v" "test-fixed"))) + (when tests? + (invoke "./v" "test-fixed")) #t)) (replace 'install (lambda _ @@ -121,6 +129,9 @@ (sha256 (base32 "052gp5q2k31r3lci3rx4k0vy0vjdjva64xvrbbihn8lgmw63lc9f= "))))) =20 + ;; For build-tools + ("git" ,git) + ;; For the tests. ("libx11" ,libx11) ("node" ,node) --=20 2.17.1