GNU bug report logs - #52310
[PATCH] Updated vlang to version 0.2

Previous Next

Package: guix-patches;

Reported by: "(unmatched-parenthesis" <paren <at> disroot.org>

Date: Sun, 5 Dec 2021 18:09:07 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52310 in the body.
You can then email your comments to 52310 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#52310; Package guix-patches. (Sun, 05 Dec 2021 18:09:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to "(unmatched-parenthesis" <paren <at> disroot.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 05 Dec 2021 18:09:08 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "(unmatched-parenthesis" <paren <at> disroot.org>
To: guix-patches <at> gnu.org
Cc: "\(unmatched-parenthesis" <paren <at> disroot.org>
Subject: [PATCH] Updated vlang to version 0.2
Date: Sun,  5 Dec 2021 15:14:34 +0000
This patch updates the V compiler/transpiler to version 0.2.4. It also fixes the `v help` command, which was broken with Guix's V 0.1 package because `v help` tries to look in `$PATH_TO_V_EXECUTABLE/cmd/v/help` for help .txt files, which were not present because Guix copies the `v` executable into `$V_STORE_LOCATION/bin` but does not copy the help directory.

---
 gnu/packages/vlang.scm | 35 +++++++++++++++++++++--------------
 1 file changed, 21 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm
index def858da17..32909d34ca 100644
--- a/gnu/packages/vlang.scm
+++ b/gnu/packages/vlang.scm
@@ -23,6 +23,7 @@ (define-module (gnu packages vlang)
   #: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)
@@ -33,7 +34,7 @@ (define-module (gnu packages vlang)
 (define-public vlang
   (package
    (name "vlang")
-   (version "0.1.29")
+   (version "0.2.4")
    (source
     (origin
      (method git-fetch)
@@ -42,7 +43,7 @@ (define-public vlang
            (commit version)))
      (file-name (git-file-name name version))
      (sha256
-      (base32 "1rqi7cah5nq8aggrib9xvdpfjxq20li91svv0w9yny6nn1ag7snx"))))
+      (base32 "17wmjxssmg6kd4j8i6pgib452zzwvkyi3n1znd1jj3xkf2l92fw8"))))
    (build-system gnu-build-system)
    (arguments
     `(#:make-flags
@@ -53,26 +54,30 @@ (define-public vlang
             "GITFASTCLONE=mkdir -p"
             "TCCREPO="
             "VCREPO="
+            (string-append "VFLAGS=-cc " ,(cc-for-target))
             "VERBOSE=1")
       #:phases
       (modify-phases %standard-phases
         (delete 'configure)
+        (add-before 'build 'change-home
+          (lambda _
+            (setenv "HOME" "/tmp")
+            #t))
         (add-before 'build 'patch-makefile
           (lambda _
             (substitute* "Makefile"
-              (("rm -rf") "true")
-              (("v self") (string-append "v -cc " ,(cc-for-target) " cmd/v")))
+              (("--branch thirdparty-unknown-unknown") "")
+              (("rm -rf") "true"))
             #t))
         (add-before 'check 'delete-failing-tests
           ;; XXX As always, these should eventually be fixed and run.
           (lambda _
             (for-each delete-file
-                      '("vlib/v/gen/x64/tests/x64_test.v"
+                      '("vlib/os/notify/notify_test.v"
+                        "vlib/v/doc/doc_private_fn_test.v"
+                        "vlib/v/live/live_test.v"
                         "vlib/v/tests/repl/repl_test.v"
-                        "vlib/v/tests/valgrind/valgrind_test.v"
-                        "vlib/v/tests/valgrind/strings_and_arrays.vv"
-                        "vlib/v/tests/live_test.v"
-                        "vlib/net/websocket/ws_test.v"))
+                        "vlib/v/tests/valgrind/valgrind_test.v"))
             #t))
         (replace 'check
           (lambda* (#:key tests? #:allow-other-keys)
@@ -82,21 +87,23 @@ (define-public vlang
                 (mkdir-p bin)
                 (symlink gcc (string-append bin "/cc"))
                 (setenv "PATH" (string-append bin ":" (getenv "PATH")))
-                (invoke "./v" "test-fixed")))
+                (invoke "./v" "test-self")))
             #t))
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
+                   (docs (string-append bin "/cmd/v/help"))
                    (tools (string-append bin "/cmd/tools"))
                    (thirdparty (string-append bin "/thirdparty"))
                    (vlib (string-append bin "/vlib"))
                    (vmod (string-append bin "/v.mod")))
               (mkdir-p bin)
               (copy-file "./v" (string-append bin "/v"))
-              ;; v requires as of 0.1.27 that these other components are in the
+              ;; v requires as of 0.2.4 that these other components are in the
               ;; same directory. In a future release we may be able to move
               ;; these into other output folders.
               (copy-recursively "cmd/tools" tools)
+              (copy-recursively "cmd/v/help" docs)
               (copy-recursively "thirdparty" thirdparty)
               (copy-recursively "vlib" vlib)
               (copy-file "v.mod" vmod))
@@ -107,7 +114,7 @@ (define-public vlang
     `(("vc"
        ;; Versions are not consistently tagged, but the matching commit will
        ;; probably have ‘v0.x.y’ in the commit message.
-       ,(let ((vc-version "b01d0fcda4b55861baa4be82e307cca4834b1641"))
+       ,(let ((vc-version "5e876c1491db50b136499d3397b57b7c062040e5"))
           ;; v bootstraps from generated c source code from a dedicated
           ;; repository. It's readable, as generated source goes, and not at all
           ;; obfuscated, and it's about 15kb. The original source written in
@@ -121,8 +128,8 @@ (define-public vlang
                   (commit vc-version)))
             (file-name (git-file-name "vc" vc-version))
             (sha256
-             (base32 "052gp5q2k31r3lci3rx4k0vy0vjdjva64xvrbbihn8lgmw63lc9f")))))
-
+             (base32 "1gxdkgc7aqw5f0fhch1n6nhzgzvgb49p77idx1zj7wcp53lpx5ng")))))
+      ("git" ,git-minimal)
       ;; For the tests.
       ("libx11" ,libx11)
       ("node" ,node)
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#52310; Package guix-patches. (Fri, 10 Dec 2021 17:20:01 GMT) Full text and rfc822 format available.

