Efraim Flashner <efr...@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?
Jason