rust importer duplicates input

OpenSubmitted by ng0.
Details
3 participants
  • David Craven
  • ng0
  • Ricardo Wurmus
Owner
unassigned
Severity
normal
N
(address . bug-guix@gnu.org)
87zijhuzcv.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me
I'm on the grand journey into rusty land, and while I'massembling a list of what needs to be packaged to package ourprototype, I got this:
ng0@wasp ~$ guix import crate net2following redirection to `https://crates-io.s3-us-west-1.amazonaws.com/crates/net2/net2-0.2.26.crate'...(package (name "rust-net2") (version "0.2.26") (source (origin (method url-fetch) (uri (crate-uri "net2" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1qp3q6xynb481rsp3ig1nmqb6qlxfba3shfrmqij88cppsv9rpsy")))) (build-system cargo-build-system) (inputs `(("rust-cfg-if" ,rust-cfg-if) ("rust-kernel32-sys" ,rust-kernel32-sys) ("rust-libc" ,rust-libc) ("rust-libc" ,rust-libc) ("rust-libc" ,rust-libc) ("rust-libc" ,rust-libc) ("rust-libc" ,rust-libc) ("rust-winapi" ,rust-winapi) ("rust-ws2-32-sys" ,rust-ws2-32-sys))) (home-page "https://github.com/rust-lang-nursery/net2-rs") (synopsis "Extensions to the standard library's networking types as proposed in RFC 1158.") (description "Extensions to the standard library's networking types as proposed in RFC 1158.") (license (list license:expat license:asl2.0)))
-- ♥Ⓐ ng0PGP keys and more: https://n0is.noblogs.org/http://ng0.chaosnet.org
D
D
David Craven wrote on 28 Dec 2016 01:01
(name . ng0)(address . ng0@libertad.pw)(address . 25281@debbugs.gnu.org)
CAL1_immr3jcxCDJxjYUpO5o8sxVsorW-t7178Vzd55kCGrG3-w@mail.gmail.com
Looking at the Cargo.toml file we see this:
[target."cfg(unix)".dependencies]libc = "0.2.14"# Compat with older Cargo versions temporarily[target.x86_64-unknown-linux-gnu.dependencies]libc = "0.2.14"[target.i686-unknown-linux-gnu.dependencies]libc = "0.2.14"[target.x86_64-apple-darwin.dependencies]libc = "0.2.14"[target.i686-apple-darwin.dependencies]libc = "0.2.14"
I started reimplementing cargos dependency resolution algorithm, butthink now that it's better to use a Cargo.lock file when one isprovided.
When there isn't a cargo lock file it's a library in the sense that itis a collection of source code that can be reused in a cargo projectthat has a Cargo.lock file.
I don't think that this is a issue that needs fixing.
R
R
Ricardo Wurmus wrote on 28 Dec 2016 13:06
(name . David Craven)(address . david@craven.ch)
idjeg0sgsvv.fsf@bimsb-sys02.mdc-berlin.net
David Craven <david@craven.ch> writes:
Toggle quote (24 lines)> Looking at the Cargo.toml file we see this:>> [target."cfg(unix)".dependencies]> libc = "0.2.14"> # Compat with older Cargo versions temporarily> [target.x86_64-unknown-linux-gnu.dependencies]> libc = "0.2.14"> [target.i686-unknown-linux-gnu.dependencies]> libc = "0.2.14"> [target.x86_64-apple-darwin.dependencies]> libc = "0.2.14"> [target.i686-apple-darwin.dependencies]> libc = "0.2.14">> I started reimplementing cargos dependency resolution algorithm, but> think now that it's better to use a Cargo.lock file when one is> provided.>> When there isn't a cargo lock file it's a library in the sense that it> is a collection of source code that can be reused in a cargo project> that has a Cargo.lock file.>> I don't think that this is a issue that needs fixing.
Could the importer be changed to either ignore targets that don’t matchthe current architecture or to uniquify the list of inputs?
~~ Ricardo
D
D
David Craven wrote on 28 Dec 2016 21:51
(name . Ricardo Wurmus)(address . ricardo.wurmus@mdc-berlin.de)
CAL1_imkUxTgUfpTgkRX6KJ_wO8O5nPyEeo2PAmX-pTjZm0fbhw@mail.gmail.com
Toggle quote (3 lines)> Could the importer be changed to either ignore targets that don’t match> the current architecture or to uniquify the list of inputs?
It could, but I don't see an advantage. It takes more than justremoving duplicate inputs for the thing to build. I'd find time spenton a Cargo.lock parser (which should be quite easy) to be more useful,but if someone wants to do it...
?