Message #8 received at 52310 <at> debbugs.gnu.org (full text, mbox):

From: "(unmatched-parenthesis" <paren <at> disroot.org>
To: 52310 <at> debbugs.gnu.org
Cc: "\(unmatched-parenthesis" <paren <at> disroot.org>
Subject: [PATCH] Updated vlang to version 0.2
Date: Fri, 10 Dec 2021 17:13:25 +0000
---
 gnu/packages/vlang.scm | 36 ++++++++++++++++++++++--------------
 1 file changed, 22 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm
index def858da17..03bc18c240 100644
--- a/gnu/packages/vlang.scm
+++ b/gnu/packages/vlang.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2020 Ryan Prior <rprior <at> protonmail.com>
 ;;; Copyright © 2020 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2020 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2021 (unmatched parenthesis <paren <at> disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,6 +24,7 @@ (define-module (gnu packages vlang)
   #: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)
@@ -33,7 +35,7 @@ (define-module (gnu packages vlang)
 (define-public vlang
   (package
    (name "vlang")
-   (version "0.1.29")
+   (version "0.2.4")
    (source
     (origin
      (method git-fetch)
@@ -42,7 +44,7 @@ (define-public vlang
            (commit version)))
      (file-name (git-file-name name version))
      (sha256
-      (base32 "1rqi7cah5nq8aggrib9xvdpfjxq20li91svv0w9yny6nn1ag7snx"))))
+      (base32 "17wmjxssmg6kd4j8i6pgib452zzwvkyi3n1znd1jj3xkf2l92fw8"))))
    (build-system gnu-build-system)
    (arguments
     `(#:make-flags
@@ -53,26 +55,30 @@ (define-public vlang
             "GITFASTCLONE=mkdir -p"
             "TCCREPO="
             "VCREPO="
+            (string-append "VFLAGS=-cc " ,(cc-for-target))
             "VERBOSE=1")
       #:phases
       (modify-phases %standard-phases
         (delete 'configure)
+        (add-before 'build 'change-home
+          (lambda _
+            (setenv "HOME" "/tmp")
+            #t))
         (add-before 'build 'patch-makefile
           (lambda _
             (substitute* "Makefile"
-              (("rm -rf") "true")
-              (("v self") (string-append "v -cc " ,(cc-for-target) " cmd/v")))
+              (("--branch thirdparty-unknown-unknown") "")
+              (("rm -rf") "true"))
             #t))
         (add-before 'check 'delete-failing-tests
           ;; XXX As always, these should eventually be fixed and run.
           (lambda _
             (for-each delete-file
-                      '("vlib/v/gen/x64/tests/x64_test.v"
+                      '("vlib/os/notify/notify_test.v"
+                        "vlib/v/doc/doc_private_fn_test.v"
+                        "vlib/v/live/live_test.v"
                         "vlib/v/tests/repl/repl_test.v"
-                        "vlib/v/tests/valgrind/valgrind_test.v"
-                        "vlib/v/tests/valgrind/strings_and_arrays.vv"
-                        "vlib/v/tests/live_test.v"
-                        "vlib/net/websocket/ws_test.v"))
+                        "vlib/v/tests/valgrind/valgrind_test.v"))
             #t))
         (replace 'check
           (lambda* (#:key tests? #:allow-other-keys)
@@ -82,21 +88,23 @@ (define-public vlang
                 (mkdir-p bin)
                 (symlink gcc (string-append bin "/cc"))
                 (setenv "PATH" (string-append bin ":" (getenv "PATH")))
-                (invoke "./v" "test-fixed")))
+                (invoke "./v" "test-self")))
             #t))
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
+                   (docs (string-append bin "/cmd/v/help"))
                    (tools (string-append bin "/cmd/tools"))
                    (thirdparty (string-append bin "/thirdparty"))
                    (vlib (string-append bin "/vlib"))
                    (vmod (string-append bin "/v.mod")))
               (mkdir-p bin)
               (copy-file "./v" (string-append bin "/v"))
-              ;; v requires as of 0.1.27 that these other components are in the
+              ;; v requires as of 0.2.4 that these other components are in the
               ;; same directory. In a future release we may be able to move
               ;; these into other output folders.
               (copy-recursively "cmd/tools" tools)
+              (copy-recursively "cmd/v/help" docs)
               (copy-recursively "thirdparty" thirdparty)
               (copy-recursively "vlib" vlib)
               (copy-file "v.mod" vmod))
@@ -107,7 +115,7 @@ (define-public vlang
     `(("vc"
        ;; Versions are not consistently tagged, but the matching commit will
        ;; probably have ‘v0.x.y’ in the commit message.
-       ,(let ((vc-version "b01d0fcda4b55861baa4be82e307cca4834b1641"))
+       ,(let ((vc-version "5e876c1491db50b136499d3397b57b7c062040e5"))
           ;; v bootstraps from generated c source code from a dedicated
           ;; repository. It's readable, as generated source goes, and not at all
           ;; obfuscated, and it's about 15kb. The original source written in
@@ -121,8 +129,8 @@ (define-public vlang
                   (commit vc-version)))
             (file-name (git-file-name "vc" vc-version))
             (sha256
-             (base32 "052gp5q2k31r3lci3rx4k0vy0vjdjva64xvrbbihn8lgmw63lc9f")))))
-
+             (base32 "1gxdkgc7aqw5f0fhch1n6nhzgzvgb49p77idx1zj7wcp53lpx5ng")))))
+      ("git" ,git-minimal)
       ;; For the tests.
       ("libx11" ,libx11)
       ("node" ,node)
-- 
2.34.0





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 20 Dec 2021 15:06:03 GMT) Full text and rfc822 format available.

Notification sent to "(unmatched-parenthesis" <paren <at> disroot.org>:
bug acknowledged by developer. (Mon, 20 Dec 2021 15:06:03 GMT) Full text and rfc822 format available.

Message #13 received at 52310-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: "(unmatched-parenthesis" <paren <at> disroot.org>
Cc: 52310-done <at> debbugs.gnu.org
Subject: Re: bug#52310: [PATCH] Updated vlang to version 0.2
Date: Mon, 20 Dec 2021 16:05:16 +0100
Hi,

"(unmatched-parenthesis" <paren <at> disroot.org> skribis:

> ---
>  gnu/packages/vlang.scm | 36 ++++++++++++++++++++++--------------
>  1 file changed, 22 insertions(+), 14 deletions(-)

I added a commit log and applied it.

Thanks,
Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 18 Jan 2022 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 97 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.