unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: Jason Conroy <jconroy@tscripta.net>
Cc: guix-devel@gnu.org
Subject: Re: rust-team branch merged
Date: Wed, 24 Apr 2024 18:39:31 +0300	[thread overview]
Message-ID: <Zikns2W615nNz52q@pbp> (raw)
In-Reply-To: <21GRCQ0Z0K9NXCO1IEDLT7V9RGQLRCVDMN1TT5B106HNS6E4S@tscripta.net>

[-- Attachment #1: Type: text/plain, Size: 2485 bytes --]

On Thu, Apr 18, 2024 at 12:54:02PM -0400, Jason Conroy wrote:
> 
> Efraim Flashner <efraim@flashner.co.il> writes:
> 
> > Currently if you were to pull in rust-rand-0.8 and rust-rand-0.7 then
> > you'd have both rand-0.*.crate files in the registry but only one of
> > them would be listed in share/cargo/registry/index/ra/nd/rand. I need to
> > adjust the generation of that file to combine multiple sources if they
> > exist, and sort them (I'm not sure it's necessary, but wouldn't be
> > surprised if we hit undefined behaviour if they were listed multiple
> > times or out of order).
> 
> Hi Efraim,
> 
> I'm currently investigating this limitation of your proposed patch.
> 
> Did you have a strategy in mind for how to fix it? I see that the index
> files are currently generated during a phase of cargo-build-system, rather
> than as a profile hook. So, to build an index that properly reflects the
> contents of a profile, it would seem that the two simplest options are: a)
> keep your existing index-generation logic during the build, and merge these
> per-package index files when building the profile; or b) move your patch's
> index-generating code out of the build phase and into a profile hook, so
> that we build each index file in a single pass (for all versions of a
> package) rather than merging the files from each package output.
> 
> On the surface option (b) seems cleaner, but maybe you had a reason for
> generating the index contents during the build?

I like the idea of moving the code into a profile hook much better than
what I have now.  What's there was more of a proof-of-concept of how it
might work.

On the other hand, by generating it during the build of each package we
make sure to pull in all the crates which exist in the build, so we
could add into a profile/manifest just the crates listed in a Cargo.toml
and then each crate would pull in its own dependencies, and then the
profile hook could combine them all together.  The down side is we'd
have to have the logic to combine the overlapping rand-0.7/rand-0.8
paths both in the build system and in the profile.  Overall it doesn't
seem that bad though, since we could then add packages either as a
regular input or as a cargo-input.

-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-04-24 15:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-13  8:34 rust-team branch merged Efraim Flashner
2023-12-13 14:02 ` Maxim Cournoyer
2023-12-14 15:10 ` Efraim Flashner
2024-02-27  2:24   ` Jason Conroy
2024-03-06  9:06     ` Efraim Flashner
2024-03-06 17:53       ` Jason Conroy
2024-03-07  8:08         ` Efraim Flashner
2024-03-07 16:48           ` Jason Conroy
2024-03-12 15:12             ` Efraim Flashner
2024-03-13 15:06               ` Jason Conroy
2024-04-18 16:54       ` Jason Conroy
2024-04-24 15:39         ` Efraim Flashner [this message]
2024-04-24 15:58           ` Jason Conroy
2024-04-24 16:23             ` Efraim Flashner
2024-05-06 14:00               ` Jason Conroy
2023-12-14 23:09 ` Csepp
  -- strict thread matches above, loose matches on Subject: below --
2023-05-09  7:32 Efraim Flashner
2023-05-09  8:33 ` Christopher Baines
2023-05-09  8:54   ` Efraim Flashner
2023-05-09  9:27     ` Andreas Enge
2023-05-09  9:28       ` Andreas Enge
2023-05-09 13:22       ` Christopher Baines
2023-05-09 14:04         ` Efraim Flashner

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=Zikns2W615nNz52q@pbp \
    --to=efraim@flashner.co.il \
    --cc=guix-devel@gnu.org \
    --cc=jconroy@tscripta.net \
    /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 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).