unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25281: rust importer duplicates input
@ 2016-12-27 16:10 ng0
  2016-12-28  0:01 ` David Craven
  2021-07-02  8:52 ` zimoun
  0 siblings, 2 replies; 6+ messages in thread
From: ng0 @ 2016-12-27 16:10 UTC (permalink / raw)
  To: 25281

I'm on the grand journey into rusty land, and while I'm
assembling a list of what needs to be packaged to package our
prototype, I got this:

ng0@wasp ~$ guix import crate net2
following 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)))

-- 
♥Ⓐ  ng0
PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#25281: rust importer duplicates input
  2016-12-27 16:10 bug#25281: rust importer duplicates input ng0
@ 2016-12-28  0:01 ` David Craven
  2016-12-28 12:06   ` Ricardo Wurmus
  2021-07-02  8:52 ` zimoun
  1 sibling, 1 reply; 6+ messages in thread
From: David Craven @ 2016-12-28  0:01 UTC (permalink / raw)
  To: ng0; +Cc: 25281

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#25281: rust importer duplicates input
  2016-12-28  0:01 ` David Craven
@ 2016-12-28 12:06   ` Ricardo Wurmus
  2016-12-28 20:51     ` David Craven
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Wurmus @ 2016-12-28 12:06 UTC (permalink / raw)
  To: David Craven; +Cc: 25281


David Craven <david@craven.ch> writes:

> 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 match
the current architecture or to uniquify the list of inputs?

~~ Ricardo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#25281: rust importer duplicates input
  2016-12-28 12:06   ` Ricardo Wurmus
@ 2016-12-28 20:51     ` David Craven
  0 siblings, 0 replies; 6+ messages in thread
From: David Craven @ 2016-12-28 20:51 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 25281

> 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 just
removing duplicate inputs for the thing to build. I'd find time spent
on a Cargo.lock parser (which should be quite easy) to be more useful,
but if someone wants to do it...

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#25281: rust importer duplicates input
  2016-12-27 16:10 bug#25281: rust importer duplicates input ng0
  2016-12-28  0:01 ` David Craven
@ 2021-07-02  8:52 ` zimoun
  2021-07-03  7:54   ` zimoun
  1 sibling, 1 reply; 6+ messages in thread
From: zimoun @ 2021-07-02  8:52 UTC (permalink / raw)
  To: ng0; +Cc: 25281

Hi,

On mar., 27 déc. 2016 at 16:10, ng0 <ng0@libertad.pw> wrote:

> ng0@wasp ~$ guix import crate net2
> following 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)))

Using Guix 3694c0d, I get this:

--8<---------------cut here---------------start------------->8---
$ guix import crate net2
(define-public rust-net2-0.2
  (package
    (name "rust-net2")
    (version "0.2.37")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "net2" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "1bk8jp0i12gvhrlaqbfq19ancja70r1rg3sywbhjl0385g8k05ir"))))
    (build-system cargo-build-system)
    (arguments
      `(#:cargo-inputs
        (("rust-cfg-if" ,rust-cfg-if-0.1)
         ("rust-libc" ,rust-libc-0.2)
         ("rust-winapi" ,rust-winapi-0.3))))
    (home-page
      "https://github.com/deprecrated/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))))
--8<---------------cut here---------------end--------------->8---

Therefore, I think this bug report can be close.  WDYT?


All the best,
simon




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#25281: rust importer duplicates input
  2021-07-02  8:52 ` zimoun
@ 2021-07-03  7:54   ` zimoun
  0 siblings, 0 replies; 6+ messages in thread
From: zimoun @ 2021-07-03  7:54 UTC (permalink / raw)
  To: ng0; +Cc: 25281-done

Hi,

On Fri, 02 Jul 2021 at 10:52, zimoun <zimon.toutoune@gmail.com> wrote:
> On mar., 27 déc. 2016 at 16:10, ng0 <ng0@libertad.pw> wrote:
>
>> ng0@wasp ~$ guix import crate net2
>> following 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)))
>
> Using Guix 3694c0d, I get this:
>
> $ guix import crate net2
> (define-public rust-net2-0.2
>   (package
>     (name "rust-net2")
>     (version "0.2.37")
>     (source
>       (origin
>         (method url-fetch)
>         (uri (crate-uri "net2" version))
>         (file-name
>           (string-append name "-" version ".tar.gz"))
>         (sha256
>           (base32
>             "1bk8jp0i12gvhrlaqbfq19ancja70r1rg3sywbhjl0385g8k05ir"))))
>     (build-system cargo-build-system)
>     (arguments
>       `(#:cargo-inputs
>         (("rust-cfg-if" ,rust-cfg-if-0.1)
>          ("rust-libc" ,rust-libc-0.2)
>          ("rust-winapi" ,rust-winapi-0.3))))
>     (home-page
>       "https://github.com/deprecrated/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))))
>
> Therefore, I think this bug report can be close.  WDYT?

I get a «Delivery Status Notification (Failure)» from the email address
of the submitter, and I consider this issue is now fixed, so closing.

If I misread something or misunderstand a point, please reopen.

All the best,
simon




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-03  7:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-27 16:10 bug#25281: rust importer duplicates input ng0
2016-12-28  0:01 ` David Craven
2016-12-28 12:06   ` Ricardo Wurmus
2016-12-28 20:51     ` David Craven
2021-07-02  8:52 ` zimoun
2021-07-03  7:54   ` zimoun

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).