all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Martin Becze <mjbecze@riseup.net>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: guix-devel@gnu.org, 38408@debbugs.gnu.org
Subject: Re: [PATCH] WIP patches for the rust importer
Date: Sun, 01 Dec 2019 19:17:31 -0800	[thread overview]
Message-ID: <d2f9b201395c65462b624055b5c65100@riseup.net> (raw)
In-Reply-To: <20191201085941.GB14869@E5400>

On 2019-12-01 08:59, Efraim Flashner wrote:
> On Fri, Nov 29, 2019 at 07:59:35AM -0800, Martin Becze wrote:
>> On 2019-11-28 12:22, Efraim Flashner wrote:
>> > On Wed, Nov 27, 2019 at 04:36:20PM -0800, mjbecze@riseup.net wrote:
>> >>
>> >> > I'd love to see what you have so far if you want to share
>> >>
>> >> Okie Dokie, I posted it and cc'd ya.
>> >>
>> >> Also I took a look at your patches.
>> >> 0001-import-crate-Don-t-include-optional-dependencies.patch should work
>> >> just fine with my patch. But
>> >> 0003-import-crate-Honor-versioned-dependencies-when-impor.patch will not
>> >> work.
>> >>
>> >> I took a different route here with the naming. If you are interested take
>> >> a look take a look at my second patch. (recusive-import-semver) only will
>> >> add the version number to the name if the crate being imported is not the
>> >> latest version. I thought this was more inline with the canonical names,
>> >> but if always adding version number the export symbol is desirable it will
>> >> simplify things.
>> >>
>> >
>> > I'll take a look at it in a minute. I figured with the versioned
>> > requirements we would always want to be specific in version numbers for
>> > crate dependents so I figured it made sense. Also, if we did want to
>> > provide an unversioned '-latest' version we could declare an extra
>> > variable '(define-public rust-libc rust-libc-0.2)' and now rust-libc
>> > points to rust-libc-0.2.
>> >
>> >> Also I added a function (find-packages-by-name*/direct) to packages.scm
>> >> which will return the export symbol of a package that already exists. I
>> >> use this in case there are some non-canocal export name already added.
>> >>
>>
>> I added the no-optional-dep logic to the recusive-semver patch
>> (https://issues.guix.gnu.org/issue/38408), but it seems to break
>> packages. I'm testing on the recursive importer on "hello-cli". Attach
>> is the patch to add the logic and the  before and after output for "guix
>> import crate -r hello-cli". Removing all the optional deps breaks clap
>> here for some reason which I haven't figured out.
> 
> Looking at the two attached files I want to bring attention to the size
> of them:
> after.scm   [text/plain, base64, utf-8, 5.7K]
> before.scm  [text/plain, base64, utf-8, 226K]
> 
> One way to fix this (in addition to your "default to the don't build"
> argument) is to keep rust-clap in it's broken state and define a
> different rust-clap for when we actually want it and to have that use
> enough inputs to actually build. I do now actually realize that only
> really works if we keep all the crates hidden, which I don't think we
> want. So I guess that has us sending bug reports upstream that some of
> the optional dependencies aren't actually optional.
> 
> In any case, I think it'd be better to skip the optional dependencies
> and then add them back in as needed to actually build the crates we
> want.

oh to be more clear. Even with "#:skip-build? #t" on all the rust libs,
things fail if I omit one optional dependency from somewhere. I'm just
testing on hello-cli but hello-cli inculdes clap which has alot of
optional deps. In ./guix/build-systems/cargo.scm on line 186 it says 

"Cargo requires all transitive crate dependencies' sources to be
available
in its index, even if they are optional (this is so it can generate
deterministic Cargo.lock files regardless of the target platform or
enabled
features). Thus we need all transitive crate dependencies for any cargo
dev-dependencies, but this is only needed when building/testing a crate
directly
(i.e. we will never need transitive dev-dependencies for any dependency
crates)."

I haven't really dug into the cargo build-system yet but my guess is
that the problem lies there. Allllsooo i totally could have missed
something simple.. idk

  reply	other threads:[~2019-12-02  3:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26 12:04 [PATCH] WIP patches for the rust importer Efraim Flashner
2019-11-27 20:06 ` mjbecze
2019-11-27 20:58   ` Efraim Flashner
2019-11-28  0:36     ` mjbecze
2019-11-28 12:22       ` Efraim Flashner
2019-11-29 12:59         ` Martin Becze
2019-12-01  8:54           ` Efraim Flashner
2019-12-02  2:32             ` Martin Becze
2019-11-29 15:59         ` Martin Becze
2019-12-01  8:59           ` Efraim Flashner
2019-12-02  3:17             ` Martin Becze [this message]
2019-12-02  4:01               ` Ivan Petkov
2019-12-02 23:10                 ` Martin Becze
2019-12-04  2:40                   ` Ivan Petkov
2019-12-04  2:40                     ` [bug#38408] " Ivan Petkov
2019-12-04 22:08                     ` Martin Becze

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d2f9b201395c65462b624055b5c65100@riseup.net \
    --to=mjbecze@riseup.net \
    --cc=38408@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.