GNU bug report logs -
#36676
[PATCH 0/3] cargo build system fixes
Previous Next
Reported by: Robert Vollmert <rob <at> vllmrt.net>
Date: Mon, 15 Jul 2019 19:41:01 UTC
Severity: normal
Tags: patch
Done: Danny Milosavljevic <dannym <at> scratchpost.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 36676 in the body.
You can then email your comments to 36676 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#36676
; Package
guix-patches
.
(Mon, 15 Jul 2019 19:41:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Robert Vollmert <rob <at> vllmrt.net>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Mon, 15 Jul 2019 19:41:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Primarily this removes the build-side dependency on guile-json,
but fixes some bugs along the way.
Robert Vollmert (3):
guix: cargo-build-system: Set CARGO_HOME early to fix build
gnu: Update rust-proc-macro2 to 0.4.30 to fix tests
guix: cargo-build-system: Use bundled json instead of guile-json
gnu/packages/crates-io.scm | 4 ++--
guix/build-system/cargo.scm | 2 +-
guix/build/cargo-build-system.scm | 12 +++++-------
3 files changed, 8 insertions(+), 10 deletions(-)
--
2.20.1 (Apple Git-117)
Information forwarded
to
guix-patches <at> gnu.org
:
bug#36676
; Package
guix-patches
.
(Mon, 15 Jul 2019 19:43:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 36676 <at> debbugs.gnu.org (full text, mbox):
This makes the packages from (gnu packages crates-io)
not fail to build outright with
starting phase `build'
error: failed to acquire package cache lock
Caused by:
failed to open: /homeless-shelter/.cargo/.package-cache
Caused by:
Permission denied (os error 13)
phase `build' failed after 0.0 seconds
* guix/build/cargo-build-system.scm (configure): Set CARGO_HOME.
(install): No longer set CARGO_HOME.
---
guix/build/cargo-build-system.scm | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
index 1f36304b15..e4e62dd838 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -99,6 +99,7 @@ Cargo.toml file present at its root."
inputs)
;; Configure cargo to actually use this new directory.
+ (setenv "CARGO_HOME" (string-append (getcwd) "/.cargo"))
(mkdir-p ".cargo")
(let ((port (open-file ".cargo/config" "w" #:encoding "utf-8")))
(display "
@@ -148,9 +149,6 @@ directory = '" port)
;; Make cargo reuse all the artifacts we just built instead
;; of defaulting to making a new temp directory
(setenv "CARGO_TARGET_DIR" "./target")
- ;; Force cargo to honor our .cargo/config definitions
- ;; https://github.com/rust-lang/cargo/issues/6397
- (setenv "CARGO_HOME" ".")
;; Only install crates which include binary targets,
;; otherwise cargo will raise an error.
--
2.20.1 (Apple Git-117)
Information forwarded
to
guix-patches <at> gnu.org
:
bug#36676
; Package
guix-patches
.
(Mon, 15 Jul 2019 19:43:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 36676 <at> debbugs.gnu.org (full text, mbox):
Previously, one test was failing:
failures:
test_debug_tokenstream
test result: FAILED. 19 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
* gnu/packages/crates-io.scm (rust-proc-macro2): Update to 0.4.30.
---
gnu/packages/crates-io.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index b480b6fe56..db9665d1aa 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -47,7 +47,7 @@ or XID_Continue properties according to Unicode Standard Annex #31.")
(define-public rust-proc-macro2
(package
(name "rust-proc-macro2")
- (version "0.4.27")
+ (version "0.4.30")
(source
(origin
(method url-fetch)
@@ -56,7 +56,7 @@ or XID_Continue properties according to Unicode Standard Annex #31.")
(string-append name "-" version ".tar.gz"))
(sha256
(base32
- "05c92v787snyaq4ss16vxc9mdv6zndfgsdq8k3hnnyffmsf7ycad"))))
+ "0nd71fl24sys066jrha6j7i34nfkjv44yzw8yww9742wmc8j0gfg"))))
(build-system cargo-build-system)
(arguments
`(#:cargo-inputs (("rust-unicode-xid" ,rust-unicode-xid))
--
2.20.1 (Apple Git-117)
Information forwarded
to
guix-patches <at> gnu.org
:
bug#36676
; Package
guix-patches
.
(Mon, 15 Jul 2019 19:43:03 GMT)
Full text and
rfc822 format available.
Message #14 received at 36676 <at> debbugs.gnu.org (full text, mbox):
Per https://lists.gnu.org/archive/html/guix-devel/2019-07/msg00193.html
* guix/build/cargo-build-system.scm: Use (gnu build json) instead
of (json parser).
* guix/build-system/cargo.scm: Import (gnu build json) instead of
(json parser).
---
guix/build-system/cargo.scm | 2 +-
guix/build/cargo-build-system.scm | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm
index fa211d456d..10a1bac844 100644
--- a/guix/build-system/cargo.scm
+++ b/guix/build-system/cargo.scm
@@ -61,7 +61,7 @@ to NAME and VERSION."
(define %cargo-build-system-modules
;; Build-side modules imported by default.
`((guix build cargo-build-system)
- (json parser)
+ (guix build json)
,@%cargo-utils-modules))
(define* (cargo-build store name inputs
diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
index e4e62dd838..f38de16cf7 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -20,6 +20,7 @@
(define-module (guix build cargo-build-system)
#:use-module ((guix build gnu-build-system) #:prefix gnu:)
+ #:use-module (guix build json)
#:use-module (guix build utils)
#:use-module (guix build cargo-utils)
#:use-module (ice-9 popen)
@@ -27,7 +28,6 @@
#:use-module (ice-9 ftw)
#:use-module (ice-9 format)
#:use-module (ice-9 match)
- #:use-module (json parser)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (%standard-phases
@@ -42,15 +42,15 @@
(define (manifest-targets)
"Extract all targets from the Cargo.toml manifest"
(let* ((port (open-input-pipe "cargo read-manifest"))
- (data (json->scm port))
- (targets (hash-ref data "targets" '())))
+ (data (read-json port))
+ (targets (or (assoc-ref data "targets") '())))
(close-port port)
targets))
(define (has-executable-target?)
"Check if the current cargo project declares any binary targets."
(let* ((bin? (lambda (kind) (string=? kind "bin")))
- (get-kinds (lambda (dep) (hash-ref dep "kind")))
+ (get-kinds (lambda (dep) (assoc-ref dep "kind")))
(bin-dep? (lambda (dep) (find bin? (get-kinds dep)))))
(find bin-dep? (manifest-targets))))
--
2.20.1 (Apple Git-117)
Information forwarded
to
guix-patches <at> gnu.org
:
bug#36676
; Package
guix-patches
.
(Mon, 15 Jul 2019 20:38:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 36676 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
These patches LGTM!
[Message part 2 (application/pgp-signature, inline)]
Reply sent
to
Danny Milosavljevic <dannym <at> scratchpost.org>
:
You have taken responsibility.
(Tue, 16 Jul 2019 07:58:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Robert Vollmert <rob <at> vllmrt.net>
:
bug acknowledged by developer.
(Tue, 16 Jul 2019 07:58:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 36676-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Robert,
thanks!
I've pushed these to guix master as commits
c82c16a6f3cfeec82ba8bd7572b11852a6152c7e,
848862f0297dfb50197638a0828ba1e714a07074,
4fde0030d42068b347d7af58ed3b746c5ea2f877.
[Message part 2 (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 13 Aug 2019 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 258 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.